import { RuntypeBase, Static, Codec } from '../runtype'; import { Unknown } from './unknown'; export declare type ConstraintCheck> = (x: Static) => boolean | string; export interface Constraint, TConstrained extends Static = Static, TArgs = unknown> extends Codec { readonly tag: 'constraint'; readonly underlying: TUnderlying; constraint(x: Static): boolean | string; readonly name?: string; readonly args?: TArgs; } export declare function Constraint, TConstrained extends Static = Static, TArgs = unknown>(underlying: TUnderlying, constraint: ConstraintCheck, options?: { name?: string; args?: TArgs; }): Constraint; export interface Guard extends Constraint { } export declare const Guard: (test: (x: unknown) => x is T, options?: { name?: string | undefined; args?: K | undefined; } | undefined) => Guard;