🛡️TypeSafe 中文文档
原文档 ↗

函数:choice()

ts
function choice<T>(instructions, criteria): ChoiceQuestion<T>;

创建一个在命名选项之间进行选择的问题。

类型参数

T

T extends ChoiceCriteria

参数

instructions

EntryType

以文本、JSON 对象或数组形式给出的问题,或 null。

criteria

T

标签到描述的映射,null 表示标签没有描述。

返回

ChoiceQuestion\<T>

本站为 docs.typesafe.ai 的中文翻译,仅供学习参考;内容版权归原作者所有。