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
| Field | Type | Required | Description |
|---|---|---|---|
kind | "frame" | "outside" | Required | See the type definition and usage context. |
text | string | Required | See 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;
}