Skip to content
English

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

字段结构 ​

字段类型必需说明
idstring必需只读。见类型定义及调用场景。
descriptionstring必需只读。见类型定义及调用场景。
checksreadonly string[]必需只读。见类型定义及调用场景。
inspect(bubbles: readonly string[]) => readonly ReplyFormatCheck[]必需只读。Checks the reply fails; empty means the template format is satisfied.

成员目录 ​

成员用途
inspectChecks 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[]
参数类型传递说明
bubblesreadonly 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;
}

相关定义 ​

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