Type alias IsBigintLiteral<T, $O>

IsBigintLiteral<T, $O>: $SpecialType<T, $MergeOptions<$O, {
    $else: IsBigintLiteral.$<T, $O>;
    $then: $ResolveBranch<T, $O, [$Else]>;
}>>

🎭 predicate

Validate if T is bigint literals.

Type Parameters

Example

type R = IsBigintLiteral<bigint> // false
type R = IsBigintLiteral<1n> // true

type R = IsBigintLiteral<never> // false
type R = IsBigintLiteral<unknown> // false
type R = IsBigintLiteral<string | boolean> // false

type R = IsBigintLiteral<string | number> // boolean

🔢 customize

Filter to ensure T is bigint literals, otherwise returns never.

Example

type R = IsBigintLiteral<bigint, { selection: 'filter' }> // never
type R = IsBigintLiteral<1n, { selection: 'filter' }> // 1n

type R = IsBigintLiteral<never, { selection: 'filter' }> // never
type R = IsBigintLiteral<unknown, { selection: 'filter' }> // never
type R = IsBigintLiteral<string | boolean, { selection: 'filter' }> // never

type R = IsBigintLiteral<string | number> // number

🔢 customize:

Disable distribution of union types.

type R = IsBigintLiteral<1n | string> // boolean
type R = IsBigintLiteral<1n | string, { distributive: false }> // false

🔢 customize

Use unique branch identifiers to allow precise processing of the result.

Example

type R = IsBigintLiteral<1n, $SelectionBranch> // $Then
type R = IsBigintLiteral<string, $SelectionBranch> // $Else

Generated using TypeDoc