UNPKG

@frauschert/ts-guard

Version:

ts-guard is a typescript library that provides composable type guards. Its inspired by zod but focusses only on type guards and is more lightweight.

6 lines 380 B
import { Guard, TypeOf } from "../types"; import { UnionToIntersection } from "../../types"; type Intersection<T> = T extends any[] ? UnionToIntersection<TypeOf<T[number]>> : never; declare const isIntersection: <T extends readonly [Guard<unknown>, ...Guard<unknown>[]]>(guards: T) => Guard<Intersection<T>>; export { isIntersection }; //# sourceMappingURL=isIntersection.d.ts.map