Skip to content

PURISTA API / Modules / @purista/core / IEmitter

Interface: IEmitter<T>

@purista/core.IEmitter

Type parameters

NameType
Textends EventMap

Implemented by

Table of contents

Methods

Methods

emit

emit<K>(eventName, parameter?): void

Type parameters

NameType
Kextends string

Parameters

NameType
eventNameK
parameter?T[K]

Returns

void

Defined in

core/types/GenericEventEmitter.ts:11


off

off<K>(eventName, fn): void

Type parameters

NameType
Kextends string

Parameters

NameType
eventNameK
fnEventReceiver<T[K]>

Returns

void

Defined in

core/types/GenericEventEmitter.ts:10


on

on<K>(eventName, fn): void

Type parameters

NameType
Kextends string

Parameters

NameType
eventNameK
fnEventReceiver<T[K]>

Returns

void

Defined in

core/types/GenericEventEmitter.ts:9