UNPKG

612 BTypeScriptView Raw
1/* eslint-disable @typescript-eslint/no-explicit-any */
2declare class AvMessage {
3 // eslint-disable-next-line @typescript-eslint/ban-types
4 public subscribers: object;
5
6 public enabled: (value?: boolean) => boolean;
7
8 public subscribe: (eventName?: string, fn: (data?: any) => void) => () => void;
9
10 public unsubscribe: (eventName?: string) => void;
11
12 public unsubscribeAll: () => void;
13
14 public send: (payload: any, target?: Window) => void;
15
16 private getEventData: (eventData?: any) => void;
17
18 private isDomain: (url: string) => boolean;
19
20 private domain: () => string;
21}
22
23export default AvMessage;