@@ -10,15 +10,15 @@ export class VercelKV extends Redis {
1010 * Same as `scan` but returns an AsyncIterator to allow iteration via `for await`.
1111 */
1212 async * scanIterator ( options ?: ScanCommandOptions ) : AsyncIterable < string > {
13- let cursor = 0 ;
13+ let cursor = '0' ;
1414 let keys : string [ ] ;
1515 do {
1616 // eslint-disable-next-line no-await-in-loop -- [@vercel/style-guide@5 migration]
1717 [ cursor , keys ] = await this . scan ( cursor , options ) ;
1818 for ( const key of keys ) {
1919 yield key ;
2020 }
21- } while ( cursor !== 0 ) ;
21+ } while ( cursor !== '0' ) ;
2222 }
2323
2424 /**
@@ -28,15 +28,15 @@ export class VercelKV extends Redis {
2828 key : string ,
2929 options ?: ScanCommandOptions ,
3030 ) : AsyncIterable < string | number > {
31- let cursor = 0 ;
31+ let cursor = '0' ;
3232 let items : ( number | string ) [ ] ;
3333 do {
3434 // eslint-disable-next-line no-await-in-loop -- [@vercel/style-guide@5 migration]
3535 [ cursor , items ] = await this . hscan ( key , cursor , options ) ;
3636 for ( const item of items ) {
3737 yield item ;
3838 }
39- } while ( cursor !== 0 ) ;
39+ } while ( cursor !== '0' ) ;
4040 }
4141
4242 /**
@@ -46,15 +46,15 @@ export class VercelKV extends Redis {
4646 key : string ,
4747 options ?: ScanCommandOptions ,
4848 ) : AsyncIterable < string | number > {
49- let cursor = 0 ;
49+ let cursor = '0' ;
5050 let items : ( number | string ) [ ] ;
5151 do {
5252 // eslint-disable-next-line no-await-in-loop -- [@vercel/style-guide@5 migration]
5353 [ cursor , items ] = await this . sscan ( key , cursor , options ) ;
5454 for ( const item of items ) {
5555 yield item ;
5656 }
57- } while ( cursor !== 0 ) ;
57+ } while ( cursor !== '0' ) ;
5858 }
5959
6060 /**
@@ -64,15 +64,15 @@ export class VercelKV extends Redis {
6464 key : string ,
6565 options ?: ScanCommandOptions ,
6666 ) : AsyncIterable < string | number > {
67- let cursor = 0 ;
67+ let cursor = '0' ;
6868 let items : ( number | string ) [ ] ;
6969 do {
7070 // eslint-disable-next-line no-await-in-loop -- [@vercel/style-guide@5 migration]
7171 [ cursor , items ] = await this . zscan ( key , cursor , options ) ;
7272 for ( const item of items ) {
7373 yield item ;
7474 }
75- } while ( cursor !== 0 ) ;
75+ } while ( cursor !== '0' ) ;
7676 }
7777}
7878
0 commit comments