import Joi from 'joi'; declare module 'joi' { type VE = import('joi').ValidationError; type VO = import('joi').ValidationOptions; type AVO = import('joi').AsyncValidationOptions; type SM = import('joi').SchemaMap; type OS = import('joi').ObjectSchema; type GenericValidationResult = { error: VE; errors?: VE; warning?: VE; value: unknown; } | { error: undefined; errors?: VE; warning?: VE; value: T; }; interface ObjectSchema { /** * Appends the allowed object keys. If schema is null, undefined, or {}, no changes will be applied. */ append(schema?: SM): OS; /** * Sets or extends the allowed object keys. */ keys(schema?: SM): OS; /** * Validates a value using the schema and options. */ validate(value: unknown, options?: VO): GenericValidationResult; /** * Validates a value using the schema and options. */ validateAsync(value: unknown, options?: AVO): Promise; } } export declare type DeepPartial = { [P in keyof T]?: DeepPartial; }; export declare type ExtractValues = T extends ReadonlyArray ? U : never; export declare type AllExcept = Pick>; export declare type SchemaOf = Record; export declare function objectSchemaOf(map: SchemaOf): Joi.ObjectSchema; export declare type StrictSchemaMap = { [K in keyof T]: Joi.AnySchema | Joi.AnySchema[]; }; export declare const isObjectSchema: (schema: Joi.AnySchema) => schema is Joi.ObjectSchema; export declare const isNumberSchema: (schema: Joi.AnySchema) => schema is Joi.NumberSchema; export declare const makeAllNumbersUnsafe: (input: StrictSchemaMap) => StrictSchemaMap; export declare const makeAllOptional: (input: StrictSchemaMap) => StrictSchemaMap; export declare type OptionalKeysOf = Exclude<{ [K in keyof T]: T extends Record ? never : K; }[keyof T], undefined>; export declare const makeAllRequired: (input: StrictSchemaMap, excluding?: Exclude<{ [K in keyof T]: T extends Record ? never : K; }[keyof T], undefined>[] | undefined) => StrictSchemaMap; export declare function literalAs(value: T): T; export { Joi };