Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ npm i pnpm -g // 全局安装 pnpm

优秀的`类型提示`可以给使用者极佳的体验

以下两种安装方式选择其一即可

```js
npm i typescript -d //我个人比较喜欢全局安装
npm i typescript -d // 局部安装
npm i typescript -g //我个人比较喜欢全局安装
```

### 创建项目
Expand Down Expand Up @@ -66,8 +69,11 @@ pnpm init //初始化并自动生成package.json

### 生成 tsconfig.json

根据不同的安装方式使用对应的初始化命令

```js
tsc --init
npm tsc --init // 局部安装的初始化命令
tsc --init // 全局安装的初始化命令
```

### 创建 src/index.ts
Expand Down