Skip to content

TypedEvent

passes through events as they happen. You will not get events from before you start listening

Type parameters

T

Constructors

new TypedEvent()

new TypedEvent<T>(): TypedEvent<T>

Returns

TypedEvent<T>

Methods

addListener()

addListener(listener): Disposable

Parameters

listener: Listener<T>

Returns

Disposable

Source

std/typed-event.ts:19


addOnceListener()

addOnceListener(listener): void

Parameters

listener: Listener<T>

Returns

void

Source

std/typed-event.ts:26


emit()

emit(event): void

Parameters

event: T

Returns

void

Source

std/typed-event.ts:35


pipe()

pipe(te): Disposable

Parameters

te: TypedEvent<T>

Returns

Disposable

Source

std/typed-event.ts:47


removeListener()

removeListener(listener): void

Parameters

listener: Listener<T>

Returns

void

Source

std/typed-event.ts:30