/** * Object validation - partial * Returns a new object validator where every key is wrapped in `optional()`, * mirroring `Partial` at the type level so consumers see all properties as * optional. */ import { type InferObject, type ObjectShape, type ObjectValidator, type StandardSchemaV1 } from "./core"; import { type OptionalValidator } from "./optional"; export type PartialShape = { [K in keyof T]: OptionalValidator[0], ReturnType extends { type: unknown; message: string; validate: boolean; } ? ReturnType : never>; }; /** * Wraps every property validator of `validator` with `optional()`. Validators * that are already optional are kept as-is so the wrapper stays idempotent. * @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 key accepts undefined */ export declare const partial: (validator: ObjectValidator, message?: string) => ObjectValidator> & StandardSchemaV1>, InferObject>>;