Skip to content

del() with non-array arguments cause Redis (AWS Redis) to throw #2002

@fmlukaszmatusik

Description

@fmlukaszmatusik

I've been struggling with using del() method with either

const array = ['key1', 'key2'];
del(...array);

or just

const key1 = 'key1';
const key2 = 'key2';
del(key1, key2);

What I've discovered is (probably) a bug or invalid typing (OverloadedCommand interface).

If I try to delete keys as above, Redis fails, throws an exception (without any specific message).

But If I do it like this

const array = ['key1', 'key2'];
del(array);

or

const key1 = 'key1';
const key2 = 'key2';
del([key1, key2]);

It works. Seems del() signature is invalid(?). You cannot spread arguments; it works only with an array of strings.

EDIT: del with array does not work too with AWS Redis: #2002 (comment)


  • Redis version: AWS Redis 7.1
  • Package version: 5.7.0
  • Node.js version: 22.18.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions