import { IType, Type } from "../type"; import { Node } from "../../core"; import { IContext, IValidationResult } from "../type-checker"; export declare class Refinement extends Type { readonly type: IType; readonly predicate: (v: any) => boolean; readonly message: (v: any) => string; readonly flags: number; constructor(name: string, type: IType, predicate: (v: any) => boolean, message: (v: any) => string); describe(): string; instantiate(parent: Node, subpath: string, environment: any, value: any): Node; isAssignableFrom(type: IType): boolean; isValidSnapshot(value: any, context: IContext): IValidationResult; } export declare function refinement(name: string, type: IType, predicate: (snapshot: T) => boolean, message?: string | ((v: any) => string)): IType; export declare function refinement(name: string, type: IType, predicate: (snapshot: S) => snapshot is U, message?: string | ((v: any) => string)): IType; export declare function refinement(type: IType, predicate: (snapshot: S) => snapshot is U, message?: string | ((v: any) => string)): IType; export declare function refinement(type: IType, predicate: (snapshot: T) => boolean, message?: string | ((v: any) => string)): IType;