Skip to main content

Interface: IRuntime

Defined in: src/types/runtime.ts:224

The top-level runtime instance created by createRuntime.

Manages the full miniapp lifecycle — loading, bootstrapping, caching, and teardown — within the configured DOM container.

Methods

destroy()

destroy(): void

Defined in: src/types/runtime.ts:241

Destroy the runtime and clean up all resources

Returns

void


getState()

getState(): IRuntimeState

Defined in: src/types/runtime.ts:235

Returns the current runtime state snapshot

Returns

IRuntimeState


load()

load(miniappOrPackageId, options?): Promise<IMiniappHandle>

Defined in: src/types/runtime.ts:226

Load a miniapp (or fetch its manifest by package ID) and prepare it for bootstrapping

Parameters

miniappOrPackageId

string | IMiniapp

options?

ILoadOptions

Returns

Promise<IMiniappHandle>


loadModule()

loadModule(options): Promise<ILoadModuleResult>

Defined in: src/types/runtime.ts:232

Load a module-federated component from a miniapp (e.g., ToolbarIcon, Sidebar)

Parameters

options

ILoadModuleOptions

Returns

Promise<ILoadModuleResult>


subscribe()

subscribe(listener): VoidFunction

Defined in: src/types/runtime.ts:238

Subscribes to runtime state changes and returns an unsubscribe function

Parameters

listener

IStormSubcription<IRuntimeState>

Returns

VoidFunction