Running on Visual Studio 2017 with the new Javascript Language Service enabled:
1) Create a ASP.NET Core Web Application
2) NPM Install a package which includes a d.ts definitions (eg npm install axios)
3) Try to consume the installed js in a plain js file (not in a typescript file!)
4) You don't get any intellisense
If you import the library intelisense lights up:
So my question is:
What is the correct way to get intellisense without importing the module?
I think if you go to Tools -> Options then go down to the Text Editor branch, expand that and go to JavaScript branch, then expand that and go to Intellisense. There you can explicitly add a reference or you can check a box to download remote references. I haven't tried this but I think it should work, also I'm working off VS2015 so things may be different.
Hope it helps!
This is a confirmed bug.
You can track the issue here: https://github.com/Microsoft/TypeScript/issues/20993
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.