import { tuple } from "https://deno.land/x/valibot@v1.0.0-beta.2-to-json-schema/src/schemas/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.