[英]Getting intellisense working in Visual Studio 2015 for javascript function expressions
I have seen examples in Visual Studio 2015 where you can get intellisense working for JavaScript function declarations, as documented here https://msdn.microsoft.com/en-us/library/mt162307.aspx 我在Visual Studio 2015中看到了一些示例,在这些示例中,您可以获取用于JavaScript函数声明的智能感知,如此处记录的https://msdn.microsoft.com/zh-cn/library/mt162307.aspx
So for example: 因此,例如:
/** @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;
}
Give us 给我们
What I would like to know is if it is possible to get this working for functions where the function is assigned to a variable 我想知道的是,是否有可能将此功能分配给变量
/** @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;
}
This doesn't seem to work and when working on an Angular JS project where a lot of funcitons are declared like $scope.something = function()
it would be very useful. 这似乎不起作用,并且在Angular JS项目上工作时,该项目声明了许多功能,例如$scope.something = function()
这将非常有用。
Anybody know of a way to do get this working? 任何人都知道有一种方法可以使此工作正常吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.