File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const zhConfig = defineConfig({
3232 link : "/zh/commands" ,
3333 } ,
3434 {
35- text : "检查器 " ,
35+ text : "拦截器 " ,
3636 link : "/zh/interceptors" ,
3737 } ,
3838 {
Original file line number Diff line number Diff line change 11---
2- title : 检查器
2+ title : 拦截器
33---
44
5- # 检查器
5+ # 拦截器
66
7- 检查器是在调用命令处理程序之前或之后运行的函数 ,类似于 koa 中的中间件。
7+ 拦截器是在调用命令处理程序之前或之后运行的函数 ,类似于 koa 中的中间件。
88
99## 用法
1010
11- 可以使用 ` interceptor ` 方法将检查器添加到命令行界面 (CLI) 中:
11+ 可以使用 ` interceptor ` 方法将拦截器添加到命令行界面 (CLI) 中:
1212
1313``` ts
1414import { Clerc } from " clerc" ;
@@ -53,9 +53,9 @@ const cli = Clerc.create()
5353
5454因此,执行顺序如下:
5555
56- 1 . 预检查器 (Pre interceptors)
57- 2 . 正常检查器 (Normal interceptors)
58- 3 . 后检查器 (Post interceptors)
56+ 1 . 预拦截器 (Pre interceptors)
57+ 2 . 正常拦截器 (Normal interceptors)
58+ 3 . 后拦截器 (Post interceptors)
5959
6060## 在命令处理程序之后调用
6161
You can’t perform that action at this time.
0 commit comments