Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
javascript中的VS2013智能感知_Javascript_Visual Studio 2013_Intellisense_Javascript Intellisense - Fatal编程技术网

javascript中的VS2013智能感知

javascript中的VS2013智能感知,javascript,visual-studio-2013,intellisense,javascript-intellisense,Javascript,Visual Studio 2013,Intellisense,Javascript Intellisense,因此,我发现函数中return语句之后声明的变量不会显示在VS2013 intellisense中 例如: function getService(){ var service = { getNames: getNames }; return service; //<--intellisense not working on variables declared // below this line function ge

因此,我发现函数中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语句放在最后?

您的示例对我来说很好

尝试确保启用了intellisense,并且没有冲突的插件


嗯,return语句后面的代码没有多大意义。所以,是的,重新安排似乎是一条路要走here@G在这种情况下,返回后的代码是有意义的;GetName在getService中仍然可用。因此,我可能会提交一个bug报告,并将返回放在函数末尾。@jgillich将此函数放在return语句后面有什么意义?好处是什么?你的例子对我来说很好对我来说intellisense一直有点不可靠。但请记住,您始终可以使用ctrl-space手动触发它。谢谢您的尝试。我还是不能让它工作。Intellisense已启用,我没有任何相关/冲突的插件。你知道为什么会这样吗?@Molotch不,对不起。我建议您关闭此问题并向Microsoft提交错误报告。