Browse Source

feat(ts) convert service/statistics/constants to typescript

tags/v0.0.2
Gary Hunt 2 years ago
parent
commit
f542c03c07
No account linked to committer's email address

+ 0
- 5
service/statistics/constants.js View File

@@ -1,5 +0,0 @@
1
-const Constants = {
2
-    LOCAL_JID: 'local'
3
-};
4
-
5
-module.exports = Constants;

+ 1
- 5
service/statistics/constants.spec.ts View File

@@ -5,15 +5,11 @@ import * as exported from "./constants";
5 5
 describe( "/service/statistics/constants members", () => {
6 6
     const {
7 7
         LOCAL_JID,
8
-        Constants,
9 8
         ...others
10
-    } = exported as any; // TODO: remove cast after typescript conversion
9
+    } = exported;
11 10
 
12 11
     it( "known members", () => {
13 12
         expect( LOCAL_JID ).toBe( 'local' );
14
-        if ( Constants ) {
15
-            expect( Constants.LOCAL_JID ).toBe( 'local' );
16
-        }
17 13
     } );
18 14
 
19 15
     it( "unknown members", () => {

+ 1
- 0
service/statistics/constants.ts View File

@@ -0,0 +1 @@
1
+export const LOCAL_JID = 'local'

+ 1
- 1
types/auto/service/statistics/constants.d.ts View File

@@ -1 +1 @@
1
-export const LOCAL_JID: string;
1
+export declare const LOCAL_JID = "local";

Loading…
Cancel
Save