import { pick } from "https://deno.land/x/valibot@v0.22.0/src/index.ts";
Creates an object schema that contains only the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends (keyof TSchema["entries"])[]
Creates an object schema that contains only the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends (keyof TSchema["entries"])[]
Parameters
optional
pipe: Pipe<ObjectOutput<Pick<TSchema["entries"], TKeys[number]>, undefined>>A validation and transformation pipe.
Creates an object schema that contains only the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends (keyof TSchema["entries"])[]
TRest extends BaseSchema | undefined
Creates an object schema that contains only the selected keys of an existing schema.
Type Parameters
TSchema extends ObjectSchema<any, any>
TKeys extends (keyof TSchema["entries"])[]
TRest extends BaseSchema | undefined
Parameters
optional
pipe: Pipe<ObjectOutput<Pick<TSchema["entries"], TKeys[number]>, TRest>>A validation and transformation pipe.