Skip to content

Documentation / @etherfold/browser / HotUpdatableIndexer

Type Alias: HotUpdatableIndexer<ABI, ProcessResultType, ProcessorConfig> ​

HotUpdatableIndexer<ABI, ProcessResultType, ProcessorConfig> = object

Defined in: packages/browser/src/hotUpdate.ts:89

WHAT THIS NEEDS OF AN INDEXER, which is two members of the hook's surface.

Narrow on purpose. createIndexerState(...) satisfies it, and so does anything else that holds generations and can register one beside them -- but nothing here reaches for a private field, so this function is an ADAPTER in front of a call an application could equally make itself. What it adds is the OUTCOME contract, not access.

Type Parameters ​

ABI ​

ABI extends Abi

ProcessResultType ​

ProcessResultType

ProcessorConfig ​

ProcessorConfig = undefined

Properties ​

generations ​

readonly generations: readonly object[]

Defined in: packages/browser/src/hotUpdate.ts:91

What this indexer holds RIGHT NOW, which is how unchanged is told from registered.

Methods ​

addGeneration() ​

addGeneration(generation, processorConfig?): Promise<{ record: GenerationRecord; }>

Defined in: packages/browser/src/hotUpdate.ts:93

Register a generation BESIDE the live one. The incumbent answers throughout.

Parameters ​

generation ​

HotUpdateGeneration<ABI, ProcessResultType, ProcessorConfig>

processorConfig? ​

ProcessorConfig

Returns ​

Promise<{ record: GenerationRecord; }>