import type { DevOptions } from 'rolldown/experimental'; import { type SchedulerLike, Subject } from 'rxjs'; type HmrUpdatesResult = Parameters>[0]; type HmrUpdates = Exclude; /** * Adapts Rolldown's non-awaited HMR callback into lossless quiet-window publications. * * Debouncing the result stream itself would retain only the final callback and lose incremental patch factories that later * patches provably do not reproduce. Instead, the debounced view is only a closing notifier for `buffer`: every callback is * retained in arrival order, and one configured quiet period emits the complete window to the host's existing serialized * writer. This first stream migration deliberately does not own physical state; `publish` and `reportError` remain synchronous * admission callbacks so the dev host can enqueue both through its single writer. * * DevEngine failures are values, not Observable errors. They represent transient editor generations and carry no executable * patch, so the stream reports the final error but otherwise removes them. Successful callbacks on either side remain ordered * and lossless; Rolldown generated each against its unpublished client frontier, and the host delivers every retained payload. * Completing the returned Subject flushes its current buffer synchronously, allowing host shutdown to await the resulting * serialized task rather than silently dropping an admitted patch. * * Complexity is O(updates + changed files) per emitted window, with one retained reference per callback until the quiet edge. */ export declare function createHmrResultsStream(settleMilliseconds: number, scheduler: SchedulerLike, publish: (result: HmrUpdates) => void, reportError: (error: Error) => void): Subject; export {};