/** * Typed Logical Functions * * Polymorphic logical operations using typed-function for runtime dispatch. * Supports number, bigint, BigNumber, and Complex types. * * Truthiness rules (a value is FALSY if): * - number: === 0 or NaN * - bigint: === 0n * - BigNumber: .isZero() || .isNaN() * - Complex: re === 0 && im === 0 * - any: JS-falsy (null, undefined, '', false, 0, 0n, NaN) * * These match the mathjs `and`/`or`/`xor`/`not` semantics exactly. * * @packageDocumentation */ /** * Logical `not`. Flips the boolean value of a given parameter. * * @example * ```typescript * not(2) // false * not(0) // true * not(true) // false * ``` */ export declare const not: import("@danielsimonjr/mathts-core").TypedFunction; /** * Logical `and`. Returns true when both inputs are truthy (non-zero/non-empty). * * @example * ```typescript * and(1, 2) // true * and(0, 2) // false * and(1, 2, 3) // true (variadic) * ``` */ export declare const and: import("@danielsimonjr/mathts-core").TypedFunction; /** * Logical `or`. Returns true when at least one input is truthy. * * @example * ```typescript * or(0, 2) // true * or(0, 0) // false * or(0, 0, 1) // true (variadic) * ``` */ export declare const or: import("@danielsimonjr/mathts-core").TypedFunction; /** * Logical `xor`. Returns true when exactly one input is truthy. * * @example * ```typescript * xor(1, 0) // true * xor(1, 2) // false * xor(1, 0, 0) // true (variadic: odd number of truthy values) * ``` */ export declare const xor: import("@danielsimonjr/mathts-core").TypedFunction; /** * Nullish coalescing operator (??). * Returns `b` when `a` is `null` or `undefined`, otherwise returns `a`. * * Unlike `or`, a value of `0`, `false`, or `''` is NOT considered nullish. * * @example * ```typescript * nullish(null, 5) // 5 * nullish(undefined, 5) // 5 * nullish(0, 5) // 0 (not nullish!) * nullish(false, 5) // false * ``` */ export declare const nullish: import("@danielsimonjr/mathts-core").TypedFunction; /** * All typed logical functions. */ export declare const typedLogical: { not: import("@danielsimonjr/mathts-core").TypedFunction; and: import("@danielsimonjr/mathts-core").TypedFunction; or: import("@danielsimonjr/mathts-core").TypedFunction; xor: import("@danielsimonjr/mathts-core").TypedFunction; nullish: import("@danielsimonjr/mathts-core").TypedFunction; }; //# sourceMappingURL=logical.d.ts.map