MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / assertEngineExists

Function assertEngineExists

app/core/Engine.ts:1677–1683  ·  view source on GitHub ↗

* Assert that the given Engine instance has been initialized * * @param instance - Either an Engine instance, or null

(
  instance: Engine | null,
)

Source from the content-addressed store, hash-verified

1675 * @param instance - Either an Engine instance, or null
1676 */
1677function assertEngineExists(
1678 instance: Engine | null,
1679): asserts instance is Engine {
1680 if (!instance) {
1681 throw new Error('Engine does not exist');
1682 }
1683}
1684
1685let instance: Engine | null;
1686

Callers 8

contextFunction · 0.85
controllerMessengerFunction · 0.85
stateFunction · 0.85
datamodelFunction · 0.85
hasFundsFunction · 0.85
resetStateFunction · 0.85
Engine.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected