Skip to content

openScopeWith

openScopeWith<TData>(write, parentScopeId, title, options?): ScopeSession<TData>

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

Opens a scope on an arbitrary write function: emits scope-start, and scope-end (status "ok" by default, or "failed"/"skipped"/ "cancelled" per fail()/skip()/an aborted signal) on disposal.

Every emitting method returns void; ordering is guaranteed by a private chain each call appends to, so scope-end is genuinely last without any method being awaitable. Use started when a caller specifically needs acknowledgement that scope-start landed.

TData

ScopeWriter<TData>

string | null

string

ScopeSessionOptions<TData>

ScopeSession<TData>