react-redux-typescript provides a robust collection of advanced TypeScript utility types, primarily focusing on 'Mapped Types' for complex object and key manipulation. As of version 3.11.0, it offers types like `DiffKeys`, `Omit`, `Assign`, `Overwrite`, `DeepReadonly`, `Optional`, `Required`, `Mutable`, and `UnionToIntersection`. It also includes a utility function `getReturnOfExpression` for inferring function return types. The library is actively maintained with frequent minor releases, though its name can be misleading as the React/Redux-specific parts (re-exports from `typesafe-actions`) are deprecated and slated for removal in future major versions. A key differentiator is its commitment to thorough type correctness testing, zero third-party runtime dependencies for its core utility types, and providing separate bundles for various module workflows (CommonJS, ES Module).
npm install react-redux-typescriptVerified import paths — ran on the pinned version, not inferred.
Demonstrates `Omit`, `Assign`, and `DeepReadonly` utility types for manipulating object shapes and immutability.
Replace `import { createAction } from 'react-redux-typescript';` with `import { createAction } from 'typesafe-actions';` for affected symbols.Replace `Falsey` with `Falsy` in your type definitions.
Be aware that the primary value of this library lies in its general TypeScript utility types. Consider `utility-types` as a more fitting alternative if not using the specific types offered here, though this library often provides more advanced versions.
Ensure you are using a recent version of `react-redux-typescript` (v3.6.1 or later) to benefit from the corrected `Omit` type. Always test thoroughly when upgrading TypeScript versions in combination with this library.
Ensure that if you are using types like `DeepReadonly<T>`, you do not attempt to modify any properties, including nested ones. Create a mutable copy if modification is necessary.
Use ES Module import syntax: `import { OmitKeys } from 'react-redux-typescript';` Ensure your `tsconfig.json` `module` and `moduleResolution` settings are appropriate for your environment (e.g., 'NodeNext' or 'Bundler').Verify that the keys you are attempting to `Omit` or `Pick` (`K`) are indeed present in the base type `T`. TypeScript's strictness prevents operating on non-existent keys, which helps catch typos.
No dependency data recorded yet.