-
Notifications
You must be signed in to change notification settings - Fork 76
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
Node Client: zadd does not support -inf and inf for score #3360
Comments
Thank you for reporting this issue! We are prioritizing it and will have a fix soon. |
Hello @woodne 🙂 Thanks for pointing this out! This was an unintended omission, and we will address it in the upcoming release. 🚀 Is this currently blocking you? If so, we can provide a patch or a release candidate to unblock you sooner. Let us know what works best for you! |
I do not believe it is actively blocking me, I just came across it as I am adapting some code to port from |
I understand, thank you so much! |
Hi @woodne , while we are still working on the fix, there's a confirmed workaround if you really need it:
You can use |
Describe the bug
The type parameters of the nodejs client do not allow the special cases of
-inf
and+inf
as described in the valkey zadd command documentation. Is this an intentional omission, or a miss?Typescript playground: https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgcQDbACYFMDC6sB28AvnAGZQQhwDkAAgG4CGqA1lgJ4D0zbnAtAHN02GgG4AUBIDGEAgGd40-ETgBeOEwDuTYPDSZcKmADppULExhHghGAAoEEuC80YMF+fKzyAXHABtAF0AGgliAEpJCW1dJWMTAC8md3sAIhAOAGlONJDEOD0sEABGfxL8opAAJn80-mACMjS4SKA
Expected Behavior
Expect to be able to set score to
-inf
or+inf
forzadd
commandCurrent Behavior
The types for zadd do not allow it, and get a compilation error: https://github.com/valkey-io/valkey-glide/blob/main/node/src/BaseClient.ts#L4021-L4025
Reproduction Steps
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgcQDbACYFMDC6sB28AvnAGZQQhwDkAAgG4CGqA1lgJ4D0zbnAtAHN02GgG4AUBIDGEAgGd40-ETgBeOEwDuTYPDSZcKmADppULExhHghGAAoEEuC80YMF+fKzyAXHABtAF0AGgliAEpJCW1dJWMTAC8md3sAIhAOAGlONJDEOD0sEABGfxL8opAAJn80-mACMjS4SKA
Possible Solution
No response
Additional Information/Context
No response
Client version used
1.3.0
Engine type and version
Valkey 7.0
OS
macOS
Language
TypeScript
Language Version
TypeScript 5.6.3
Cluster information
No response
Logs
No response
Other information
No response
The text was updated successfully, but these errors were encountered: