Adding Event-Emitter to the Interfaces

This commit is contained in:
Martin Karkowski 2021-03-19 13:21:00 +01:00
parent 8c623e13ef
commit 3ec00c762b

View File

@ -11,6 +11,20 @@ import { IDispatcherInfo } from "./nopeDispatcher.interface";
import { INopeModuleDescription } from "./nopeModule.interface";
import { INopeObservable } from "./nopeObservable.interface";
/**
* Default Emitter, which will be used
*
* @export
* @interface IEmitter
*/
export interface IEmitter {
on(event: string | symbol, listener: (...args: any[]) => void): this;
off(event: string | symbol, listener: (...args: any[]) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
getMaxListeners?: () => number;
setMaxListeners?: (n: number) => void;
}
/**
* A Layer to communicate.
*