### Install @just-web-tech/get-set package Source: https://github.com/just-web-tech/get-set/blob/main/README.md Command to install the @just-web-tech/get-set package using npm, making it available for use in your project. ```sh npm i @just-web-tech/get-set ``` -------------------------------- ### Safely get and set object properties with dot notation in TypeScript Source: https://github.com/just-web-tech/get-set/blob/main/README.md Demonstrates how to use `getValue` and `setValue` functions to safely access and modify nested properties of an object using dot notation. This example shows retrieving a value and then updating it. ```ts const project: Project = { name: '@just-web-tech/get-set', created: new Date(), test: { framework: 'vitest', }, files: [{ folder: 'dist' }] }; const file = getValue(project, 'files.0.folder'); // 'dist' setValue(project, 'files.0.folder', 'build'); // project.files is equal to ['build'] ``` -------------------------------- ### TypeScript Path utility type example Source: https://github.com/just-web-tech/get-set/blob/main/README.md Illustrates the `Path` utility type, which generates a union of string literal paths for all properties within a given type `T`, including nested properties and array elements. ```ts type Paths = Path; // "name" | "created" | "test" | "files" // "test.framework" | `files.${number}` | `files.${number}.folder` ``` -------------------------------- ### TypeScript PathValue utility type example Source: https://github.com/just-web-tech/get-set/blob/main/README.md Shows the `PathValue` utility type, which returns the precise type of the property located at the specified path `P` within the object type `T`. ```ts type Created = PathValue; // Date ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.