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

x/valibot/src/methods/getFallback/getFallback.ts>InferFallback

The modular and type safe schema library for validating structural data 🤖
Latest
type alias InferFallback
import { type InferFallback } from "https://deno.land/x/valibot@v1.0.0-beta.1-i18n/src/methods/getFallback/getFallback.ts";

Infer fallback type.

Type Parameters

TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>
definition: TSchema extends SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, infer TFallback> | SchemaWithFallbackAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, infer TFallback> ? TFallback extends InferOutput<TSchema> ? TFallback : TFallback extends () => MaybePromise<InferOutput<TSchema>> ? ReturnType<TFallback> : never : undefined