Skip to main content

函数:choice()

机器翻译译自英文(docs.typesafe.ai)本页 15 段已全部译完

文档索引

在以下地址获取完整的文档索引:https://docs.typesafe.ai/llms.txt 使用此文件可以在进一步探索之前发现所有可用页面。

函数:choice()

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

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

类型参数

T

T 扩展 ChoiceCriteria

参数

instructions

EntryType

问题可以是文本、JSON 对象或数组,也可以是 null。

criteria

T

映射到描述(description)的标签(label),未说明的标签为 null。

返回值

ChoiceQuestion<T>