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

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

The modular and type safe schema library for validating structural data 🤖
Go to Latest
function getFallbacks
import { getFallbacks } from "https://deno.land/x/valibot@v0.41.0/src/methods/getFallbacks/index.ts";

Returns the fallback values of the schema.

Hint: The difference to getFallback is that for object and tuple schemas this function recursively returns the fallback values of the subschemas instead of undefined.

Parameters

schema: TSchema

The schema to get them from.

Returns

The fallback values.