Search


Search something to see results

tuple

Type Parameters

  • T extends [any, ...any[]]
  • Input = unknown

Parameters

  • items: { [K in string | number | symbol]: Schema<T[K<K>], unknown> }

Returns TupleSchema<T, Input>

import * as x from 'unhoax'

const schema = x.tuple(x.string, x.number)
const result = schema.parse(['a', 1])
result // ['a', 1]