Skip to content
English

OutputIssue ​

KIT · interface · 类型合同

Output problem with a guaranteed field path.

导入 ​

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

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

定义 ​

ts
interface OutputIssue

继承或实现: Issue。

字段结构 ​

字段类型必需说明
pathreadonly (string | number)[]必需只读。见类型定义及调用场景。
codestring必需只读。Stable machine-readable reason code; the primary key for programmatic handling.
messagestring必需只读。Human-readable description; not guaranteed stable for matching.
checkIdstring | undefined可省略只读。Registered check that produced the issue, when the check belongs to a catalog.

类型使用 ​

在调用方读取该合同 ​

ts
import type { OutputIssue } from '@jangts/agent-core/kits/presentation';

// 在使用点保留原合同,TS 与 JS 具有相同的运行行为。
function inspect(value: OutputIssue) {
  return value.path;
}
js
/** @param {import('@jangts/agent-core/kits/presentation').OutputIssue} value */
function inspect(value) {
  return value.path;
}

相关定义 ​

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