import { type ConnectMiniSocket, MiniHmrRuntime, type RuntimePatch } from '../../mini-hmr-runtime.ts'; import { injectPageHmr as injectDevtoolsPageHmr } from './page-hmr.ts'; /** * One physical DevTools patch. DevTools compiles `factory` as native project JavaScript; invoking it registers updated Rolldown * factories but does not execute application modules, allowing the shared runtime to install a complete batch before one render. */ type DevtoolsPatch = RuntimePatch & { readonly factory: (runtime: MiniHmrRuntime) => void; }; type HmrPageConfig = Parameters[0]; /** Adapts physical DevTools patch modules and Page replacement onto the shared Mini Program HMR runtime. */ declare class DevtoolsHmrRuntime extends MiniHmrRuntime { /** Applies one Page-delivered payload before the native shell imports its route capsule. */ applyPatches(payload: Readonly<{ buildId: string; patches: readonly DevtoolsPatch[]; }> | undefined): void; /** Preserves the mounted Page connection while DevTools re-registers its static config. */ injectPageHmr(config: HmrPageConfig): HmrPageConfig; } /** Creates one platform-connected adapter for installation by a thin target runtime entry. */ export declare function createDevtoolsHmrRuntime(connectSocket: ConnectMiniSocket): DevtoolsHmrRuntime; export {};