/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MaybePromise } from "./Promises.js";
/**
 * A "multiplex" tracks an extensible set of promises.
 */
export interface Multiplex {
    add(worker: Promise<unknown>, description?: string): void;
    close(): Promise<void>;
    [Symbol.asyncDispose](): Promise<void>;
}
/**
 * A basic multiplex that tracks all promises given to it.
 */
export declare class BasicMultiplex implements PromiseLike<void> {
    #private;
    add(worker: MaybePromise<unknown>, description?: string): void;
    close(): Promise<void>;
    then<TResult1 = void, TResult2 = never>(onfulfilled?: ((value: void) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
    [Symbol.asyncDispose]: () => Promise<void>;
}
//# sourceMappingURL=Multiplex.d.ts.map