I've been customizing Visual Studio Code for better compatibility with our Angular 1.5 codebase at my workplace. Here's the progress I've made so far:
- Downloaded and installed TSD
- Ran the command
tsd query -r -o -a install angular -s
- Added a reference to tsd.d.ts file at the top of each JavaScript file like this:
/// <reference path="../typings/tsd.d.ts" />
(function() {
'use strict';
angular.module('moduleName').controller('CtrlName',
['$scope', '$window',function ($scope, $window){
}
})();
Currently, I am experiencing partial success where hovering over the keyword angular
shows type-specific information (e.g. namespace angular
, var angular: ng.IAngularStatic
). However, there is no type information available for angular specific dependencies such as when hovering over $window which only indicates it is of type any
.
Here are my questions:
- What more steps do I need to take to enable proper intellisense functionality?
- Is there a workaround to avoid adding the reference at the beginning of every single JS file in order to activate intellisense?