Skip to content

Commit

Permalink
feat: expose Some also under ArrayPlus.Some
Browse files Browse the repository at this point in the history
  • Loading branch information
unional committed May 14, 2023
1 parent be61659 commit 74cc654
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/twenty-jokes-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'type-plus': minor
---

Alias `Some` under `ArrayPlus.Some`.
8 changes: 6 additions & 2 deletions ts/array/array.some.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test } from '@jest/globals'
import { testType, type Some } from '../index.js'
import { describe, it, test } from '@jest/globals'
import { testType, type Some, ArrayPlus } from '../index.js'

test('empty array', () => {
testType.false<Some<[], any>>(true)
Expand Down Expand Up @@ -78,3 +78,7 @@ describe('strict mode', () => {
testType.false<Some<'a'[], string, 'strict'>>(true)
})
})

it('exposes under ArrayPlus.Some', () => {
testType.equal<ArrayPlus.Some<[1, 2, 3], number>, true>(true)
})
3 changes: 2 additions & 1 deletion ts/array/array_plus.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export type { At } from './array.at.js'
export type { Concat } from './array.concat.js'
export type { Entries } from './array.entries.js'
export type { IndexAt, IsIndexOutOfBound } from './array_index.js'
export type { FindFirst as Find } from './array.find.js'
export type { FindLast } from './array.find_last.js'
export type { Some } from './array.some.js'
export type { IndexAt, IsIndexOutOfBound } from './array_index.js'

0 comments on commit 74cc654

Please sign in to comment.