Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@ngrx/effects] Throws errors with typescript@4.8.2 #3547

Closed
1 of 2 tasks
AleksanderMerhar opened this issue Aug 26, 2022 · 0 comments · Fixed by #3548
Closed
1 of 2 tasks

[@ngrx/effects] Throws errors with typescript@4.8.2 #3547

AleksanderMerhar opened this issue Aug 26, 2022 · 0 comments · Fixed by #3548
Assignees
Labels

Comments

@AleksanderMerhar
Copy link

Minimal reproduction of the bug/regression with instructions

Install "typescript" 4.8.2 with "@ngrx/effects" 14.3.0 using npm.

Minimal reproduction of the bug/regression with instructions

Should not throw any errors in node_modules

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)

All versions are latest.
Angular: 14,
Node: latest
OS: Windows,
Browser: Chromium,
"@ngrx/effects": "~14.3.0",
"@ngrx/store": "~14.3.0"

Other information

Stack trace:

Error: node_modules/@ngrx/effects/src/effect_decorator.d.ts:7:84 - error TS2344: Type 'T' does not satisfy the constraint 'Object'.

7 export declare function getEffectDecoratorMetadata<T>(instance: T): EffectMetadata<T>[];    
                                                                                     ~        

  node_modules/@ngrx/effects/src/effect_decorator.d.ts:7:52
    7 export declare function getEffectDecoratorMetadata<T>(instance: T): EffectMetadata<T>[];                                                         ~
    This type parameter might need an `extends Object` constraint.


Error: node_modules/@ngrx/effects/src/effects_metadata.d.ts:3:75 - error TS2344: Type 'T' does not satisfy the constraint 'Object'.

3 export declare function getSourceMetadata<T>(instance: T): EffectMetadata<T>[];
                                                                            ~

Error: node_modules/@ngrx/effects/src/models.d.ts:25:31 - error TS2344: Type 'T' does not satisfy the constraint 'Object'.

25     [key in EffectPropertyKey<T>]?: EffectConfig;
                                 ~

  node_modules/@ngrx/effects/src/models.d.ts:24:37
    24 export declare type EffectsMetadata<T> = {
                                           ~
    This type parameter might need an `extends Object` constraint.




** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


× Failed to compile.

I would be willing to submit a PR to fix this issue

  • Yes
  • No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants