Skip to content
English

PolicyAssessment ​

KIT · interface · 类型合同

Result of assessing every registered policy against one input.

导入 ​

ts
import type { PolicyAssessment } from '@jangts/agent-core/kits/policies';
js
/** @typedef {import('@jangts/agent-core/kits/policies').PolicyAssessment} PolicyAssessment */

其他公开入口:@jangts/agent-core、@jangts/agent-core/types、@jangts/agent-core/structs、@jangts/agent-core/kits/policies、@jangts/agent-core/kits。

定义 ​

ts
interface PolicyAssessment<Kind>

泛型参数 ​

类型参数约束默认类型
Kindstringstring

字段结构 ​

字段类型必需说明
requiredboolean必需只读。True when at least one policy matched.
reasonsreadonly string[]必需只读。Ids of the matched policies, in registration order.
kindsreadonly Kind[]必需只读。Distinct kinds of the matched policies, in first-match order.

类型使用 ​

使用该类型时,可按上方泛型参数选择类型;有默认类型的参数可以省略。

接口参考、使用示例与开发指南。