1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
Leibale
2023-07-06 11:07:52 -04:00
parent 9e1ec97a55
commit 6ca420f15e
9 changed files with 45 additions and 44 deletions

View File

@@ -7,7 +7,7 @@ export interface ScanCommonOptions {
export function pushScanArguments(
args: CommandArguments,
cursor: number,
cursor: RedisArgument,
options?: ScanOptions
): CommandArguments {
args.push(cursor.toString());
@@ -30,7 +30,7 @@ export interface ScanOptions extends ScanCommonOptions {
export default {
FIRST_KEY_INDEX: undefined,
IS_READ_ONLY: true,
transformArguments(cursor: number, options?: ScanOptions) {
transformArguments(cursor: string, options?: ScanOptions) {
const args = pushScanArguments(['SCAN'], cursor, options);
if (options?.TYPE) {
@@ -41,7 +41,7 @@ export default {
},
transformReply([cursor, keys]: [BlobStringReply, ArrayReply<BlobStringReply>]) {
return {
cursor: Number(cursor),
cursor,
keys
};
}