Use .addConstructor(funcSchema) to declare one or more constructor overloads on an object() schema. The inferred TypeScript type becomes an intersection of all construct signatures and the plain instance type. Constructor signatures are type-only — runtime validation is unchanged.
const result = schema.validate(data)Define a schema to see its inferred TypeScript type.
InferType<typeof schema> automatically derives the TypeScript type from your schema definition.