TS TypeSafe 文档中文版 原文 ↗

接口:ChoiceResponse<T>

被选中的标签及其概率。

类型参数

T

T extends ChoiceCriteria = ChoiceCriteria

属性

choice

typescript
readonly choice: keyof T & string;
 

被选中的标签。


confidence

typescript
readonly confidence: number;
 

对所选中标签报告的置信度。


probabilities

typescript
readonly probabilities: { readonly [label in string | number | symbol]: number };
 

以标签为键的概率。


type

typescript
readonly type: "choice";