import { omit } from "https://deno.land/x/valibot@v0.24.0/src/methods/index.ts";
Creates an object schema that contains not the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends ObjectKeys<TSchema>
Returns
ObjectSchema<Omit<TSchema["entries"], TKeys[number]>>
An object schema.
Creates an object schema that contains not the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends ObjectKeys<TSchema>
Parameters
schema: TSchema
The schema to omit from.
keys: TKeys
The selected keys
optional
message: ErrorMessageThe error message.
optional
pipe: Pipe<ObjectOutput<Omit<TSchema["entries"], TKeys[number]>, undefined>>A validation and transformation pipe.
Returns
ObjectSchema<Omit<TSchema["entries"], TKeys[number]>>
An object schema.
Creates an object schema that contains not the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends ObjectKeys<TSchema>
TRest extends BaseSchema | undefined
Returns
ObjectSchema<Omit<TSchema["entries"], TKeys[number]>, TRest>
An object schema.
Creates an object schema that contains not the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends ObjectKeys<TSchema>
TRest extends BaseSchema | undefined
Parameters
schema: TSchema
The schema to omit from.
keys: TKeys
The selected keys
rest: TRest
The object rest.
optional
message: ErrorMessageThe error message.
optional
pipe: Pipe<ObjectOutput<Omit<TSchema["entries"], TKeys[number]>, TRest>>A validation and transformation pipe.
Returns
ObjectSchema<Omit<TSchema["entries"], TKeys[number]>, TRest>
An object schema.