Search


Search something to see results

record

Type Parameters

  • Key extends PropertyKey
  • Value
  • Input = unknown

Parameters

Returns RecordSchema<Key, Value, Input>

import { x } from 'unhoax'

const schema = x.record(x.string, x.number)
type MyRecord = x.TypeOf<typeof schema>

schema.parse({ hello: 42 }) // { success: true, value: { hello: 42 } }