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

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

The modular and type safe schema library for validating structural data 🤖
Go to Latest
type alias DeepPickN
import { type DeepPickN } from "https://deno.land/x/valibot@v1.0.0-beta.4/src/types/utils.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