splat-transform API Reference - v2.0.5
    Preparing search index...

    Interface Bar

    Determinate progress bar handle. Closed explicitly via end(), or implicitly when an enclosing Group's end() (or a Logger.unwindAll) pops it as part of cleanup.

    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 bar = logger.bar(...) because using only requires the [Symbol.dispose] shape structurally.

    interface Bar {
        "[dispose]"(): void;
        end(): void;
        tick(n?: number): void;
        update(current: number): void;
    }
    Index

    Methods

    • Dispose hook so using syntax closes the bar on scope exit.

      Returns void

    • Advance the bar by n ticks.

      Parameters

      • Optionaln: number

        Number of ticks to advance (default 1).

      Returns void

    • Set the bar's absolute progress. Clamped to [0, total]. Suppresses a barTick event when the value is unchanged.

      Parameters

      • current: number

        Absolute progress value.

      Returns void