@@ -21,12 +21,12 @@ export class RBSegmentsCacheInRedis implements IRBSegmentsCacheAsync {
2121
2222 get ( name : string ) : Promise < IRBSegment | null > {
2323 return this . redis . get ( this . keys . buildRBSegmentKey ( name ) )
24- . then ( maybeRBSegment => maybeRBSegment && JSON . parse ( maybeRBSegment ) ) ;
24+ . then ( ( maybeRBSegment : string | null ) => maybeRBSegment && JSON . parse ( maybeRBSegment ) ) ;
2525 }
2626
2727 private getNames ( ) : Promise < string [ ] > {
2828 return this . redis . keys ( this . keys . searchPatternForRBSegmentKeys ( ) ) . then (
29- ( listOfKeys ) => listOfKeys . map ( this . keys . extractKey )
29+ ( listOfKeys : string [ ] ) => listOfKeys . map ( this . keys . extractKey )
3030 ) ;
3131 }
3232
@@ -47,7 +47,7 @@ export class RBSegmentsCacheInRedis implements IRBSegmentsCacheAsync {
4747 } ) ) ,
4848 Promise . all ( toRemove . map ( toRemove => {
4949 const key = this . keys . buildRBSegmentKey ( toRemove . name ) ;
50- return this . redis . del ( key ) . then ( status => status === 1 ) ;
50+ return this . redis . del ( key ) . then ( ( status : number ) => status === 1 ) ;
5151 } ) )
5252 ] ) . then ( ( [ , added , removed ] ) => {
5353 return added . some ( result => result ) || removed . some ( result => result ) ;
@@ -56,7 +56,7 @@ export class RBSegmentsCacheInRedis implements IRBSegmentsCacheAsync {
5656
5757 setChangeNumber ( changeNumber : number ) {
5858 return this . redis . set ( this . keys . buildRBSegmentsTillKey ( ) , changeNumber + '' ) . then (
59- status => status === 'OK'
59+ ( status : string | null ) => status === 'OK'
6060 ) ;
6161 }
6262
@@ -65,7 +65,7 @@ export class RBSegmentsCacheInRedis implements IRBSegmentsCacheAsync {
6565 const i = parseInt ( value as string , 10 ) ;
6666
6767 return isNaNNumber ( i ) ? - 1 : i ;
68- } ) . catch ( ( e ) => {
68+ } ) . catch ( ( e : unknown ) => {
6969 this . log . error ( LOG_PREFIX + 'Could not retrieve changeNumber from storage. Error: ' + e ) ;
7070 return - 1 ;
7171 } ) ;
0 commit comments