Element implicitly has an 'any' type because type 'Icons' has no index signature.
See original GitHub issueI’m getting the above mentioned error:
ERROR in C:/.../node_modules/angular2-notifications/src/simple-notifications/services/notifications.service.ts (51,72): Element implicitly has an 'any' type because type 'Icons' has no index signature.
ERROR in C:/.../node_modules/angular2-notifications/src/simple-notifications/services/notifications.service.ts (51,72): Element implicitly has an 'any' type because type 'Icons' has no index signature.
For some reason the angular2-notifications in the node_modules folder contains the typescript src folder and that one is being used instead of the dist folder. Any ideas how to solve it?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (8 by maintainers)
Top Results From Across the Web
How do I prevent the error "Index signature of object type ...
How do I prevent the error "Index signature of object type implicitly has an 'any' type" when compiling typescript with noImplicitAny flag enabled?...
Read more >Element implicitly has an 'any' type because ... - GitHub
No index signature with a parameter of type 'string' was found on type 'DbInterface'. db[modelName].associate(db); //Element implicitly has ...
Read more >element implicitly has an 'any' type because ... - You.com
Error: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<Personality, Result>'. No index signature...
Read more >[HELP] No index signature with a parameter of type 'string ...
... Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'unknown'. No index signature with...
Read more >No index signature with a parameter of type 'string' was found ...
We got the error when we tried to access an object that has name and country properties. TypeScript is telling us that the...
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
@flauc , that’s odd, because ts with noImplicitAny option would never allow code like
this.icons[type]
. As I wrote in comment in related commit you can easily fix this with(<any>this.icons)[type]
hmm
I do have:
"noImplicitAny": true,
in the tsconfig.json