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

x/valibot/src/methods/omit/omit.ts>SchemaWithOmit

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

Schema with omit type.

Type Parameters

TSchema extends Schema
TKeys extends ObjectKeys<TSchema>
definition: TSchema extends ObjectSchema<infer TEntries, ErrorMessage<ObjectIssue> | undefined> | StrictObjectSchema<infer TEntries, ErrorMessage<StrictObjectIssue> | undefined> ? Omit<TSchema,
| "entries"
| "~standard"
| "~run"
| "~types"
> & { readonly entries: Omit<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Omit<TEntries, TKeys[number]>>, InferObjectOutput<Omit<TEntries, TKeys[number]>>>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferObjectOutput<Omit<TEntries, TKeys[number]>>, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>>; readonly ~types?: { readonly input: InferObjectInput<Omit<TEntries, TKeys[number]>>; readonly output: InferObjectOutput<Omit<TEntries, TKeys[number]>>; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends ObjectSchemaAsync<infer TEntries, ErrorMessage<ObjectIssue> | undefined> | StrictObjectSchemaAsync<infer TEntries, ErrorMessage<StrictObjectIssue> | undefined> ? Omit<TSchema,
| "entries"
| "~standard"
| "~run"
| "~types"
> & { readonly entries: Omit<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Omit<TEntries, TKeys[number]>>, InferObjectOutput<Omit<TEntries, TKeys[number]>>>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferObjectOutput<Omit<TEntries, TKeys[number]>>, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>>>; readonly ~types?: { readonly input: InferObjectInput<Omit<TEntries, TKeys[number]>>; readonly output: InferObjectOutput<Omit<TEntries, TKeys[number]>>; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends LooseObjectSchema<infer TEntries, ErrorMessage<LooseObjectIssue> | undefined> ? Omit<TSchema,
| "entries"
| "~standard"
| "~run"
| "~types"
> & { readonly entries: Omit<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }, InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>>; readonly ~types?: { readonly input: InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly output: InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends LooseObjectSchemaAsync<infer TEntries, ErrorMessage<LooseObjectIssue> | undefined> ? Omit<TSchema,
| "entries"
| "~standard"
| "~run"
| "~types"
> & { readonly entries: Omit<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }, InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>>>; readonly ~types?: { readonly input: InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly output: InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends ObjectWithRestSchema<infer TEntries, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined> ? Omit<TSchema,
| "entries"
| "~standard"
| "~run"
| "~types"
> & { readonly entries: Omit<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }, InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>>; readonly ~types?: { readonly input: InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }; readonly output: InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>; } | undefined; } : TSchema extends ObjectWithRestSchemaAsync<infer TEntries, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined> ? Omit<TSchema,
| "entries"
| "~standard"
| "~run"
| "~types"
> & { readonly entries: Omit<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }, InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>>>; readonly ~types?: { readonly input: InferObjectInput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }; readonly output: InferObjectOutput<Omit<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Omit<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>; } | undefined; } : never