Search


Search something to see results

optional

Equivalent of or(literal(undefined)) (see or)

import * as x from 'unhoax'

const schema = x.optional(x.string)

Type Parameters

  • A
  • InputA = unknown

Parameters

Returns UnionSchema<undefined | A, unknown>