UNPKG

@typed/io

Version:

Runtime IO type system

13 lines 404 B
import { Is } from '@typed/lambda'; export interface Guard<A = any> { readonly is: Is<A>; } export declare namespace Guard { const is: <A>(is: Is<A>) => Guard<A>; } export declare type TypeOf<A> = A extends Guard<infer R> ? R : never; export declare const guard: { <A>(guard: Guard<A>, value: unknown): value is A; <A_1>(guard: Guard<A_1>): Is<A_1>; }; //# sourceMappingURL=Guard.d.ts.map