Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 534 Bytes

File metadata and controls

43 lines (31 loc) · 534 Bytes

typelab / assertions / IsBigInt

type IsBigInt<T> = _IsTrue<IfBigInt<T, true, false>>;

Checks if a given type T is a bigint.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is a bigint, false otherwise.

Example

type Valid = IsBigInt<bigint>; // true
type Invalid = IsBigInt<number>; // false