import type { AnyTypeGuard, GuardTypeInput, GuardTypes, TypeGuardFn } from './types'; type GuardAllInFn = Guards extends readonly [ infer Head extends AnyTypeGuard, ...infer Tail extends AnyTypeGuard[] ] ? TypeGuardFn, GuardTypes> : never; type GuardAllIn = (guards: Readonly<[...Guards]>) => GuardAllInFn; /** * Given one or multiple Type Guards as array, returns a Type Guard that checks if the given value matches all given Type Guards. * * @example * ```ts * import { guardPipe In, match, matchSchema } from 'type-guard-helpers'; * const isFooBar = guardAllIn([ * matchSchema({ foo: match'foo') }), * matchSchema({ bar: match'bar') }) * ]); // val is { readonly foo: "foo"; } & { readonly bar: "bar"; } * ``` * @category Type Guard Composer */ declare const guardAllIn: GuardAllIn; export { guardAllIn }; export type { GuardAllInFn, GuardAllIn };