import { Literal, Schemable1, WithRefine1, WithUnion1, WithUnknownContainers1 } from './Schemable'; /** * @category model * @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; /** * @category constructors * @since 2.2.0 */ export declare const literal: (...values: A) => Guard; /** * @category primitives * @since 2.2.0 */ export declare const string: Guard; /** * Note: `NaN` is excluded. * * @category primitives * @since 2.2.0 */ export declare const number: Guard; /** * @category primitives * @since 2.2.0 */ export declare const boolean: Guard; /** * @category primitives * @since 2.2.0 */ export declare const UnknownArray: Guard>; /** * @category primitives * @since 2.2.0 */ export declare const UnknownRecord: Guard>; /** * @category combinators * @since 2.2.0 */ export declare const refine: (refinement: (a: A) => a is B) => (from: Guard) => Guard; /** * @category combinators * @since 2.2.0 */ export declare const nullable: (or: Guard) => Guard; /** * @category combinators * @since 2.2.0 */ export declare const type: (properties: { [K in keyof A]: Guard; }) => Guard<{ [K_1 in keyof A]: A[K_1]; }>; /** * @category combinators * @since 2.2.0 */ export declare const partial: (properties: { [K in keyof A]: Guard; }) => Guard>; /** * @category combinators * @since 2.2.0 */ export declare const record: (codomain: Guard) => Guard>; /** * @category combinators * @since 2.2.0 */ export declare const array: (items: Guard) => Guard; /** * @category combinators * @since 2.2.0 */ export declare const tuple: (...components: { [K in keyof A]: Guard; }) => Guard; /** * @category combinators * @since 2.2.0 */ export declare const intersect: (right: Guard) => (left: Guard) => Guard; /** * @category combinators * @since 2.2.0 */ export declare const union: (...members: { [K in keyof A]: Guard; }) => Guard; /** * @category combinators * @since 2.2.0 */ export declare const sum: (tag: T) => (members: { [K in keyof A]: Guard; }) => Guard; /** * @category combinators * @since 2.2.0 */ export declare const lazy: (f: () => Guard) => Guard; /** * @category instances * @since 2.2.0 */ export declare const URI = "io-ts/Guard"; /** * @category instances * @since 2.2.0 */ export declare type URI = typeof URI; declare module 'fp-ts/es6/HKT' { interface URItoKind { readonly [URI]: Guard; } } /** * @category instances * @since 2.2.3 */ export declare const schemableGuard: Schemable1 & WithUnknownContainers1 & WithUnion1 & WithRefine1;