@monstermann/fn
Version:
A utility library for TypeScript.
26 lines • 604 B
TypeScript
//#region src/number/isBigInt.d.ts
/**
* `isBigInt(target)`
*
* Returns `true` if `target` is a bigint, otherwise `false`. This function acts as a type guard.
*
* ```ts
* isBigInt(123n); // true
* isBigInt(123); // false
* isBigInt("123"); // false
* isBigInt(null); // false
* ```
*
* ```ts
* pipe(123n, isBigInt()); // true
* pipe(123, isBigInt()); // false
* pipe("123", isBigInt()); // false
* pipe(null, isBigInt()); // false
* ```
*/
declare const isBigInt: {
(): (target: unknown) => target is bigint;
(target: unknown): target is bigint;
};
//#endregion
export { isBigInt };