Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valibot/src/index.ts>InferFallbacks

The modular and type safe schema library for validating structural data 🤖
Latest
type alias InferFallbacks
Re-export
import { type InferFallbacks } from "https://deno.land/x/valibot@v1.0.0-beta.7/src/index.ts";

Infer fallbacks type.

Type Parameters

TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>
definition: TSchema extends
| LooseObjectSchema<infer TEntries, ErrorMessage<LooseObjectIssue> | undefined>
| ObjectSchema<infer TEntries, ErrorMessage<ObjectIssue> | undefined>
| ObjectWithRestSchema<infer TEntries, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined>
| StrictObjectSchema<infer TEntries, ErrorMessage<StrictObjectIssue> | undefined>
? -readonly [TKey in keyof TEntries]: InferFallbacks<TEntries[TKey]> : TSchema extends
| LooseObjectSchemaAsync<infer TEntries, ErrorMessage<LooseObjectIssue> | undefined>
| ObjectSchemaAsync<infer TEntries, ErrorMessage<ObjectIssue> | undefined>
| ObjectWithRestSchemaAsync<infer TEntries, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined>
| StrictObjectSchemaAsync<infer TEntries, ErrorMessage<StrictObjectIssue> | undefined>
? -readonly [TKey in keyof TEntries]: InferFallbacks<TEntries[TKey]> : TSchema extends
| LooseTupleSchema<infer TItems, ErrorMessage<LooseTupleIssue> | undefined>
| StrictTupleSchema<infer TItems, ErrorMessage<StrictTupleIssue> | undefined>
| TupleSchema<infer TItems, ErrorMessage<TupleIssue> | undefined>
| TupleWithRestSchema<infer TItems, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<TupleWithRestIssue> | undefined>
? -readonly [TKey in keyof TItems]: InferFallbacks<TItems[TKey]> : TSchema extends
| LooseTupleSchemaAsync<infer TItems, ErrorMessage<LooseTupleIssue> | undefined>
| TupleSchemaAsync<infer TItems, ErrorMessage<TupleIssue> | undefined>
| TupleWithRestSchemaAsync<infer TItems, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<TupleWithRestIssue> | undefined>
? -readonly [TKey in keyof TItems]: InferFallbacks<TItems[TKey]> : Awaited<InferFallback<TSchema>>