Renamed PathEventEmitter to follow convention
This commit is contained in:
parent
379de273c4
commit
2fda11f3b7
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/utils",
|
"name": "@ztimson/utils",
|
||||||
"version": "0.19.0",
|
"version": "0.19.1",
|
||||||
"description": "Utility library",
|
"description": "Utility library",
|
||||||
"author": "Zak Timson",
|
"author": "Zak Timson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -216,13 +216,13 @@ export interface IPathedEventEmitter {
|
|||||||
off(listener: PathListener): void;
|
off(listener: PathListener): void;
|
||||||
on(event: string, listener: PathListener): PathUnsubscribe;
|
on(event: string, listener: PathListener): PathUnsubscribe;
|
||||||
once(event: string, listener?: PathListener): Promise<any>;
|
once(event: string, listener?: PathListener): Promise<any>;
|
||||||
relayEvents(emitter: PathedEventEmitter): void;
|
relayEvents(emitter: PathEventEmitter): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event emitter that uses paths allowing listeners to listen to different combinations of modules, paths & methods
|
* Event emitter that uses paths allowing listeners to listen to different combinations of modules, paths & methods
|
||||||
*/
|
*/
|
||||||
export class PathedEventEmitter implements IPathedEventEmitter{
|
export class PathEventEmitter implements IPathedEventEmitter{
|
||||||
private listeners: [PathEvent, PathListener][] = [];
|
private listeners: [PathEvent, PathListener][] = [];
|
||||||
|
|
||||||
emit(event: string | PathEvent, ...args: any[]) {
|
emit(event: string | PathEvent, ...args: any[]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user