Augment a struct to allow exact-optional values. Exact-optional values can be omitted but cannot be undefined.
undefined
const foo = object({ bar: exactOptional(string()) });type Foo = Infer<typeof foo>;// Foo = { bar?: string } Copy
const foo = object({ bar: exactOptional(string()) });type Foo = Infer<typeof foo>;// Foo = { bar?: string }
The struct to augment.
The augmented struct.
Augment a struct to allow exact-optional values. Exact-optional values can be omitted but cannot be
undefined
.