import '../../assert/js/assert.js';
import '../../globals.js';
import IntentionalAny from '../../phet-core/js/types/IntentionalAny.js';
import { TReadOnlyEmitter } from './TEmitter.js';
type Disposer = {
    disposeEmitter: TReadOnlyEmitter;
};
export type DisposerOptions = {
    disposer?: Disposer;
};
type HasDispose = {
    dispose: VoidFunction;
};
type DisposerActionType = 'link' | 'listener' | 'inputListener';
export type DisposableOptions = {
    isDisposable?: boolean;
};
declare class Disposable implements Disposer, HasDispose {
    private readonly _disposeEmitter;
    private _isDisposable;
    private _isDisposed;
    private disposerMap?;
    constructor(providedOptions?: DisposableOptions);
    getDisposeEmitter(): TReadOnlyEmitter;
    get disposeEmitter(): TReadOnlyEmitter;
    get isDisposed(): boolean;
    get isDisposable(): boolean;
    set isDisposable(isDisposable: boolean);
    initializeDisposable(options?: DisposableOptions): void;
    /**
     * Add disposables that will be disposed when this instance is disposed.
     */
    addDisposable(...disposables: HasDispose[]): void;
    dispose(): void;
    /**
     * Adds an action for the target to the disposeEmitter for the given disposer, so that when the disposer is disposed,
     * the unregisterAction related to this instance is also called. For instance, the unregisterAction would be the
     * corresponding removal/unlink/removeInputListener.
     * It is assumed that the target and unregisterAction are related to the memory management of this instance.
     */
    addDisposerAction(disposerActionType: DisposerActionType, target: IntentionalAny, disposer: Disposer, unregisterAction: () => void): void;
    /**
     * Remove the target on the disposer's disposeEmitter. This will not call the unregistration.
     */
    removeDisposerAction(disposerActionType: DisposerActionType, target: IntentionalAny): void;
    removeAllDisposerActions(disposerActionType: DisposerActionType): void;
    static assertNotDisposable(): void;
}
export default Disposable;
//# sourceMappingURL=Disposable.d.ts.map