export type PropPathCheckTargetType = string extends Path ? never : Path extends keyof T ? (T[Path] extends TargetType ? `${Path}` : never) : Path extends `${infer K}.${infer R}` ? K extends keyof T ? PropStartPathCheckTargetType : never : never; type PropStartPathCheckTargetType = string extends Path ? never : Path extends keyof T ? (T[Path] extends TargetType ? `${StartPath}` : never) : Path extends `${infer K}.${infer R}` ? K extends keyof T ? PropStartPathCheckTargetType : never : never; /** * Returns the property path as string if valid for type, else compile error (Argument of type string is not assignable to never). * * Option: You can also make sure the path has a desired type propertyPath<,TargetType> * * Example: * propertyPath()('PropertyName1.SomeSubProperty.SomeSubSubProperty'), note: propertyPath() * * or * * propertyPath()('PropertyName1.SomeSubProperty.SomeSubSubProperty'), this will ensure that the IPropertyPathTargetType is the TargetType * for the specified path * * Gives compile error if property path is not valid for type StartType, i.e. a type safe way to handle property paths as string values * @param name * @returns {string} 'PropertyName1.SomeSubProperty.SomeSubSubProperty' as string */ export declare const propertyPath: () => (propertyPathToCheck: PropPathCheckTargetType) => string; export {};