import type { TypeGuardFn } from './isType'; /** * Creates a type guard that validates a value against multiple type guards, * ensuring the value satisfies all of them. This function provides overloads * for 1-10 type guards with exact intersection type inference. * * This is useful for: * - Type intersection: `type Employee = Person & { employeeId: string }` * - Multiple type validation scenarios * - Combining multiple independent type checks * - Creating complex validation rules with precise type inference * * @param typeGuards - Type guard functions that the value must satisfy (1-10 guards) * @returns A type guard function that returns true only if all provided type guards pass * * @example * ```typescript * interface Person { * name: string; * age: number; * } * * interface Employee { * employeeId: string; * department: string; * } * * interface Manager { * teamSize: number; * reportsTo: string; * } * * const isPerson = isType({ name: isString, age: isNumber }); * const isEmployee = isType({ employeeId: isString, department: isString }); * const isManager = isType({ teamSize: isNumber, reportsTo: isString }); * * // Single type guard * const isPersonOnly = isIntersectionOf(isPerson); * // Type: TypeGuardFn * * // Two type guards - exact intersection type * const isPersonEmployee = isIntersectionOf(isPerson, isEmployee); * // Type: TypeGuardFn * * // Three type guards - exact intersection type * const isPersonEmployeeManager = isIntersectionOf(isPerson, isEmployee, isManager); * // Type: TypeGuardFn * * // Usage * const candidate = { * name: "John", * age: 30, * employeeId: "EMP001", * department: "Engineering", * teamSize: 5, * reportsTo: "CTO" * }; * * if (isPersonEmployeeManager(candidate)) { * // TypeScript now knows candidate is Person & Employee & Manager * console.log(`${candidate.name} manages ${candidate.teamSize} people in ${candidate.department}`); * } * ``` */ export declare function isIntersectionOf(typeGuard1: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn, typeGuard4: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn, typeGuard4: TypeGuardFn, typeGuard5: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn, typeGuard4: TypeGuardFn, typeGuard5: TypeGuardFn, typeGuard6: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn, typeGuard4: TypeGuardFn, typeGuard5: TypeGuardFn, typeGuard6: TypeGuardFn, typeGuard7: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn, typeGuard4: TypeGuardFn, typeGuard5: TypeGuardFn, typeGuard6: TypeGuardFn, typeGuard7: TypeGuardFn, typeGuard8: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn, typeGuard4: TypeGuardFn, typeGuard5: TypeGuardFn, typeGuard6: TypeGuardFn, typeGuard7: TypeGuardFn, typeGuard8: TypeGuardFn, typeGuard9: TypeGuardFn): TypeGuardFn; export declare function isIntersectionOf(typeGuard1: TypeGuardFn, typeGuard2: TypeGuardFn, typeGuard3: TypeGuardFn, typeGuard4: TypeGuardFn, typeGuard5: TypeGuardFn, typeGuard6: TypeGuardFn, typeGuard7: TypeGuardFn, typeGuard8: TypeGuardFn, typeGuard9: TypeGuardFn, typeGuard10: TypeGuardFn): TypeGuardFn;