fix(typescript error): Change pubSubServiceInterface file type to typescript (#3546)

Co-authored-by: edward65 <edward@afxmedical.com>
This commit is contained in:
Edward Son 2023-10-03 12:23:40 -04:00 committed by GitHub
parent b33ad0c7e9
commit eb22328fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,6 +89,13 @@ function _broadcastEvent(eventName, callbackProps) {
/** Export a PubSubService class to be used instead of the individual items */
export class PubSubService {
EVENTS: any;
subscribe: (eventName: string, callback: Function) => { unsubscribe: () => any; };
_broadcastEvent: (eventName: string, callbackProps: any) => void;
_unsubscribe: (eventName: string, listenerId: string) => void;
_isValidEvent: (eventName: string) => boolean;
listeners: {};
unsubscriptions: any[];
constructor(EVENTS) {
this.EVENTS = EVENTS;
this.subscribe = subscribe;