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

x/deco/utils/object.ts>DeepPick

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
type alias DeepPick
import { type DeepPick } from "https://deno.land/x/deco@1.57.30/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>