让 intellisense 在 Visual Studio 2015 中为 javascript 函数表达式工作

Getting intellisense working in Visual Studio 2015 for javascript function expressions

我在 Visual Studio 2015 年看到了示例,您可以在其中让智能感知为 JavaScript 函数声明工作,如此处记录 https://msdn.microsoft.com/en-us/library/mt162307.aspx

例如:

/** @description Determines the area of a circle that has the specified radius parameter.
 * @param {number} radius The radius of the circle.
 * @return {number}
 */
function getArea(radius) {
    var areaVal;
    areaVal = Math.PI * radius * radius;
    return areaVal;
}

给我们

我想知道的是,如果函数被分配给一个变量,是否有可能让它工作

 /** @description Determines the area of a circle that has the specified radius parameter.
 * @param {number} radius The radius of the circle.
 * @return {number}
 */
var getArea = function(radius) {
    var areaVal;
    areaVal = Math.PI * radius * radius;
    return areaVal;
}

这似乎行不通,当处理一个 Angular JS 项目时,其中有很多函数被声明为 $scope.something = function() 它会非常有用。

有人知道让这个工作正常的方法吗?

仔细看看 https://www.nuget.org/packages/AngularJS.Intellisense/ 怎么样?