Search


Search something to see results

or

Type Parameters

  • B
  • InputB = unknown

Parameters

Returns Object

union

import * as x from 'unhoax'

const orString = x.or(x.string)
const schema = orString(x.number) // Schema<number | string>

// or, using pipe
import pipe from 'just-pipe'

const schema = pipe(x.number, x.or(x.string))