Home > @websublime/schema > ObjectSchemaType > shape

ObjectSchemaType.shape() method

Shape a child object

Signature:

shape(properties: Properties<T>): this;

Parameters

ParameterTypeDescription
propertiesProperties<T>Object properties

Returns:

this

Example

ObjectType().shape({
 name: StringType(),
 age: NumberType()
})