Function: registerHotModule()
ts
function registerHotModule(moduleId: string, classes: Record<string, unknown>): void;Defined in: src/wirestate-core/hot/hot-registry.ts:177
Registers injectable classes from an evaluated hot module.
Parameters
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Stable module identifier, usually the root-relative path. |
classes | Record<string, unknown> | Classes keyed by their registration name. |
Returns
void
Remarks
The first registration establishes each class identity. Later registrations with the same names make their replacements available to the next requestHotSwap. If a registered name disappears, the next request reloads the page because retained configs may still refer to it. Registration does not modify the constructors.
This is the explicit form. Transformed modules register through openHotModule and closeHotModule instead, letting @Injectable() collect the classes.