Search


Search something to see results

lazy

Type Parameters

  • T
  • Input = unknown

Parameters

  • getSchema: Object

Returns Schema<T, Input>

import * as x from 'unhoax'

type Tree = { left: Tree | null, right: Tree | null }

const tree: x.ObjectSchema<Tree> = x.object({
left: x.nullable(x.lazy(() => tree)),
right: x.nullable(x.lazy(() => tree)),
})