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

x/blocks/utils/object.ts>DeepPick

deco is the edge-native site editor and app framework for building dynamic, high-performance sites with a built-in visual admin UI.
Go to Latest
type alias DeepPick
import { type DeepPick } from "https://deno.land/x/blocks@1.28.0-beta.4/utils/object.ts";
definition: T extends null ? never : UnionToIntersection<T extends (infer TE)[] ? Path extends DotNestedKeys<TE> ? DeepPick<TE, Path>[] : never : Path extends keyof T ? [key in Path]: T[key] : Path extends `${infer first}.${infer rest}` ? first extends keyof T ? rest extends DotNestedKeys<T[first]> ? [k in first]: DeepPick<Required<T>[k], rest> : Required<T>[first] extends (infer E1)[] ? rest extends DotNestedKeys<E1> ? [k in first]: Required<T>[k] extends any[] ? DeepPick<Required<E1>, rest> : never : never : never : never : never>