소스 검색

feat(ts) TypeScript enum for proxyconnection constants

dev1
Gary Hunt 3 년 전
부모
커밋
5747f4a8cb
No account linked to committer's email address
3개의 변경된 파일23개의 추가작업 그리고 19개의 파일을 삭제
  1. 0
    12
      modules/proxyconnection/constants.js
  2. 12
    0
      modules/proxyconnection/constants.ts
  3. 11
    7
      types/auto/modules/proxyconnection/constants.d.ts

+ 0
- 12
modules/proxyconnection/constants.js 파일 보기

@@ -1,12 +0,0 @@
1
-/**
2
- * The know jingle actions that can be sent and should be acted upon by
3
- * {@code ProxyConnectionService} and {@code ProxyConnectionPC}.
4
- */
5
-export const ACTIONS = {
6
-    ACCEPT: 'session-accept',
7
-    CONNECTION_ERROR: 'connection-error-encountered',
8
-    INITIATE: 'session-initiate',
9
-    TERMINATE: 'session-terminate',
10
-    TRANSPORT_INFO: 'transport-info',
11
-    UNAVAILABLE: 'unavailable'
12
-};

+ 12
- 0
modules/proxyconnection/constants.ts 파일 보기

@@ -0,0 +1,12 @@
1
+/**
2
+ * The know jingle actions that can be sent and should be acted upon by
3
+ * {@code ProxyConnectionService} and {@code ProxyConnectionPC}.
4
+ */
5
+export enum ACTIONS {
6
+    ACCEPT = 'session-accept',
7
+    CONNECTION_ERROR = 'connection-error-encountered',
8
+    INITIATE = 'session-initiate',
9
+    TERMINATE = 'session-terminate',
10
+    TRANSPORT_INFO = 'transport-info',
11
+    UNAVAILABLE = 'unavailable'
12
+};

+ 11
- 7
types/auto/modules/proxyconnection/constants.d.ts 파일 보기

@@ -1,8 +1,12 @@
1
-export namespace ACTIONS {
2
-    const ACCEPT: string;
3
-    const CONNECTION_ERROR: string;
4
-    const INITIATE: string;
5
-    const TERMINATE: string;
6
-    const TRANSPORT_INFO: string;
7
-    const UNAVAILABLE: string;
1
+/**
2
+ * The know jingle actions that can be sent and should be acted upon by
3
+ * {@code ProxyConnectionService} and {@code ProxyConnectionPC}.
4
+ */
5
+export declare enum ACTIONS {
6
+    ACCEPT = "session-accept",
7
+    CONNECTION_ERROR = "connection-error-encountered",
8
+    INITIATE = "session-initiate",
9
+    TERMINATE = "session-terminate",
10
+    TRANSPORT_INFO = "transport-info",
11
+    UNAVAILABLE = "unavailable"
8 12
 }

Loading…
취소
저장