1.添加依赖
npm install --save @types/node
2.修改tsconfig.json
"target": "es5",
// 添加
"types": [
"node"
],
"typeRoots": [
"node_modules/@types"
]
1.添加依赖
npm install --save @types/node
2.修改tsconfig.json
"target": "es5",
// 添加
"types": [
"node"
],
"typeRoots": [
"node_modules/@types"
]