redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

Angular v15 Application Broken After Migrating redux-devtools-extension package moved to @redux-devtools/extension

Open khetaramsb opened this issue 2 years ago • 2 comments

Issue Overview: After redux-devtools-extension package moved to @redux-devtools/extension package, I am encountering TypeScript errors in my project. These errors seem to be related to type definitions in the package.

Errors Encountered:

  1. Error in developmentOnly.d.ts:

    • Error Message: "Generic type 'StoreEnhancer' requires 1 type argument(s)."
    • Line: 4
    • Code: export declare const devToolsEnhancer: (options?: EnhancerOptions) => StoreEnhancer;
  2. Error in index.d.ts:

    • Error Message: "Type 'Action' is not generic."
    • Line: 216
    • Code: send: (action: Action<string>, state: unknown) => void;
  3. Error in index.d.ts:

    • Error Message: "Generic type 'StoreEnhancer' requires 1 type argument(s)."
    • Line: 219
    • Code: (config?: Config): StoreEnhancer;
  4. Error in index.d.ts:

    • Error Message: "Generic type 'StoreEnhancer' requires 1 type argument(s)."
    • Line: 237
    • Code: export declare const devToolsEnhancer: (options?: EnhancerOptions) => StoreEnhancer;
  5. Error in logOnly.d.ts:

    • Error Message: "Generic type 'StoreEnhancer' requires 1 type argument(s)."
    • Line: 5
    • Code: export declare const devToolsEnhancer: (options?: EnhancerOptions) => StoreEnhancer;
  6. Error in logOnlyInProduction.d.ts:

    • Error Message: "Generic type 'StoreEnhancer' requires 1 type argument(s)."
    • Line: 4
    • Code: export declare const devToolsEnhancer: (options?: EnhancerOptions) => StoreEnhancer;

Context: These errors are occurring during the build process of my project and are preventing the successful compilation of the TypeScript code. This issue has a significant impact on my project's functionality.

package.json file Screenshot 2023-11-06 at 5 25 00 PM Screenshot 2023-11-06 at 6 10 51 PM

Configuration:

  • My project's TypeScript configuration (tsconfig.json) includes.

Reproduction Steps: If necessary, I can provide a minimal code example that triggers these errors.

Environment Information:

  • Node.js version: v14.20.0
  • npm : 6.14.17
  • Angular CLI: 15.2.10
    Workarounds Attempted: I have tried please see below error in the screenshot . Screenshot 2023-11-06 at 5 27 03 PM

thunkMiddleware File Screenshot 2023-11-06 at 5 27 47 PM

ProjectStore file Screenshot 2023-11-06 at 5 29 42 PM tsconfig.json Screenshot 2023-11-06 at 5 32 13 PM

I appreciate your help in resolving these TypeScript errors in the @redux-devtools/extension package.

khetaramsb avatar Nov 06 '23 12:11 khetaramsb