Here is a simple repository to reproduce the issue:
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
)?
CodePudding user response:
Update
The issue is fixed in version 11.3.1
mathJs Fix #2812
Original
I think the issue is that the library contains an index.ts
file and an index.d.ts
file which are not related and this should be fixed by the library authors: see this discussion
Workarounds for now:
- rename
node_modules/types/index.ts
tonode_modules/types/main.ts
- or delete
node_modules/types/index.ts