Skip to content

Function: transformHotModule() ​

ts
function transformHotModule(code: string, moduleId: string): Nullable<string>;

Defined in: src/wirestate-dev/transform/hot-transform.ts:61

Wraps a module in hot-reload markers when it may declare injectable classes.

Parameters ​

ParameterTypeDescription
codestringModule source code before compilation.
moduleIdstringStable module identifier, usually the root-relative path.

Returns ​

Nullable<string>

Transformed code, or null when the module cannot declare injectable classes.