import { Struct, Context, Validator } from '../struct'; import { ObjectSchema, Assign, ObjectType, PartialObjectSchema } from '../utils'; /** * Create a new struct that combines the properties properties from multiple * object or type structs. Its return type will match the first parameter's type. * * Like JavaScript's `Object.assign` utility. */ export declare function assign(A: Struct, A>, B: Struct, B>): Struct>, Assign>; export declare function assign(A: Struct, A>, B: Struct, B>, C: Struct, C>): Struct, C>>, Assign, C>>; export declare function assign(A: Struct, A>, B: Struct, B>, C: Struct, C>, D: Struct, D>): Struct, C>, D>>, Assign, C>, D>>; export declare function assign(A: Struct, A>, B: Struct, B>, C: Struct, C>, D: Struct, D>, E: Struct, E>): Struct, C>, D>, E>>, Assign, C>, D>, E>>; /** * Define a new struct type with a custom validation function. */ export declare function define(name: string, validator: Validator): Struct; /** * Create a new struct based on an existing struct, but the value is allowed to * be `undefined`. `log` will be called if the value is not `undefined`. */ export declare function deprecated(struct: Struct, log: (value: unknown, ctx: Context) => void): Struct; /** * Create a struct with dynamic validation logic. * * The callback will receive the value currently being validated, and must * return a struct object to validate it with. This can be useful to model * validation logic that changes based on its input. */ export declare function dynamic(fn: (value: unknown, ctx: Context) => Struct): Struct; /** * Create a struct with lazily evaluated validation logic. * * The first time validation is run with the struct, the callback will be called * and must return a struct object to use. This is useful for cases where you * want to have self-referential structs for nested data structures to avoid a * circular definition problem. */ export declare function lazy(fn: () => Struct): Struct; /** * Create a new struct based on an existing object struct, but excluding * specific properties. * * Like TypeScript's `Omit` utility. */ export declare function omit(struct: Struct, S>, keys: K[]): Struct>, Omit>; /** * Create a new struct based on an existing object struct, but with all of its * properties allowed to be `undefined`. * * Like TypeScript's `Partial` utility. */ export declare function partial(struct: Struct, S> | S): Struct>, PartialObjectSchema>; /** * Create a new struct based on an existing object struct, but only including * specific properties. * * Like TypeScript's `Pick` utility. */ export declare function pick(struct: Struct, S>, keys: K[]): Struct>, Pick>; /** * Define a new struct type with a custom validation function. * * @deprecated This function has been renamed to `define`. */ export declare function struct(name: string, validator: Validator): Struct; //# sourceMappingURL=utilities.d.ts.map