Skip to content

Command parameter enums not exported #2805

Open
@redlizard

Description

@redlizard

Description

I am trying to invoke the clientKill() command on a redis client object. This command takes a parameter object containing a field of type enum ClientKillFilters. But this enum is not exported by the redis or @redis/client packages, which means there is no way to supply a valid parameter object for this command.

The same is true for other commands that take an enum parameter, of which there are a handful. A quick grep shows:

  • COMMAND_LIST
  • CLIENT_KILL
  • CLUSTER_FAILOVER
  • CLUSTER_NODES
  • CLUSTER_SETSLOTS
  • FLUSHALL

I have found a workaround by importing the enum from the '@redis/client/dist/lib/commands/CLIENT_KILL' package, but obviously that is not a sustainable solution. The @redis/client package should either export those enums, or replace the enums altogether with one-of-several-strings parameters.

Node.js Version

v20.14.0

Redis Server Version

No response

Node Redis Version

4.6.14

Platform

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions