feat(typescript-types): Add IsAny<T>
This commit is contained in:
10
packages/typescript-types/test/is-any.tst.ts
Normal file
10
packages/typescript-types/test/is-any.tst.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { IsAny } from '@/is-any.js'
|
||||
import { expect } from 'tstyche'
|
||||
|
||||
expect<IsAny<any>>().type.toBe<true>()
|
||||
|
||||
expect<IsAny<1>>().type.toBe<false>()
|
||||
expect<IsAny<'somestring'>>().type.toBe<false>()
|
||||
expect<IsAny<null>>().type.toBe<false>()
|
||||
expect<IsAny<undefined>>().type.toBe<false>()
|
||||
expect<IsAny<unknown>>().type.toBe<false>()
|
||||
9
packages/typescript-types/test/tsconfig.json
Normal file
9
packages/typescript-types/test/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"types": []
|
||||
},
|
||||
"include": ["./"]
|
||||
}
|
||||
Reference in New Issue
Block a user