When using javascript (es2015) imports the Intellisense seems to be broken.
When I am working in the same file, VSC autosuggests the methods from the object with the correct JSDoc information.
However, when importing the Class in another file, the Intellisense seems to be completely broken ( david.david, wtf? ).
Do I need to adjust any settings in Visual Studio Code to get this working? I tried adjusted my jsconfig file to es2015 imports and es6 as but that didn't work.
My jsconfig.json:
{
"compilerOptions": {
"module": "es6"
}
}
If the IntelliSense is installed and still not working then most of the time restarting/reloading the program will solve the issue. So give it a try. Step 1: To restart VS Code open VS Code and press Ctrl + Shift + P keys together to open the command palette and type Reload Window in the search.
To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.
Because you are using export
without default
you need to enable allowSyntheticDefaultImports
{
"compilerOptions": {
"target": "es6",
"allowSyntheticDefaultImports": true
}
}
The same occurs with
import fs from 'fs';
import axios from 'axios';
And others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With