import { PropPathCheckTargetType } from "./propertyPath"; export type PropPathType = string extends Path ? never : Path extends keyof T ? T[Path] : Path extends `${infer K}.${infer R}` ? K extends keyof T ? PropPathType : never : never; /** * Get a value from a property path and preserv type of the target on that path * * Example: * let test:string = propertyPathValue(instance,'Prop1.Prop2'); //will only work if type is also string for the path * let test2 = propertyPathValue(instance,'Prop1.Prop2'); //test2 will have the same type as Prop2 * * * @param obj The object to get value from by path * @param path The object property path to get */ export declare const propertyPathValue: (obj: T, path: PropPathCheckTargetType>) => PropPathType;