/** * Object validation - required * Returns a new object validator where every key is unwrapped from any * `optional()` layer, mirroring `Required` at the type level so consumers * see all properties as required again. */ import { type InferObject, type ObjectShape, type ObjectValidator, type StandardSchemaV1 } from "./core"; import type { OptionalValidator } from "./optional"; export type UnwrapOptional = V extends OptionalValidator ? (value: Inner) => R : V; export type RequiredShape = { [K in keyof T]: UnwrapOptional extends ObjectShape[string] ? UnwrapOptional : T[K]; }; /** * Strips `optional()` wrappers from every property validator of `validator`. * Validators that are not wrapped in `optional()` are kept as-is. * @template T - Original object shape * @param {ObjectValidator} validator - Source object validator * @param {string} [message] - Custom error message for the new validator * @returns {ObjectValidator>} - New validator where every optional layer is removed */ export declare const required: (validator: ObjectValidator, message?: string) => ObjectValidator> & StandardSchemaV1>, InferObject>>;