Bläddra i källkod

feat(ts) TypeScript enum for ConnectionQualityEvents

dev1
Gary Hunt 3 år sedan
förälder
incheckning
4815406abd
Inget konto är kopplat till bidragsgivarens mejladress

+ 0
- 10
service/connectivity/ConnectionQualityEvents.js Visa fil

@@ -1,10 +0,0 @@
1
-/**
2
- * Indicates that the local connection statistics were updated.
3
- */
4
-export const LOCAL_STATS_UPDATED = 'cq.local_stats_updated';
5
-
6
-/**
7
- * Indicates that the connection statistics for a particular remote participant
8
- * were updated.
9
- */
10
-export const REMOTE_STATS_UPDATED = 'cq.remote_stats_updated';

+ 17
- 0
service/connectivity/ConnectionQualityEvents.ts Visa fil

@@ -0,0 +1,17 @@
1
+export enum ConnectionQualityEvents {
2
+    /**
3
+     * Indicates that the local connection statistics were updated.
4
+     */
5
+    LOCAL_STATS_UPDATED = 'cq.local_stats_updated',
6
+
7
+    /**
8
+     * Indicates that the connection statistics for a particular remote participant
9
+     * were updated.
10
+     */
11
+    REMOTE_STATS_UPDATED = 'cq.remote_stats_updated'
12
+};
13
+
14
+// exported for backward compatibility
15
+export const LOCAL_STATS_UPDATED = ConnectionQualityEvents.LOCAL_STATS_UPDATED;
16
+export const REMOTE_STATS_UPDATED = ConnectionQualityEvents.REMOTE_STATS_UPDATED;
17
+

+ 13
- 9
types/auto/service/connectivity/ConnectionQualityEvents.d.ts Visa fil

@@ -1,9 +1,13 @@
1
-/**
2
- * Indicates that the local connection statistics were updated.
3
- */
4
-export const LOCAL_STATS_UPDATED: "cq.local_stats_updated";
5
-/**
6
- * Indicates that the connection statistics for a particular remote participant
7
- * were updated.
8
- */
9
-export const REMOTE_STATS_UPDATED: "cq.remote_stats_updated";
1
+export declare enum ConnectionQualityEvents {
2
+    /**
3
+     * Indicates that the local connection statistics were updated.
4
+     */
5
+    LOCAL_STATS_UPDATED = "cq.local_stats_updated",
6
+    /**
7
+     * Indicates that the connection statistics for a particular remote participant
8
+     * were updated.
9
+     */
10
+    REMOTE_STATS_UPDATED = "cq.remote_stats_updated"
11
+}
12
+export declare const LOCAL_STATS_UPDATED = ConnectionQualityEvents.LOCAL_STATS_UPDATED;
13
+export declare const REMOTE_STATS_UPDATED = ConnectionQualityEvents.REMOTE_STATS_UPDATED;

Laddar…
Avbryt
Spara