import { type SchemaWithPick } from "https://deno.land/x/valibot@v1.0.0-beta.7/src/methods/index.ts";
Schema with pick type.
Type Parameters
TKeys extends ObjectKeys<TSchema>
definition: TSchema extends ObjectSchema<infer TEntries, ErrorMessage<ObjectIssue> | undefined> | StrictObjectSchema<infer TEntries, ErrorMessage<StrictObjectIssue> | undefined> ? Omit<TSchema, > & { readonly entries: Pick<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Pick<TEntries, TKeys[number]>>, InferObjectOutput<Pick<TEntries, TKeys[number]>>>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferObjectOutput<Pick<TEntries, TKeys[number]>>, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>>; readonly ~types?: { readonly input: InferObjectInput<Pick<TEntries, TKeys[number]>>; readonly output: InferObjectOutput<Pick<TEntries, TKeys[number]>>; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends ObjectSchemaAsync<infer TEntries, ErrorMessage<ObjectIssue> | undefined> | StrictObjectSchemaAsync<infer TEntries, ErrorMessage<StrictObjectIssue> | undefined> ? Omit<TSchema, > & { readonly entries: Pick<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Pick<TEntries, TKeys[number]>>, InferObjectOutput<Pick<TEntries, TKeys[number]>>>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferObjectOutput<Pick<TEntries, TKeys[number]>>, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>>>; readonly ~types?: { readonly input: InferObjectInput<Pick<TEntries, TKeys[number]>>; readonly output: InferObjectOutput<Pick<TEntries, TKeys[number]>>; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends LooseObjectSchema<infer TEntries, ErrorMessage<LooseObjectIssue> | undefined> ? Omit<TSchema, > & { readonly entries: Pick<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }, InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>>; readonly ~types?: { readonly input: InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly output: InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends LooseObjectSchemaAsync<infer TEntries, ErrorMessage<LooseObjectIssue> | undefined> ? Omit<TSchema, > & { readonly entries: Pick<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }, InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>>>; readonly ~types?: { readonly input: InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly output: InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: unknown; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>>; } | undefined; } : TSchema extends ObjectWithRestSchema<infer TEntries, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined> ? Omit<TSchema, > & { readonly entries: Pick<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }, InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>>; readonly ~types?: { readonly input: InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }; readonly output: InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>; } | undefined; } : TSchema extends ObjectWithRestSchemaAsync<infer TEntries, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined> ? Omit<TSchema, > & { readonly entries: Pick<TEntries, TKeys[number]>; readonly ~standard: StandardSchemaProps<InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }, InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }>; readonly ~run: (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }, Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>>>; readonly ~types?: { readonly input: InferObjectInput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferInput<TSchema["rest"]>; }; readonly output: InferObjectOutput<Pick<TEntries, TKeys[number]>> & { [key: string]: InferOutput<TSchema["rest"]>; }; readonly issue: Extract<InferIssue<TSchema>, { type: TSchema["type"]; }> | InferObjectIssue<Pick<TEntries, TKeys[number]>> | InferIssue<TSchema["rest"]>; } | undefined; } : never
| "entries"
| "~standard"
| "~run"
| "~types"
| "entries"
| "~standard"
| "~run"
| "~types"
| "entries"
| "~standard"
| "~run"
| "~types"
| "entries"
| "~standard"
| "~run"
| "~types"
| "entries"
| "~standard"
| "~run"
| "~types"
| "entries"
| "~standard"
| "~run"
| "~types"