feat(typescript-types): Add IsAny<T>

This commit is contained in:
T. R. Bernstein
2025-07-12 01:58:42 +02:00
parent 3c17970cd0
commit 5454e903b8
8 changed files with 219 additions and 51 deletions

View 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>()

View File

@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"noEmit": true,
"strict": true,
"types": []
},
"include": ["./"]
}