import type { RequestLifecycleOpts } from '../base-server';
import type { AfterTask } from './after';
export type AfterContextOpts = {
    isEnabled: boolean;
    waitUntil: RequestLifecycleOpts['waitUntil'] | undefined;
    onClose: RequestLifecycleOpts['onClose'];
    onTaskError: RequestLifecycleOpts['onAfterTaskError'] | undefined;
};
export declare class AfterContext {
    private waitUntil;
    private onClose;
    private onTaskError;
    readonly isEnabled: boolean;
    private runCallbacksOnClosePromise;
    private callbackQueue;
    private workUnitStores;
    constructor({ waitUntil, onClose, onTaskError, isEnabled, }: AfterContextOpts);
    after(task: AfterTask): void;
    private addCallback;
    private runCallbacksOnClose;
    private runCallbacks;
    private reportTaskError;
}
