export declare enum RenderStage {
    Before = 1,
    EarlyStatic = 2,
    Static = 3,
    EarlyRuntime = 4,
    Runtime = 5,
    Dynamic = 6,
    Abandoned = 7
}
export type AdvanceableRenderStage = RenderStage.Static | RenderStage.EarlyRuntime | RenderStage.Runtime | RenderStage.Dynamic;
export declare class StagedRenderingController {
    private abortSignal;
    private abandonController;
    private shouldTrackSyncIO;
    currentStage: RenderStage;
    syncInterruptReason: Error | null;
    staticStageEndTime: number;
    runtimeStageEndTime: number;
    private staticStageListeners;
    private earlyRuntimeStageListeners;
    private runtimeStageListeners;
    private dynamicStageListeners;
    private staticStagePromise;
    private earlyRuntimeStagePromise;
    private runtimeStagePromise;
    private dynamicStagePromise;
    constructor(abortSignal: AbortSignal | null, abandonController: AbortController | null, shouldTrackSyncIO: boolean);
    onStage(stage: AdvanceableRenderStage, callback: () => void): void;
    shouldTrackSyncInterrupt(): boolean;
    syncInterruptCurrentStageWithReason(reason: Error): void;
    getSyncInterruptReason(): Error | null;
    getStaticStageEndTime(): number;
    getRuntimeStageEndTime(): number;
    private abandonRender;
    advanceStage(stage: RenderStage.EarlyStatic | RenderStage.Static | RenderStage.EarlyRuntime | RenderStage.Runtime | RenderStage.Dynamic): void;
    /** Fire the `onStage` listeners for the static stage and unblock any promises waiting for it. */
    private resolveStaticStage;
    /** Fire the `onStage` listeners for the early runtime stage and unblock any promises waiting for it. */
    private resolveEarlyRuntimeStage;
    /** Fire the `onStage` listeners for the runtime stage and unblock any promises waiting for it. */
    private resolveRuntimeStage;
    /** Fire the `onStage` listeners for the dynamic stage and unblock any promises waiting for it. */
    private resolveDynamicStage;
    private getStagePromise;
    waitForStage(stage: AdvanceableRenderStage): Promise<void>;
    delayUntilStage<T>(stage: AdvanceableRenderStage, displayName: string | undefined, resolvedValue: T): Promise<T>;
}
