Skip to content

Commit

Permalink
feat(ts) convert service/statistics/constants to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
garyhuntddn authored Mar 14, 2022
1 parent 2f51b7a commit f542c03
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
5 changes: 0 additions & 5 deletions service/statistics/constants.js

This file was deleted.

6 changes: 1 addition & 5 deletions service/statistics/constants.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ import * as exported from "./constants";
describe( "/service/statistics/constants members", () => {
const {
LOCAL_JID,
Constants,
...others
} = exported as any; // TODO: remove cast after typescript conversion
} = exported;

it( "known members", () => {
expect( LOCAL_JID ).toBe( 'local' );
if ( Constants ) {
expect( Constants.LOCAL_JID ).toBe( 'local' );
}
} );

it( "unknown members", () => {
Expand Down
1 change: 1 addition & 0 deletions service/statistics/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const LOCAL_JID = 'local'
2 changes: 1 addition & 1 deletion types/auto/service/statistics/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const LOCAL_JID: string;
export declare const LOCAL_JID = "local";

0 comments on commit f542c03

Please sign in to comment.