Options
All
  • Public
  • Public/Protected
  • All
Menu

Tuple field. When creating a value with this schema, all the values must be provided even if it's a optional field.

example
const schema = fields.tuple(fields.constant("hello" as const), fields.number(), fields.boolean());

schema.create("hello", 1, true);

Type parameters

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

values

values: T

Accessors

name

  • get name(): string

type

  • get type(): string

Methods

check

  • check(value: unknown): boolean

create

  • create(value: { [ P in string | number | symbol]: T[P] extends FieldModel<T> ? T : never }): { [ P in string | number | symbol]: T[P] extends FieldModel<T> ? T : never }

validate

  • validate(value: unknown, key?: string): true

Generated using TypeDoc