import { Prettify } from "../prettify"; type ExtractFromObject, Key> = Key extends keyof Obj ? Obj[Key] : Key extends keyof NonNullable ? NonNullable[Key] | undefined : undefined; type ExtractFromArray = any[] extends Arr ? Arr extends readonly (infer T)[] ? T | undefined : undefined : Key extends keyof Arr ? Arr[Key] : undefined; type GetWithArray> = Path extends [] ? Type : Path extends [infer Key, ...infer Rest] ? PrettifiedType extends Record ? GetWithArray, Rest> : Type extends readonly any[] ? GetWithArray, Rest> : undefined : never; type Path = Type extends `${infer Key}.${infer Rest}` ? [Key, ...Path] : Type extends `${infer Key}` ? [Key] : []; export type PathValue = GetWithArray>; export {};