-
-
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.
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
7055d5c
commit e00904b
Showing
8 changed files
with
64 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @file Type Tests - NaN | ||
* @module tutils/types/tests/unit-d/NaN | ||
*/ | ||
|
||
import type TestSubject from '../nan' | ||
import type Opaque from '../opaque' | ||
|
||
describe('unit-d:types/NaN', () => { | ||
it('should equal Opaque<number, "NaN">', () => { | ||
expectTypeOf<TestSubject>().toEqualTypeOf<Opaque<number, 'NaN'>>() | ||
}) | ||
}) |
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 @@ | ||
/** | ||
* @file Type Definitions - NaN | ||
* @module tutils/types/NaN | ||
*/ | ||
|
||
import type Opaque from './opaque' | ||
|
||
/** | ||
* A value that is not a number. | ||
* | ||
* @see {@linkcode Number.NaN}. | ||
*/ | ||
type NaN = Opaque<number, 'NaN'> | ||
|
||
export type { NaN as default } |
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,13 @@ | ||
/** | ||
* @file Type Tests - isNaN | ||
* @module tutils/utils/tests/unit-d/isNaN | ||
*/ | ||
|
||
import type { NaN } from '#src/types' | ||
import type testSubject from '../is-nan' | ||
|
||
describe('unit-d:utils/isNaN', () => { | ||
it('should guard NaN', () => { | ||
expectTypeOf<typeof testSubject>().guards.toEqualTypeOf<NaN>() | ||
}) | ||
}) |
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