import type { Guard, GuardType, ShapeGuardType } from '../utils/types.js'; /** * Combine two guards with AND logic (intersection). * Value must satisfy both guards. * * @example * ```ts * const isPositiveInteger = and(isInteger, isPositiveNumber); * ``` */ export declare function and(guardA: Guard, guardB: Guard): Guard; /** * Combine two guards with OR logic (union). * Value must satisfy at least one guard. * * @example * ```ts * const isStringOrNumber = or(isString, isNumber); * ``` */ export declare function or(guardA: Guard, guardB: Guard): Guard; /** * Negate a guard. * * @example * ```ts * const isNotNull = not(isNull); * ``` */ export declare function not(guard: Guard): (value: unknown) => boolean; /** * Create a guard that validates an object shape. * Each property is validated by its corresponding guard. * * @example * ```ts * const isUser = shape({ * name: isString, * age: isNumber, * email: isEmail, * }); * * if (isUser(data)) { * data.name; // string * data.age; // number * data.email; // string * } * ``` */ export declare function shape>>(schema: T): Guard>; /** * Create a guard that validates a tuple. * * @example * ```ts * const isCoord = tuple(isNumber, isNumber); * if (isCoord(data)) { * const [x, y] = data; // [number, number] * } * ``` */ export declare function tuple[]>(...guards: T): Guard<{ [K in keyof T]: GuardType; }>; /** * Create a guard that validates each element of an array. * * @example * ```ts * const isStringArray = arrayOf(isString); * if (isStringArray(data)) { * data.forEach(s => s.toUpperCase()); // string[] * } * ``` */ export declare function arrayOf(guard: Guard): Guard; /** * Create a guard that validates Map entries. * * @example * ```ts * const isStringNumberMap = mapOf(isString, isNumber); * ``` */ export declare function mapOf(keyGuard: Guard, valueGuard: Guard): Guard>; /** * Create a guard that validates Record (object) entries. * * @example * ```ts * const isScoreBoard = recordOf(isString, isNumber); * ``` */ export declare function recordOf(valueGuard: Guard): Guard>; /** * Create a guard with a custom refinement predicate. * * @example * ```ts * const isEvenNumber = refine(isNumber, (n) => n % 2 === 0); * ``` */ export declare function refine(guard: Guard, predicate: (value: T) => boolean): Guard; /** * Create an optional guard — allows undefined in addition to the guarded type. * * @example * ```ts * const isOptionalString = optional(isString); * isOptionalString(undefined) // true * isOptionalString("hello") // true * isOptionalString(42) // false * ``` */ export declare function optional(guard: Guard): Guard; /** * Create a nullable guard — allows null in addition to the guarded type. */ export declare function nullable(guard: Guard): Guard; //# sourceMappingURL=combinators.d.ts.map