Equivalent of or(literal(undefined)) (see or)
or(literal(undefined))
import * as x from 'unhoax'const schema = x.optional(x.string) Copy
import * as x from 'unhoax'const schema = x.optional(x.string)
optional<A, InputA = unknown>( a: Schema<A, InputA>,): UnionSchema<undefined | A, unknown>
a: Schema<A, InputA>
Equivalent of
or(literal(undefined))
(see or)See
Example