【问题标题】:Typescript 2.0 + VS 2015 @types not workingTypescript 2.0 + VS 2015 @types 不工作
【发布时间】:2017-02-05 19:00:57
【问题描述】:

我正在使用:

Visual Studio 2015 with NodeJs Tools 1.2
TypeScript 2.0 (updated from 1.8)

当我使用tsc 编译打字稿时,一切正常。

但在 Visual Studio 中找不到 express 等模块。

我的 tsconfig:

{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "moduleResolution": "node",
    "declaration": false,
    "sourceMap": false,
    "noImplicitAny": false,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "rootDir": "src/",
    "outDir": "target/"
  },
  "exclude": [
    "node_modules",
    "target"
  ]
}

我将快速输入安装为

"@types/express": "^4.0.33",

我喜欢使用它

import * as express from 'express';

但未找到模块。仅在视觉工作室中

【问题讨论】:

    标签: node.js visual-studio typescript typescript2.0


    【解决方案1】:

    好吧, 我需要为 Visual Studio 安装新的打字稿工具 microsoft

    【讨论】:

      猜你喜欢
      • 2017-04-28
      • 1970-01-01
      • 1970-01-01
      • 2016-11-15
      • 1970-01-01
      • 2017-01-06
      • 1970-01-01
      • 2016-12-09
      • 2017-02-10
      相关资源
      最近更新 更多