Const
The bigint schema validates that the input is a JavaScript BigInt value. It fails for anything that is not a BigInt value.
bigint
import { bigint } from "typerun/schema";import { is } from "typerun";const isBigInt = is(bigint)(3n);console.log(isBigInt); // trueconst isNotBigInt = is(bigint)(3);console.log(isNotBigInt); // false Copy
import { bigint } from "typerun/schema";import { is } from "typerun";const isBigInt = is(bigint)(3n);console.log(isBigInt); // trueconst isNotBigInt = is(bigint)(3);console.log(isNotBigInt); // false
The
bigint
schema validates that the input is a JavaScript BigInt value. It fails for anything that is not a BigInt value.Example