# Group

Interface

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/utils/logger.ts#L137

Named, timed scope returned from [Logger.group](https://api.playcanvas.com/splat-transform/variables/logger.md#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](https://api.playcanvas.com/splat-transform/variables/logger.md#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.

## Methods

### [dispose]

```ts
[dispose](): void
```

Dispose hook so `using` syntax closes the group on scope exit.

### end

```ts
end(): void
```

Close the group, popping anything still open above it on the stack
(defensively handles forgotten inner scopes) and emit the timing event.
