Reputation: 3034
For context, I'm writing a Node-TypeScript project and using IntellIJ Ultimate 2018.1.5
All was well until I started using the Node AWS SDK. Now, every time I specify a Function
type, IDEA keeps pestering me to import it from aws-sdk/clients/greengrass
.
How do I tell IntelliJ that I just want ordinary, inbuilt, Functions
, not "Greengrass" functions?
Upvotes: 2
Views: 824
Reputation: 93728
Such prompts may appear if you have a file in your source code/project dependencies that exports a module with a name matching built-in object name. For example, node_modules/aws-sdk/clients/greengrass.d.ts
exports interface Function
, so IDEA suggests importing it. For such names conflicts, excluding one of these conflicting libraries from indexing is the only way to go for now.
For example, you can try marking the corresponding .d.ts/.js
file as plain text (Mark as plain text in file right-click menu)
We have a feature request to always prefer built-in types in such cases, WEB-34452, please feel free to vote for it
Upvotes: 3