UNPKG

fast-check

Version:

Property based testing framework for JavaScript (like QuickCheck)

28 lines (27 loc) 704 B
import { Arbitrary } from './definition/Arbitrary'; /** * Constraints to be applied on `fc.falsy()` */ export interface FalsyContraints { withBigInt?: boolean; } /** * Typing for values generated by `fc.falsy()` */ export declare type FalsyType<TConstraints extends FalsyContraints = {}> = false | null | 0 | '' | typeof NaN | undefined | (TConstraints extends { withBigInt: true; } ? 0n : never); /** * For falsy values: * - '' * - 0 * - NaN * - false * - null * - undefined * - 0n (whenever withBigInt: true) * * @param constraints */ declare function falsy<TConstraints extends FalsyContraints>(constraints?: TConstraints): Arbitrary<FalsyType<TConstraints>>; export { falsy };