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>泛型参数
| 类型参数 | 约束 | 默认类型 |
|---|---|---|
Kind | string | string |
字段结构
| 字段 | 类型 | 必需 | 说明 |
|---|---|---|---|
required | boolean | 必需 | 只读。True when at least one policy matched. |
reasons | readonly string[] | 必需 | 只读。Ids of the matched policies, in registration order. |
kinds | readonly Kind[] | 必需 | 只读。Distinct kinds of the matched policies, in first-match order. |
类型使用
使用该类型时,可按上方泛型参数选择类型;有默认类型的参数可以省略。