Skip to content

Commit d8ec20f

Browse files
committed
docs: mention parameter type field
1 parent 321d737 commit d8ec20f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

docs/guide/parameters.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const cli = Cli()
6969
{
7070
key: "<value>",
7171
description: "Configuration value",
72+
type: String,
7273
},
7374
],
7475
})
@@ -82,6 +83,8 @@ const cli = Cli()
8283

8384
Parameter types allow you to validate, convert, and parse parameter values, and provide valid options in help documentation. Parameter types use the same functions as [flag types](./types), meaning you can share the same type definitions between parameters and flags. When a type is specified for a parameter, the parsed value will be automatically converted to the type.
8485

86+
By default, the parameter type is `String`.
87+
8588
For comprehensive information about all available types, see the [Types](./types) guide.
8689

8790
## End-of-File

docs/zh/guide/parameters.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const cli = Cli()
6969
{
7070
key: "<value>",
7171
description: "Configuration value",
72+
type: String,
7273
},
7374
],
7475
})
@@ -82,6 +83,8 @@ const cli = Cli()
8283

8384
参数类型允许你验证、转换和解析参数值,并在帮助文档中提供有效的选项。参数类型与[类型](./types)指南中的函数相同,这意味着你可以在参数和选项之间共享相同的类型定义。当为参数指定类型时,解析的值将自动转换为该类型。
8485

86+
默认情况下,参数类型为 `String`
87+
8588
有关所有可用类型的详细信息,请参阅[类型](./types)指南。
8689

8790
## 文件结尾符

0 commit comments

Comments
 (0)