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

x/valibot/mod.ts>getFallbackAsync

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function getFallbackAsync
Re-export
import { getFallbackAsync } from "https://deno.land/x/valibot@v0.28.1/mod.ts";

Returns the fallback value of the schema.

Type Parameters

TSchema extends SchemaWithMaybeFallback | SchemaWithMaybeFallbackAsync

Parameters

schema: TSchema

The schema to get the fallback value from.

optional
info: FallbackInfo

The fallback info.

Returns

Promise<FallbackValue<TSchema>>

The fallback value.