Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command parameter enums not exported #2805

Open
redlizard opened this issue Jul 24, 2024 · 0 comments
Open

Command parameter enums not exported #2805

redlizard opened this issue Jul 24, 2024 · 0 comments
Labels

Comments

@redlizard
Copy link

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

@redlizard redlizard added the Bug label Jul 24, 2024
@redlizard redlizard changed the title Command enums not exported Command parameter enums not exported Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant