Skip to content
中文

JsonTransportPart ​

SUPPORT · type · Type contract

One scanned span: a complete object frame or a character outside any frame.

Import ​

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

Other public entry points:@jangts/agent-core/types, @jangts/agent-core/structs.

Definition ​

Type: JsonTransportPart

Field structure ​

FieldTypeRequiredDescription
kind"frame" | "outside"RequiredSee the type definition and usage context.
textstringRequiredSee the type definition and usage context.

Using the type ​

Read the contract at the call site ​

ts
import type { JsonTransportPart } from '@jangts/agent-core/types';

// Keep the original contract at the call site; TS and JS share the same runtime behavior.
function inspect(value: JsonTransportPart) {
  return value.kind;
}
js
/** @param {import('@jangts/agent-core/types').JsonTransportPart} value */
function inspect(value) {
  return value.kind;
}

API reference, usage examples and developer guides.