BeastCode
BeastCode

Reputation: 2701

VSCode can't find angular.d.ts

I opened up angular code in VSCode. At first it didn't recognize angular, so used the light-bulb to add:

/// <reference path="../../typings/angularjs/angular.d.ts"/>

But it still doesn't recognize angular and now I get an error saying that it can't find angular.d.ts.

Upvotes: 2

Views: 1238

Answers (2)

garryp
garryp

Reputation: 5776

You don't need to add anything to your file, VS Code will add angular.d.ts to the typings folder. VSCode doesn't require the /// tag to be included in all your files, you might even confuse the editor doing this.

If you don't see the "typings" folder with the angular intellisense file you will not get intellisense and you need to repeat the light-bulb step.

Upvotes: 0

BeastCode
BeastCode

Reputation: 2701

It looks like the problem was that VSCode failed to download the file and create the directories. I googled angular.d.ts and found it on GitHub - DefinitelyTyped

I created "typings/angularj/" folders and added the file and now intellisense is working for angular :)

Upvotes: 2

Related Questions