/**
 * Disposable interface and manager for proper resource cleanup
 *
 * This module provides a standardized way to manage lifecycle and cleanup
 * for singleton instances and other long-lived resources.
 */
/**
 * Interface for objects that need cleanup
 */
export interface Disposable {
    /**
     * Clean up resources, close connections, remove listeners, etc.
     */
    dispose(): void | Promise<void>;
}
/**
 * Manager to track all disposable resources
 */
export declare class DisposableManager {
    private static instance;
    private disposables;
    private disposed;
    private constructor();
    /**
     * Get singleton instance
     */
    static getInstance(): DisposableManager;
    /**
     * Register a disposable resource
     */
    register(disposable: Disposable): void;
    /**
     * Unregister a disposable resource
     */
    unregister(disposable: Disposable): void;
    /**
     * Dispose all registered resources
     * Resources are disposed in reverse order of registration (LIFO)
     */
    disposeAll(): Promise<void>;
    /**
     * Check if manager has been disposed
     */
    isDisposed(): boolean;
    /**
     * Get count of registered disposables
     */
    getCount(): number;
    /**
     * Reset the manager (primarily for testing)
     */
    reset(): void;
}
/**
 * Register a disposable resource with the global DisposableManager
 */
export declare function registerDisposable(disposable: Disposable): void;
/**
 * Unregister a disposable resource from the global DisposableManager
 */
export declare function unregisterDisposable(disposable: Disposable): void;
/**
 * Dispose all registered resources
 */
export declare function disposeAll(): Promise<void>;
/**
 * Get the global DisposableManager instance
 */
export declare function getDisposableManager(): DisposableManager;
