import { Struct, StructResult, StructFailure, StructContext, StructType } from './struct'; export declare type StructRecord = Record>; export declare type StructTuple = { [K in keyof T]: Struct; }; /** * Convert a validation result to an iterable of failures. */ export declare function toFailures(result: StructResult, context: StructContext): Iterable; /** * A schema for tuple structs. */ export declare type TupleSchema = { [K in keyof T]: Struct; }; /** * A schema for object structs. */ export declare type ObjectSchema = Record>; /** * Infer a type from an object struct schema. */ export declare type InferObjectType = Simplify; }>>; /** * Infer a struct type from an object struct schema. */ export declare type InferObjectStruct = Struct, S>; /** * Normalize properties of a type that allow `undefined` to make them optional. */ declare type Optionalize = OmitBy & Partial>; /** * Omit properties from a type that extend from a specific type. */ declare type OmitBy = Omit ? K : never; }[keyof T]>; /** * Pick properties from a type that extend from a specific type. */ declare type PickBy = Pick ? K : never; }[keyof T]>; /** * Simplifies a type definition to its most basic representation. */ declare type Simplify = T extends any[] | Date ? T : { [Key in keyof T]: T[Key]; } & {}; /** * Assign properties from one type to another, overwriting existing. */ export declare type Assign = Simplify>; export {};