import type { AsyncResource } from "./async-resource.js"; /** A stack of async resources, released in reverse order of registration. */ export declare class AsyncDisposer implements AsyncResource { private resources; private _disposed; private disposing; get disposed(): boolean; use(resource: T): T; adopt(value: T, disposeAsync: (value: T) => Promise): T; defer(onDispose: () => Promise): void; /** Safe to call twice: a second call waits for the first to finish. */ disposeAsync: () => Promise; private release; private assertOpen; }