forked from abner/for-legacy-web
Run prettier on all files.
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
import EventEmitter from "eventemitter3";
|
||||
|
||||
export const InternalEvent = new EventEmitter();
|
||||
|
||||
export function internalSubscribe(ns: string, event: string, fn: (...args: any[]) => void) {
|
||||
InternalEvent.addListener(ns + '/' + event, fn);
|
||||
return () => InternalEvent.removeListener(ns + '/' + event, fn);
|
||||
export function internalSubscribe(
|
||||
ns: string,
|
||||
event: string,
|
||||
fn: (...args: any[]) => void,
|
||||
) {
|
||||
InternalEvent.addListener(ns + "/" + event, fn);
|
||||
return () => InternalEvent.removeListener(ns + "/" + event, fn);
|
||||
}
|
||||
|
||||
export function internalEmit(ns: string, event: string, ...args: any[]) {
|
||||
InternalEvent.emit(ns + '/' + event, ...args);
|
||||
InternalEvent.emit(ns + "/" + event, ...args);
|
||||
}
|
||||
|
||||
// Event structure: namespace/event
|
||||
|
||||
Reference in New Issue
Block a user