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

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

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
type alias InferFallback
Re-export
import { type InferFallback } from "https://deno.land/x/valibot@v1.0.0-beta.2-to-json-schema/src/methods/index.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