mmkal / handy-redis

A wrapper around node_redis with Promise and TypeScript support.
Apache License 2.0
172 stars 10 forks source link

SPOP return was string[] in 1.x, now it is string, but it can return an Array #230

Closed karli2000 closed 4 years ago

karli2000 commented 4 years ago

Hi,

thank you for releasing 2.0, great!

I just updated my code and saw that the Typescript definition for SPOP says it returns a string, in the previous version of handy-redis it was returning an array (because you can add the "count" parameter to get more than one), is this on purpose or a bug?

Keep up the great work, handy-redis makes it so much easier!

mmkal commented 4 years ago

@karli2000 thanks for the report! I should be able to get a fix for this out today. Ideally each command's return type would be properly exposed by redis-doc (I opened a PR along these lines a while ago, but sadly it hasn't got much traction: https://github.com/redis/redis-doc/pull/1232) - so please do let me know here if you spot other types that look wrong.

mmkal commented 4 years ago

Fixed in 2.0.1

karli2000 commented 4 years ago

Thank you very much!