如何添加到VSC intellisense javascript模块?

时间:2018-10-08 18:06:13

标签: javascript visual-studio-code vscode-settings

我正在研究骨干项目,并使用define方法创建该项目的模块,而且所有项目都是节点应用程序。 这是一个仅包含一个简单对象的简单模块的示例。

define("UAStrings", [], function() {
  var UAStrings = {
    Screensaver: "Screensaver",
    ScreensaverOff: "ScreensaverOff",
    Home: "Home",
    Plan: "Plan",
    Destination: "Destination",
    ComingSoon: "ComingSoon",
    Services: "Services",
    StoresAZ: "Screen Destinations A - Z" ,
    Themes: "Screen Destinations Themes",
    Restaurants: "Sreen Restaurants",
    Promotions: "Promotions",
  };

  return UAStrings;
});

在VSC中,intellisense不会为我带来UAStrings对象的属性,而且这发生在我所有的JS文件中,intellisense没有连接。

你能帮我吗?

这是我实际的jsconfig.json文件:

{
  "compilerOptions": {
    "target": "ES6",
    "module": "amd"
  },
  "exclude": [
    "node_modules",
    "**/node_modules/*"
  ],
  "include": [
    "src/js/**/*"
  ]
}

0 个答案:

没有答案