import type { Compilation, Compiler } from '@rspack/core'; import type { ReloadInstruction } from './classify-reload.js'; import { type ReloadBroker } from './reload-dispatch.js'; export declare function isReloadSession(mode: string | undefined, devSession: boolean | undefined): boolean; type BuildHold = (compiler: object, compilation?: object) => boolean; interface ReloadSessionOptions { browser: string; packaged?: boolean; } export interface ReloadPlan { held: boolean; instruction?: ReloadInstruction; } interface CompilerReloads { plan(compilation: Compilation): ReloadPlan; } export interface ReloadSession { connect(broker: ReloadBroker): void; hold(isHeld: BuildHold): void; watch(compiler: Compiler): CompilerReloads; loaded(compilation: Compilation): void; deliver(instruction: ReloadInstruction | undefined, compilation?: Compilation): Promise; combine(previous: ReloadInstruction | undefined, next: ReloadInstruction | undefined): ReloadInstruction | undefined; bootRegistrationsWait(compilation: object): ((timeoutMs: number) => Promise<'settled' | 'timeout'>) | undefined; } export declare const RELOAD_DELIVERY_HOLD_MS = 10000; export declare function createReloadSession(options: ReloadSessionOptions): ReloadSession; export declare function reloadEachBuild(compiler: Compiler, options: { browser: string; broker: ReloadBroker; isHeld?: BuildHold; }): void; export {};