import { type DeepPick } from "https://deno.land/x/live@1.53.6/utils/object.ts";
Type Parameters
Path extends DotNestedKeys<T>
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>