-
在使用 npm 命令之前电脑必须得安装 nodejs
- 如果电脑上面没有安装过 cnpm,请先安装 cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
-
如果电脑上面没有安装过 yarn 请先安装 yarn
npm install -g yarn
或者
cnpm install -g yarn
安装
npm install -g typescript 或者 cnpm install -g typescript 或者 yarn global add typescript
运行
tsc helloworld.ts