import { getFallbacks } from "https://deno.land/x/valibot@v0.30.0/mod.ts";
Returns the fallback values of the schema.
Hint: The difference to getFallback
is that for objects and tuples without
an explicit fallback value, this function recursively returns the fallback
values of the subschemas instead of undefined
.
Type Parameters
TSchema extends SchemaWithMaybeFallback<BaseSchema | ObjectSchema<ObjectEntries, any> | TupleSchema<TupleItems, any>>
Parameters
schema: TSchema
The schema to get the fallback values from.
Returns
FallbackValues<TSchema> | undefined
The fallback values.