BrowserHmrChannel
import type { BrowserHmrChannel } from "@pitlane/content/hot";The part of remix/node-hmr's BrowserHmrChannel this module uses.
Declared structurally rather than imported, because importing the module that declares it would pull a Node-only dependency into every bundle this package reaches. hotContent holds the only import of it, loaded on demand behind its guard.
Properties
url
readonly url: string;Methods
close()
close(): void;Shuts the channel down.
Returns
void
onFileEvents()
onFileEvents(handler): () => void;Registers handler for batches of changed files. The browser events it
resolves to are sent to connected clients. Returns a function that
unregisters it.
Parameters
handler
(events: readonly FileEvent[]) => Promise<readonly BrowserEvent[]>
Returns
() => void
updateWatchedFiles()
updateWatchedFiles(delta): void;Adds absolute paths to, and removes them from, the set the supervisor watches.
Parameters
delta
add
readonly string[]
remove
readonly string[]
Returns
void