router typescript error
See original GitHub issueWhich @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
After upgrading Angular app from 12.2.9 to 13.2.0
Trying to build/serve the app gives a typescript validation error.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Error: node_modules/@angular/router/router.d.ts:652:6 - error TS1023: An index signature parameter type must be either 'string' or 'number'.
652 [key: string | symbol]: any;
~~~
Error: node_modules/@angular/router/router.d.ts:1626:6 - error TS1023: An index signature parameter type must be either 'string' or 'number'.
1626 [key: string | symbol]: any;
~~~
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 13.1.4
Node: 16.12.0
Package Manager: npm 8.1.0
OS: win32 x64
Angular: 13.2.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.1202.15
@angular-devkit/build-angular 13.1.4
@angular-devkit/build-optimizer 0.1202.15
@angular-devkit/core 12.2.9
@angular-devkit/schematics 12.2.9
@angular/cli 13.1.4
@schematics/angular 12.2.9
rxjs 6.6.7
typescript 4.5.5
Anything else?
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Results From Across the Web
React router in typescript giving errors - Stack Overflow
When I try to compile my code and execute using gulp serve --nobrowser I get below errors. [16:49:52] Error - [tsc] node_modules/@types/react- ...
Read more >Issues in react-router when import any component in my react ...
After that, the console writes about these errors due to an importing BrowserRouter: [17:09:10] Error - [tsc] node_modules/react-router/index.d.
Read more >[Solved]-react-router Link typescript error-Reactjs
Version 4 of react-router moved a lot of the library into the react-router-dom package, which is why their types are not in the...
Read more >isRouteErrorResponse v6.6.1 - React Router
This returns true if a route error is a route error response. ... If the user visits a route that does not match...
Read more >How to Handle Errors in Express with TypeScript
Catching Errors. To handle errors, you first must catch them. You could program the best error handler, but it wouldn't matter if some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I change router.d.ts definition
It looks like work well temporary.
Thank you guys, this helped me as well!