Skip to content

Commit 785ecc2

Browse files
committed
Update 50_type_sync_npm.md
1 parent a453baa commit 785ecc2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docx/tutorial/50_type_sync_npm.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@
4141
```
4242
- 输入您的GitHub用户名、个人访问令牌(PAT)和邮箱。
4343
44-
3. **安装契约包**:
44+
3. **安装/更新契约包**:
4545
- 运行:
4646
```bash
47-
npm install @yourusername/api-contract@latest
47+
yarn add @yourusername/api-contract@latest
48+
# 或者对于已安装的包,仅更新:
49+
# yarn upgrade @yourusername/api-contract
4850
```
4951
5052
4. **在代码中使用类型**:
@@ -160,10 +162,12 @@ npm login --scope=@yourusername --registry=https://npm.pkg.github.com
160162
- **Password**: 您的PAT令牌。
161163
- **Email**: 您的GitHub邮箱。
162164

163-
#### **2.4 安装契约包**
165+
#### **2.4 安装/更新契约包**
164166
运行:
165167
```bash
166-
npm install @yourusername/api-contract@latest
168+
yarn add @yourusername/api-contract@latest
169+
# 或者对于已安装的包,仅更新:
170+
# yarn upgrade @yourusername/api-contract
167171
```
168172

169173
#### **2.5 在代码中使用类型**

0 commit comments

Comments
 (0)