import type { Disposable } from '../types/Disposable.js'; export declare class AutoDisposableList { private readonly disposables; private readonly finalDisposables; /** * Add an item to dispose. This will be disposed in parallel with other items. * (Use `addFinal` if order matters.) */ add(item: T): T; /** * Add a disposable that will be handled at the end and run in series. * This is mainly useful for disposing the reporter after anything else that might log. */ addFinal(item: T): T; /** * Dispose all registered disposables. * If any disposables throw, it will be logged, and a single error will be thrown at the end. * * After each call, the registered disposables will be cleared, so the list can be reused. */ dispose(): Promise; } //# sourceMappingURL=AutoDisposableList.d.ts.map