繁体   English   中英

Typescript 2.0 + VS 2015 @types不起作用

[英]Typescript 2.0 + VS 2015 @types not working

我在用:

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';

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

好的,我需要从Microsoft安装适用于Visual Studio的新打字稿工具

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM