所以,我发现函数中return语句之后声明的变量不会出现在VS2013 intellisense中。
一个例子:
function getService(){
var service = {
getNames: getNames
};
return service; //<--intellisense not working on variables declared
// below this line
function getNames(){
var test = {
first: '',
second: ''
};
test. //<-- here intellisense does not show
// either the test variable or the first or
// second properites of the object.
}
}
有人知道解决这个问题的方法吗? 或者我只需要重新排列代码并将return语句放在最后?
答案 0 :(得分:0)
你的例子适合我。
尝试确保启用智能感知并且没有冲突的插件。