feat(typescript-types): Add IsNever<T>
This commit is contained in:
11
packages/typescript-types/test/is-never.tst.ts
Normal file
11
packages/typescript-types/test/is-never.tst.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { IsNever } from '@/is-never.js'
|
||||
import { expect } from 'tstyche'
|
||||
|
||||
expect<IsNever<never>>().type.toBe<true>()
|
||||
|
||||
expect<IsNever<1>>().type.toBe<false>()
|
||||
expect<IsNever<'somestring'>>().type.toBe<false>()
|
||||
expect<IsNever<null>>().type.toBe<false>()
|
||||
expect<IsNever<undefined>>().type.toBe<false>()
|
||||
expect<IsNever<unknown>>().type.toBe<false>()
|
||||
expect<IsNever<any>>().type.toBe<false>()
|
||||
Reference in New Issue
Block a user