Supervised-EmitterISupervisedEmitter

Interface: ISupervisedEmitter

SupervisedEmitter's interface

Hierarchy

  • ISupervisedEmitter

Implemented by

Index

Methods

Methods

getScope

getScope(): IGetScope

Returns a Closure function that adds scope to an event

Returns: IGetScope


publish

publish(pubEvent: string, data: any): Promise‹any›

Publishes data on the given pubEvent

Parameters:

Name Type
pubEvent string
data any

Returns: Promise‹any›


subscribe

subscribe(event: string, ...handlers: IHandler[]): ISubscription

Subscribes to an event

Parameters:

Name Type
event string
...handlers IHandler[]

Returns: ISubscription


subscribeOnce

subscribeOnce(event: string, ...handlers: IHandler[]): Promise‹any›

Subscribes to an event only once

Parameters:

Name Type
event string
...handlers IHandler[]

Returns: Promise‹any›


unScope

unScope(event: string): string

This strips the scope part in the given event

Parameters:

Name Type
event string

Returns: string


waitTill

waitTill(event: string): Promise‹any›

Waits untill the required event is fired

Parameters:

Name Type
event string

Returns: Promise‹any›

results matching ""

    No results matching ""