question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Element implicitly has an 'any' type because type 'Icons' has no index signature.

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
Sky4CEcommented, May 22, 2017

@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]

2reactions
flauccommented, May 19, 2017

hmm

I do have: "noImplicitAny": true, in the tsconfig.json

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found