import { Path, ParseResult } from './ParseResult'; import { JsonSchema } from './JsonSchema'; export declare type Refinement = (value: T) => boolean; export declare type Refined = T & { readonly __r: { readonly [key in M]: never; }; }; export declare type NonNull = Exclude; export declare type Defined = Exclude; export interface Parser { readonly descriptor: string; readonly alias: string | null; readonly isOptional: boolean; readonly jsonSchema: JsonSchema; parse(input: unknown, path?: Path): ParseResult; is(input: unknown): input is T; cast(input: unknown): T; nullable(): Parser; nonNullable(): Parser>; optional(): Parser; required(): Parser>; refined(modifier: M, f: Refinement): Parser>; aliased(alias: string): Parser; }