Here is a simple repository to reproduce the issue: https://github.com/tmtron/mathjs-typescript-types
Stackblitz works
Code completion works fine when we open the project in Stackblitz:
IntelliJ does not work
For some reason, code-completion in IntelliJ (2022.2.3 Ultimate) does not work:
When I Ctrl+Click the MathJsStatic
import symbol, IntelliJ shows 2 options:
And it seems to use the wrong one (defined in node_modules/mathjs/types/index.ts
):
Question
How can we make IntelliJ use the correct types from index.d.ts
(and ignore index.ts
)?