File tree Expand file tree Collapse file tree 4 files changed +10
-15
lines changed Expand file tree Collapse file tree 4 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,6 @@ export const queryIdentifier = function(query: Query) {
83
83
return query . queryIdentifier ( ) ;
84
84
} ;
85
85
86
- /**
87
- * @param {!Query } firebaseRef
88
- * @return {!Object }
89
- */
90
- export const listens = function ( firebaseRef : Query ) {
91
- return ( firebaseRef . repo . persistentConnection_ as any ) . listens_ ;
92
- } ;
93
-
94
86
/**
95
87
* Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.
96
88
*
Original file line number Diff line number Diff line change @@ -1575,10 +1575,11 @@ describe('Query Tests', function() {
1575
1575
} ) ;
1576
1576
1577
1577
function dumpListens ( node : Query ) {
1578
- const listens = ( node . repo . persistentConnection_ as any ) . listens_ ;
1578
+ const listens : Map < string , Map < string , unknown > > = ( node . repo
1579
+ . persistentConnection_ as any ) . listens ;
1579
1580
const nodePath = getPath ( node ) ;
1580
1581
const listenPaths = [ ] ;
1581
- for ( let path in listens ) {
1582
+ for ( let path of listens . keys ( ) ) {
1582
1583
if ( path . substring ( 0 , nodePath . length ) === nodePath ) {
1583
1584
listenPaths . push ( path ) ;
1584
1585
}
@@ -1588,7 +1589,7 @@ describe('Query Tests', function() {
1588
1589
const dumpPieces = [ ] ;
1589
1590
for ( let i = 0 ; i < listenPaths . length ; i ++ ) {
1590
1591
const queryIds = [ ] ;
1591
- for ( let queryId in listens [ listenPaths [ i ] ] ) {
1592
+ for ( let queryId of listens . get ( listenPaths [ i ] ) . keys ( ) ) {
1592
1593
queryIds . push ( queryId ) ;
1593
1594
}
1594
1595
queryIds . sort ( ) ;
Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ export function isEmpty(obj: object): obj is {} {
45
45
export function map < T extends object , V , U extends { [ key in keyof T ] : V } > (
46
46
obj : T ,
47
47
fn : ( value : Values < T > , key : Keys < T > , obj : T ) => V ,
48
- opt_obj ?: unknown
48
+ contextObj ?: unknown
49
49
) : U {
50
50
const res : Partial < U > = { } ;
51
51
for ( const key in obj ) {
52
52
if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) {
53
- res [ key ] = fn . call ( opt_obj , obj [ key ] , key , obj ) ;
53
+ res [ key ] = fn . call ( contextObj , obj [ key ] , key , obj ) ;
54
54
}
55
55
}
56
56
return res as U ;
Original file line number Diff line number Diff line change 20
20
* params object (e.g. {arg: 'val', arg2: 'val2'})
21
21
* Note: You must prepend it with ? when adding it to a URL.
22
22
*/
23
- export function querystring ( querystringParams : { [ key : string ] : string } ) {
24
- var params = [ ] ;
23
+ export function querystring ( querystringParams : {
24
+ [ key : string ] : string ;
25
+ } ) : string {
26
+ const params = [ ] ;
25
27
for ( const [ key , value ] of Object . entries ( querystringParams ) ) {
26
28
if ( Array . isArray ( value ) ) {
27
29
value . forEach ( arrayVal => {
You can’t perform that action at this time.
0 commit comments