gis-common 3.1.10 → 3.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ interface Event {
2
+ type: string;
3
+ message: any;
4
+ target?: any;
5
+ }
6
+ export default class EventDispatcher {
7
+ private _listeners;
8
+ private _mutex;
9
+ private _context;
10
+ addEventListener(type: string, listener: Function, context: any, mutexStatus?: boolean): EventDispatcher;
11
+ hasEventListener(type: string, listener: any): boolean;
12
+ removeEventListener(type: string, listener: any): void;
13
+ dispatchEvent(event: Event): void;
14
+ removeAllListener(): void;
15
+ }
16
+ export {};
@@ -0,0 +1,7 @@
1
+ export default class HashMap<K, V> extends Map<K, V> {
2
+ isEmpty(): boolean;
3
+ _values(): V[];
4
+ _keys(): K[];
5
+ _entries(): [K, V][];
6
+ fromEntries(): void;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { default as EventDispatcher } from './EventDispatcher';
2
+ export default class WebSocketClient extends EventDispatcher {
3
+ private maxCheckTimes;
4
+ private url;
5
+ private checkTimes;
6
+ private connectStatus;
7
+ private client;
8
+ constructor(url?: string);
9
+ connect(): void;
10
+ disconnect(): void;
11
+ connCheckStatus(times: number): void;
12
+ send(message: string): boolean;
13
+ heartbeat(): void;
14
+ }