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

x/valibot/src/types/index.ts>DeepPickN

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

Deeply picks N specific keys.

Type Parameters

TInput
TPathList extends readonly PathKeys<TInput>[]
definition: TPathList extends readonly [infer TPathKeys extends PathKeys<TInput>, ...infer TRest extends PathKeys<TInput>[]] ? TRest extends readonly [unknown, ...(readonly unknown[])] ? DeepMerge<DeepPick<TInput, TPathKeys>, DeepPickN<TInput, TRest>> : DeepPick<TInput, TPathKeys> : TInput