Deep Utility Types is a TypeScript-focused library providing advanced utility types for performing operations like `Omit`, `Pick`, `Require`, and `Optional` on nested object structures. Unlike standard TypeScript utility types, this library supports dot-notation for accessing and modifying properties at any depth within an object, including handling arrays. It is fully type-safe, offers excellent autocompletion support in IDEs, and includes a mechanism for ignoring specific types (like large classes or built-ins) to improve type-checker performance and reduce noise in autocompletion suggestions. The current stable version is 1.3.1, with releases typically focusing on bug fixes and incremental features, such as exposing internal types for broader use. Its primary differentiator is its robust deep-nesting support and type-safety for complex object manipulations, which is not natively provided by TypeScript.
npm install deep-utility-typesVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use `DeepOmit` to create a new type by removing specified nested properties using dot notation.
Ensure you are using `import` statements and only leveraging these constructs at the TypeScript compilation level, not at runtime.
Update to `deep-utility-types@1.3.1` or newer to ensure correct handling of unions within `KeysAsDotNotation`.
Upgrade to `deep-utility-types@1.3.0` or later to access `KeysAsDotNotation` and `DefaultIgnoredTypes`.
Pass the specific types to ignore as the third generic argument (e.g., `DeepOmit<MyType, 'key', SomeLargeClass>`) or leverage the exported `DefaultIgnoredTypes`.
Install the package: `npm install --save-dev deep-utility-types` or `yarn add --dev deep-utility-types`. Ensure your files are being processed by TypeScript and `tsconfig.json` includes the relevant directories.
Carefully review the keys provided to `DeepOmit` or `DeepPick` to ensure they accurately reflect the desired output type. If properties should be optional, consider using `DeepOptional` or explicitly marking the resultant type as `Partial<T>` if the intention is to allow partial assignment.
No dependency data recorded yet.