node.js里使用typescript的方法
2018-03-09 11:33
423 查看
1、npm --init
2、tsc --init
修改
"rootDirs": ["./src"],
"outDir": "./build",
增加
"include":[
"./src/**/*"
],
3、
2、tsc --init
修改
"rootDirs": ["./src"],
"outDir": "./build",
增加
"include":[
"./src/**/*"
],
{ "compilerOptions": { "target": "es5", "module": "commonjs", "outDir": "./build", "strict": true, "rootDirs": ["./src"], "esModuleInterop": true }, "include":[ "./src/**/*" ], }
3、
npm install @types/node --save
相关文章推荐
- node.js中的path.isAbsolute方法使用说明
- Node.js-require的使用方法
- node.js中的path.resolve方法使用说明
- node.js中的events.EventEmitter.listenerCount方法使用说明
- node.js中的console.warn方法使用说明
- linux 下node.js 使用child_process模块的exec方法所遇问题
- node.js中的console.timeEnd方法使用说明
- node.js中的path.extname方法使用说明
- node.js中的path.normalize方法使用说明
- node.js中的path.extname方法使用说明
- 使用console.dir 快速概览Node.JS中对象实例的属性和方法
- node.js中的path.basename方法使用说明
- node.js中的console.info方法使用说明
- node.js中的path.resolve方法使用说明
- node.js中的path.delimiter方法使用说明
- node.js使用npm 安装插件时提示install Error: ENOENT报错的解决方法
- node.js中的console.trace方法使用说明
- node.js使用npm 安装插件时提示install Error: ENOENT报错的解决方法
- node.js中的dns.getServers方法使用说明