type R = IsBigint<bigint> // true
type R = IsBigint<1n> // true
type R = IsBigint<never> // false
type R = IsBigint<unknown> // false
type R = IsBigint<string | boolean> // false
type R = IsBigint<string | bigint> // boolean
🔢 customize
Filter to ensure T
is bigint
or bigint
literals, otherwise returns never
.
type R = IsBigint<bigint, { selection: 'filter' }> // bigint
type R = IsBigint<1n, { selection: 'filter' }> // 1n
type R = IsBigint<never, { selection: 'filter' }> // never
type R = IsBigint<unknown, { selection: 'filter' }> // never
type R = IsBigint<string | boolean, { selection: 'filter' }> // never
type R = IsBigint<string | bigint> // bigint
🔢 customize:
Validate if T
is exactly bigint
.
type R = IsBigint<bigint, { exact: true }> // true
type R = IsBigint<1n, { exact: true }> // false
🔢 customize:
Disable distribution of union types.
type R = IsBigint<bigint | 1> // boolean
type R = IsBigint<bigint | 1, { distributive: false }> // false
🔢 customize
Use unique branch identifiers to allow precise processing of the result.
🎭 predicate
Validate if
T
isbigint
orbigint
literals.