Total Pageviews

Sunday, 29 December 2019

安装typescript

npm install -g typescript typings
会显示:
...
~/node-v12.6.0/node-v12.6.0-darwin-x64/bin/tsc -> ~/node-v12.6.0/node-v12.6.0-darwin-x64/lib/node_modules/typescript/bin/tsc
~/node-v12.6.0/node-v12.6.0-darwin-x64/bin/tsserver -> ~/node-v12.6.0/node-v12.6.0-darwin-x64/lib/node_modules/typescript/bin/tsserver
~/node-v12.6.0/node-v12.6.0-darwin-x64/bin/typings -> ~/node-v12.6.0/node-v12.6.0-darwin-x64/lib/node_modules/typings/dist/bin.js
...

这样就成功安装了typescript,其可执行文件为tsc和tsserver.