Skip to content

PUBSUB_NUMSUB incorrect return type #3102

Description

@allohamora

Description

PUBSUB_NUMSUB returns strings instead of numbers

import { createClient } from 'redis';

const main = async () => {
  const client = createClient({
    url: 'redis://localhost:6379/0',
    password: 'example'
  });

  await client.connect();

  // Promise<{ [x: string]: number }>
  const res = await client.PUBSUB_NUMSUB(["test", "test2"]);

  // [Object: null prototype] { test: '0', test2: '0' }
  console.log(res);
};

void main();

Node.js Version

v22.13.0

Redis Server Version

docker image 6.2.6-alpine

Node Redis Version

5.8.3

Platform

macOS arm64

Logs

$ npx tsx index.ts
[Object: null prototype] { test: '0', test2: '0' }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions