This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Utility methods for nested object | |
| * read and write operations on objects. | |
| */ | |
| /** | |
| * Path - A recursive type to determine the path of nested properties in an object. | |
| * @template T - The object type to extract paths from. | |
| * @returns A union type of string paths representing the nested properties. | |
| * @example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Person { | |
| name: string; | |
| age: number; | |
| } | |
| const person: Person = { | |
| name: "Sam", | |
| age: 30 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Dot Notation Type Utility | |
| * | |
| * This utility type converts an object type into a dot notation string type. | |
| * It recursively traverses the object properties and constructs a string | |
| * representation of the paths to each property, using dot notation. | |
| * | |
| * @example | |
| * type Example = { | |
| * user: { |