我在用:
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';
但找不到模块。仅在视觉工作室