import type { Logger } from '@xylabs/logger';
import type { Promisable, PromiseEx } from '@xylabs/promise';
import { type ForgetConfig } from './ForgetConfig.ts';
type PromisableFunction<T> = () => Promisable<T>;
export declare class ForgetPromise {
    static activeForgets: number;
    static exceptedForgets: number;
    static logger: Logger;
    static get active(): boolean;
    static awaitInactive(interval?: number, timeout?: number): Promise<number>;
    static exceptionHandler(error: Error, { name }: ForgetConfig, externalStackTrace?: string): void;
    /**
     * Used to explicitly launch an async function (or Promise) with awaiting it
     * @param promise The promise to forget
     * @param config Configuration of forget settings
     */
    static forget<T>(promise: Promise<T> | PromiseEx<T> | PromisableFunction<T> | T, config?: ForgetConfig<T>): void;
    static timeoutHandler(time: number, { name }: ForgetConfig, externalStackTrace?: string): void;
}
export {};
//# sourceMappingURL=ForgetPromise.d.ts.map