Skip to main content
zerotal

Documentation


Documentation / @zerotal/devtools / index / TraceChannelDescriptor

Interface: TraceChannelDescriptor

Defined in: devtools/src/RequestTrace.ts:93

How a package's channel is displayed in the panel.

The descriptor crosses the wire to the browser, so it names fields rather than carrying formatter functions — a channel is declared once on the server and rendered generically, which is what lets a package add a tab without devtools shipping a renderer for it.

Example

trace.channel({
  id: "auth",
  label: "Auth",
  badge: "event",
  title: "detail",
  meta: ["guard", "ip"],
  warn: "failed",
});

Properties

id

id: string

Defined in: devtools/src/RequestTrace.ts:95

Unique id — also the key under RequestTrace.channels.


label

label: string

Defined in: devtools/src/RequestTrace.ts:97

Tab label in the panel.


badge?

optional badge?: string

Defined in: devtools/src/RequestTrace.ts:99

Entry field rendered as the row's leading badge.


title?

optional title?: string

Defined in: devtools/src/RequestTrace.ts:101

Entry field rendered as the row's main text. Defaults to the badge field.


meta?

optional meta?: string[]

Defined in: devtools/src/RequestTrace.ts:103

Entry fields rendered as dim metadata beneath the title.


warn?

optional warn?: string

Defined in: devtools/src/RequestTrace.ts:105

Entry field whose truthiness marks the row — and the tab's badge — as a warning.


order?

optional order?: number

Defined in: devtools/src/RequestTrace.ts:107

Sort order among channel tabs. Lower sorts first. Defaults to 100.