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

x/valibot/src/index.ts>SchemaWithRequired

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
type alias SchemaWithRequired
import { type SchemaWithRequired } from "https://deno.land/x/valibot@v0.35.0/src/index.ts";

Schema with required type.

Type Parameters

TSchema extends Schema
TKeys extends ObjectKeys<TSchema> | undefined
TMessage extends ErrorMessage<NonOptionalIssue> | undefined
definition: TSchema extends ObjectSchema<infer TEntries, ErrorMessage<ObjectIssue> | undefined> | StrictObjectSchema<infer TEntries, ErrorMessage<StrictObjectIssue> | undefined> ? Omit<TSchema, "entries" | "_run" | "_types"> & { readonly entries: RequiredEntries<TEntries, TKeys, TMessage>; readonly _types?: { readonly input: InferObjectInput<RequiredEntries<TEntries, TKeys, TMessage>>; readonly output: InferObjectOutput<RequiredEntries<TEntries, TKeys, TMessage>>; readonly issue: NonOptionalIssue | InferIssue<TSchema>; }; _run(dataset: Dataset<unknown, never>, config: Config<InferIssue<TSchema>>): Dataset<InferObjectOutput<RequiredEntries<TEntries, TKeys, TMessage>>, NonOptionalIssue | InferIssue<TSchema>>; } : TSchema extends LooseObjectSchema<infer TEntries, ErrorMessage<LooseObjectIssue> | undefined> ? Omit<TSchema, "entries" | "_run" | "_types"> & { readonly entries: RequiredEntries<TEntries, TKeys, TMessage>; readonly _types?: { readonly input: InferObjectInput<RequiredEntries<TEntries, TKeys, TMessage>> & { [key: string]: unknown; }; readonly output: InferObjectOutput<RequiredEntries<TEntries, TKeys, TMessage>> & { [key: string]: unknown; }; readonly issue: NonOptionalIssue | InferIssue<TSchema>; }; _run(dataset: Dataset<unknown, never>, config: Config<InferIssue<TSchema>>): Dataset<InferObjectOutput<RequiredEntries<TEntries, TKeys, TMessage>> & { [key: string]: unknown; }, NonOptionalIssue | InferIssue<TSchema>>; } : TSchema extends ObjectWithRestSchema<infer TEntries, infer TRest, ErrorMessage<ObjectWithRestIssue> | undefined> ? Omit<TSchema, "entries" | "_run" | "_types"> & { readonly entries: RequiredEntries<TEntries, TKeys, TMessage>; readonly _types?: { readonly input: InferObjectInput<RequiredEntries<TEntries, TKeys, TMessage>> & { [key: string]: InferInput<TRest>; }; readonly output: InferObjectOutput<RequiredEntries<TEntries, TKeys, TMessage>> & { [key: string]: InferOutput<TRest>; }; readonly issue: NonOptionalIssue | InferIssue<TSchema>; }; _run(dataset: Dataset<unknown, never>, config: Config<InferIssue<TSchema>>): Dataset<InferObjectOutput<RequiredEntries<TEntries, TKeys, TMessage>> & { [key: string]: InferOutput<TRest>; }, NonOptionalIssue | InferIssue<TSchema>>; } : never