Skip to content

Documentation / @sw-file-lib/xml / xml-schema / partialObject

Function: partialObject() ​

ts
function partialObject<S>(shape: S): ObjectSchema<PartialShape<S>, Partial<InferShape<S>>>;

Defined in: packages/xml/src/xml-schema/classes/object.ts:248

Creates an object schema where every field is optional.

This is syntax sugar for x.object(...).partial().

Type Parameters ​

Type Parameter
S extends Shape

Parameters ​

ParameterType
shapeS

Returns ​

ObjectSchema<PartialShape<S>, Partial<InferShape<S>>>