UNPKG

@typed/io

Version:

Runtime IO type system

7 lines 600 B
import { Flatten, UnNest } from '@typed/common'; import { Guard, TypeOf } from './Guard'; export declare const intersection: <A extends readonly Guard<any>[]>(guards: A) => Guard<UnNest<Flatten<ToGuardTypeConsList<A>, unknown>, unknown>>; declare type IntersectionType<A extends readonly any[]> = UnNest<Flatten<ToGuardTypeConsList<A>, unknown>>; declare type ToGuardTypeConsList<A extends readonly any[]> = [] extends A ? unknown : ((...a: A) => any) extends (t: infer T, ...ts: infer TS) => any ? [TypeOf<T>, ToGuardTypeConsList<TS>] : unknown; export {}; //# sourceMappingURL=Intersection.d.ts.map