Private
constructorReadonly
shapeReturns shape of the Schema.
Asign required field.
Note that Schema
cannot handle objects with any optional fields.
ObjectSchema.object()
.extendField<{ foo: string }>("foo", string())
.extendField<{ readonly bar: number }>("bar", number())
// => Returns Schema for `{ foo: string; readonly bar: number }`
Omit required fields.
object({
"foo": string(),
"bar": number(),
})
.omitField("foo")
// => Returns Schema for `{ bar: number }`
Static
fromGenerated using TypeDoc
Object Schema