UNPKG

io-ts-extra

Version:

Adds pattern matching, optional properties, and several other helpers and types, to io-ts.

16 lines 714 B
declare const secret: unique symbol; declare type Secret = typeof secret; declare type IsNever<T> = [T] extends [never] ? 1 : 0; declare type Not<T extends 0 | 1> = T extends 1 ? 0 : 1; declare type IsAny<T> = [T] extends [Secret] ? Not<IsNever<T>> : 0; declare type OneOf<T extends 1 | 0, U extends 1 | 0> = T extends 1 ? 1 : U; export declare type IsNeverOrAny<T> = OneOf<IsNever<T>, IsAny<T>>; export declare class RichError extends Error { details: unknown; private constructor(); static thrower(context: string): <T>(info?: T | undefined) => never; static throw<T>(details?: T): never; } export declare const funcLabel: (func: Function) => string; export {}; //# sourceMappingURL=util.d.ts.map