UNPKG

@vitruvius-labs/ts-predicate

Version:
9 lines (8 loc) 284 B
import { isBigInt } from "../type-guard/is-big-int.mjs"; import { ValidationError } from "./utils/validation-error.mjs"; function assertBigInt(value) { if (!isBigInt(value)) { throw new ValidationError("The value must be a big integer."); } } export { assertBigInt };