You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…240)
Fixes#30
Now that v2 has a more maintainable "patching" system, this works around redis/redis-doc#1420 - to be removed if a fix is merged there.
This effectively allows string values to be passed as min and max for ZRANGEBYSCORE, ZREMRANGEBYSCORE, ZREVRANGEBYSCORE and ZCOUNT.
Note: in future, it may be possible to use template literal types to only allow strings like (1 rather than any strings, but it's likely too complex and will require a higher typescript version than most users have.
That's just a workaround in a downstream library. The issue is that commands.json in this repo reports an incomplete type for the min/max arguments, and that's still the case, so it shouldn't be closed.
In
commands.json
, ZRANGEBYSCORE has itsmin
andmax
arguments asdouble
:redis-doc/commands.json
Lines 3806 to 3813 in e978cf5
But the value is also allowed to be
+inf
,-inf
,(1
etc.Likewise with ZREMRANGEBYSCORE, ZREVRANGEBYSCORE and ZCOUNT.
It'd be great if commands.json could somehow indicate that more than just
double
is allowed.Note that #1232 would solve this problem with no extra effort, because this is already possible to express precisely with json schema:
json equivalent
Related: mmkal/handy-redis#30
The text was updated successfully, but these errors were encountered: