Skip to content

ScopeSession

ScopeSession<TData> = AsyncDisposable & object

Defined in: packages/app-report/src/util/open-scope.ts:41

readonly id: ReportScopeId

readonly started: Promise<void>

Resolves once scope-start has been accepted by the writer, for a caller that needs acknowledgement. Rejects with the write failure.

attach(body, mediaType, name?): void

string | Uint8Array<ArrayBufferLike>

string

string

void

attributes(attributes): void

Attributes

void

child(title, options?): ScopeSession<TData>

A nested scope sharing this session’s writer and ordering chain.

string

ScopeSessionOptions<TData>

ScopeSession<TData>

data(data): void

TData

void

diagnostic(diagnostic): void

Record<string, unknown> = ...

string = ...

Stable, domain-defined identifier, e.g. "high-variance".

string = ...

"info" | "warning" | "error" = reportDiagnosticSeveritySchema

void

fail(error?): void

unknown

void

heartbeat(elapsedMs?, message?): void

number

string

void

output(stream, chunk): void

"stdout" | "stderr"

string

void

progress(completed, total?, message?): void

number

number

string

void

skip(): void

void

write(payload): void

The primitive every helper below is one call to. Stamps timestamp and scopeId, appends to the ordering chain, and returns immediately.

ReportEventPayload<TData>

void

TData