UNPKG

@typed/io

Version:

Runtime IO type system

20 lines 710 B
import * as D from '../decoder'; import * as E from '../encoder'; import * as G from '../guard'; export interface Type<I = any, O = I> extends G.Guard<I>, D.Decoder<I>, E.Encoder<I, O> { readonly name: string; } export declare type TypeOf<A> = Type.Of<A>; export declare namespace Type { type Of<A> = G.TypeOf<A>; type Encoding<A> = E.OutputOf<A>; const fromGuard: <A>(guard: G.Guard<A>, name: string, expected?: string) => Type<A, A>; } export declare type Mixed = Type<any, any>; export interface Any extends Type<any, any> { } export declare const Any: Any; export interface Unknown extends Type<unknown, unknown> { } export declare const Unknown: Unknown; //# sourceMappingURL=Type.d.ts.map