denodrivers / redis

🦕 Redis client for Deno 🍕

Home Page:https://deno.land/x/redis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Redis.scan` cursor parameter requires a number

chromakode opened this issue · comments

scan takes a number cursor:

redis/redis.ts

Lines 2278 to 2281 in fb773be

scan(
cursor: number,
opts?: ScanOpts,
) {

The cursor returned by this method is a string, so it needs to be coerced to pass back into the next iteration of scan.

In contrast, hscan takes a string cursor:

redis/redis.ts

Lines 2288 to 2292 in fb773be

sscan(
key: string,
cursor: number,
opts?: SScanOpts,
) {

Should the cursor param of scan be changed to a string?