import { tuple } from "https://deno.land/x/valibot@v0.1.0-to-json-schema/src/schemas/tuple/index.ts";
Creates a tuple schema.
Hint: This schema removes unknown items. The output will only include the
items you specify. To include unknown items, use looseTuple
. To
return an issue for unknown items, use strictTuple
. To include and
validate unknown items, use tupleWithRest
.
Type Parameters
TItems extends TupleItems
Parameters
items: TItems
The items schema.
Returns
TupleSchema<TItems, undefined>
A tuple schema.
Creates a tuple schema.
Hint: This schema removes unknown items. The output will only include the
items you specify. To include unknown items, use looseTuple
. To
return an issue for unknown items, use strictTuple
. To include and
validate unknown items, use tupleWithRest
.
Type Parameters
TItems extends TupleItems
TMessage extends ErrorMessage<TupleIssue> | undefined
Returns
A tuple schema.