510 B
510 B
Home | Installation | Usage | Types | Values | Syntax | TypeRegistry | TypeCheck
Create
Use the Create function to create a value from a type. TypeBox will use default values if specified.
const T = Type.Object({ x: Type.Number(), y: Type.Number({ default: 42 }) });
const A = Value.Create(T); // const A = { x: 0, y: 42 }
Back to Home