CompiledReplyFormat
KIT · interface · 类型合同
A resolved format with its checks bound; callers only inspect replies using it.
导入
ts
import type { CompiledReplyFormat } from '@jangts/agent-core/kits/presentation';js
/** @typedef {import('@jangts/agent-core/kits/presentation').CompiledReplyFormat} CompiledReplyFormat */其他公开入口:@jangts/agent-core/types、@jangts/agent-core/kits/presentation、@jangts/agent-core/kits。
定义
ts
interface CompiledReplyFormat字段结构
| 字段 | 类型 | 必需 | 说明 |
|---|---|---|---|
id | string | 必需 | 只读。见类型定义及调用场景。 |
description | string | 必需 | 只读。见类型定义及调用场景。 |
checks | readonly string[] | 必需 | 只读。见类型定义及调用场景。 |
inspect | (bubbles: readonly string[]) => readonly ReplyFormatCheck[] | 必需 | 只读。Checks the reply fails; empty means the template format is satisfied. |
成员目录
| 成员 | 用途 |
|---|---|
inspect | Checks the reply fails; empty means the template format is satisfied. |
成员详情
inspect
Checks the reply fails; empty means the template format is satisfied.
ts
CompiledReplyFormat.inspect(bubbles: readonly string[]): readonly ReplyFormatCheck[]| 参数 | 类型 | 传递 | 说明 |
|---|---|---|---|
bubbles | readonly string[] | 必需 | — |
返回: readonly ReplyFormatCheck[]。
类型使用
在调用方读取该合同
ts
import type { CompiledReplyFormat } from '@jangts/agent-core/kits/presentation';
// 在使用点保留原合同,TS 与 JS 具有相同的运行行为。
function inspect(value: CompiledReplyFormat) {
return value.id;
}js
/** @param {import('@jangts/agent-core/kits/presentation').CompiledReplyFormat} value */
function inspect(value) {
return value.id;
}