Skip to content

Documentation / @finchart/core / index / Emitter

Interface: Emitter<T> ​

Defined in: packages/core/src/primitives/emitter.ts:32

Both the listening side and the notifying side. The notifying face stays inside the extension.

Extends ​

Type Parameters ​

T ​

T

Properties ​

size ​

readonly size: number

Defined in: packages/core/src/primitives/emitter.ts:39

Number of listeners. Check this first when the payload is expensive to build — the same judgment call the chart makes before assembling an xDomainChange payload.

Methods ​

emit() ​

emit(value): void

Defined in: packages/core/src/primitives/emitter.ts:33

Parameters ​

value ​

T

Returns ​

void


subscribe() ​

subscribe(listener): () => void

Defined in: packages/core/src/primitives/emitter.ts:28

Returns an unsubscribe function. Safe to call twice.

Parameters ​

listener ​

(value) => void

Returns ​

() => void

Inherited from ​

Observable.subscribe