/** * @since 2.2.0 */ import { Literal, Schemable1, WithRefinement1, WithUnion1, WithUnknownContainers1 } from './Schemable'; /** * @since 2.2.0 */ export interface Guard { is: (u: unknown) => u is A; } /** * @since 2.2.2 */ export declare type TypeOf = G extends Guard ? A : never; /** * @since 2.2.0 */ export declare function literal>(...values: A): Guard; /** * @since 2.2.0 */ export declare const never: Guard; /** * @since 2.2.0 */ export declare const string: Guard; /** * @since 2.2.0 */ export declare const number: Guard; /** * @since 2.2.0 */ export declare const boolean: Guard; /** * @since 2.2.0 */ export declare const UnknownArray: Guard>; /** * @since 2.2.0 */ export declare const UnknownRecord: Guard>; /** * @since 2.2.0 */ export declare function refinement(from: Guard, refinement: (a: A) => a is B): Guard; /** * @since 2.2.0 */ export declare function nullable(or: Guard): Guard; /** * @since 2.2.0 */ export declare function type(properties: { [K in keyof A]: Guard; }): Guard<{ [K in keyof A]: A[K]; }>; /** * @since 2.2.0 */ export declare function partial(properties: { [K in keyof A]: Guard; }): Guard>; /** * @since 2.2.0 */ export declare function record(codomain: Guard): Guard>; /** * @since 2.2.0 */ export declare function array(items: Guard): Guard>; /** * @since 2.2.0 */ export declare function tuple>(...components: { [K in keyof A]: Guard; }): Guard; /** * @since 2.2.0 */ export declare function intersection(left: Guard, right: Guard): Guard; /** * @since 2.2.0 */ export declare function union>(...members: { [K in keyof A]: Guard; }): Guard; /** * @since 2.2.0 */ export declare function sum(tag: T): (members: { [K in keyof A]: Guard; }) => Guard; /** * @since 2.2.0 */ export declare function lazy(f: () => Guard): Guard; /** * @since 2.2.0 */ export declare const URI = "io-ts/Guard"; /** * @since 2.2.0 */ export declare type URI = typeof URI; declare module 'fp-ts/es6/HKT' { interface URItoKind { readonly [URI]: Guard; } } /** * @since 2.2.3 */ export declare const schemableGuard: Schemable1 & WithUnknownContainers1 & WithUnion1 & WithRefinement1;