iam使用:
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';
但未找到模块。仅限于视觉工作室