-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🔖 0.6.1 - Fix IsArray and IsNonArray spelling to match rest of …
…types, add test coverage to IsNonArray
- Loading branch information
1 parent
c5854a6
commit 1db64ef
Showing
5 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* eslint-disable unused-imports/no-unused-vars */ | ||
import { describe, it } from 'bun:test' | ||
import type { Expect, IsNonArray } from '../index' | ||
|
||
describe('IsNonArray tests', () => { | ||
it('Passes the IsNonArray test when the type is not an array', () => { | ||
type Result = Expect<IsNonArray<{ id: number }>> | ||
// ^? | ||
}) | ||
it('Failed the IsNonArray test when the type is an array', () => { | ||
// @ts-expect-error - Fails the exclusion | ||
type Result = Expect<IsNonArray<{ id: string }[]>> | ||
// ^? | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/* eslint-disable unused-imports/no-unused-vars */ | ||
import { describe, it } from 'bun:test' | ||
import type { Expect, isArray } from '../index' | ||
import type { Expect, IsArray } from '../index' | ||
|
||
describe('isArray tests', () => { | ||
it('Passes the isArray test when the type is an array', () => { | ||
type Result = Expect<isArray<{ id: number }[]>> | ||
type Result = Expect<IsArray<{ id: number }[]>> | ||
// ^? | ||
}) | ||
it('Failed the isArray test when the type is not an array', () => { | ||
// @ts-expect-error - Fails the exclusion | ||
type Result = Expect<isArray<{ id: string }>> | ||
type Result = Expect<IsArray<{ id: string }>> | ||
// ^? | ||
}) | ||
}) |