import type { Compiler } from '@rspack/core'; type DevSessionRestartReason = 'scripts' | 'html' | 'icons' | 'json' | 'env' | 'public' | 'main-world' | 'styles'; export interface DevSessionRestartRequest { reason: DevSessionRestartReason; pathAfter?: string; pathBefore?: string; pathChanged?: string; manifestField?: string; manifestFieldBefore?: string; registeredBy?: string; alsoChanged?: number; } export interface MainWorldScriptChange { files: string[]; registeredBy?: string; } export interface MainWorldRestartOptions { name: string; key: string; startSignature: string; readSignature: () => string; } export type NoteMainWorldSet = (compilation: object, signature: string, changed: MainWorldScriptChange[]) => boolean; interface SessionRestartAnswers { request(compiler: object | undefined, request: DevSessionRestartRequest): boolean; isRestarting(compiler: object | undefined): boolean; } declare let trackMainWorld: ((compiler: Compiler, options: MainWorldRestartOptions) => NoteMainWorldSet) | undefined; export declare function answerSessionRestarts(next: SessionRestartAnswers | undefined): SessionRestartAnswers | undefined; export declare function answerMainWorldRestarts(next: typeof trackMainWorld): typeof trackMainWorld; export declare function requestSessionRestart(compiler: object | undefined, request: DevSessionRestartRequest): boolean; export declare function isSessionRestarting(compiler: object | undefined): boolean; export declare function trackMainWorldSet(compiler: Compiler, options: MainWorldRestartOptions): NoteMainWorldSet; export {};