Pass a function to .default() for mutable defaults like arrays or dates. A fresh value is created on every validation.
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.