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

x/valibot/src/types/other.ts>DefaultValue

The modular and type safe schema library for validating structural data 🤖
Latest
type alias DefaultValue
import { type DefaultValue } from "https://deno.land/x/valibot@v1.0.0-beta.5/src/types/other.ts";

Default value type.

Type Parameters

TDefault extends Default<BaseSchema<unknown, unknown, BaseIssue<unknown>>, null | undefined> | DefaultAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, null | undefined>
definition: TDefault extends DefaultAsync<infer TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, infer TInput> ? TDefault extends (dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<InferInput<TWrapped> | TInput> ? Awaited<ReturnType<TDefault>> : TDefault : never