Named, timed scope returned from Logger.group. Manages the scope's
lifecycle only - free-form messages, nested groups and bars are emitted via
the global logger (they auto-indent under whatever is on top of the
active-scope stack).
Open scopes with logger.group(name) and close them with sub.end() after
the body. Embedders that catch their own exceptions (rather than letting
them propagate to a logger.error() call) should call
Logger.unwindAll from their catch to close any scopes/bars left
dangling on the stack.
Carries a [Symbol.dispose] slot directly (rather than extending the
built-in Disposable lib type) so the published .d.ts stays free of
any reference to the Disposable interface. Symbol.dispose itself is
still a TS 5.2+ / esnext.disposable (or es2024.disposable) lib
symbol, so consumers compiling against these declarations need that
lib enabled (or skipLibCheck: true). Callers on TS 5.2+ / Node 20+
can adopt using g = logger.group(...) because using only requires
the [Symbol.dispose] shape structurally.
Named, timed scope returned from Logger.group. Manages the scope's lifecycle only - free-form messages, nested groups and bars are emitted via the global
logger(they auto-indent under whatever is on top of the active-scope stack).Open scopes with
logger.group(name)and close them withsub.end()after the body. Embedders that catch their own exceptions (rather than letting them propagate to alogger.error()call) should call Logger.unwindAll from their catch to close any scopes/bars left dangling on the stack.Carries a
[Symbol.dispose]slot directly (rather than extending the built-inDisposablelib type) so the published.d.tsstays free of any reference to theDisposableinterface.Symbol.disposeitself is still a TS 5.2+ /esnext.disposable(ores2024.disposable) lib symbol, so consumers compiling against these declarations need that lib enabled (orskipLibCheck: true). Callers on TS 5.2+ / Node 20+ can adoptusing g = logger.group(...)becauseusingonly requires the[Symbol.dispose]shape structurally.