0
votes

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 (e.g. 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

enter image description here

If you import the library intelisense lights up:

enter image description here

So my question is:

What is the correct way to get intellisense without importing the module?

2

2 Answers

0
votes

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!