mmkal / handy-redis

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

Overloaded multi commands have incorrect type #270

Closed scola84 closed 3 years ago

scola84 commented 3 years ago

When I try to use xadd on a batch I am forced to provide the NOMKSTREAM option, while there are four xadd definitions available. It seems as if in multi.ts#L52 only the last one is added to the batch/multi interface.

mmkal commented 3 years ago

Ah, I think this is a limitation of the Parameters<...> built-in type (see https://github.com/microsoft/TypeScript/issues/32164). I'll look into whether the whole multi/batch interface can be generated like the regular commands.

mmkal commented 3 years ago

@scola84 fix released in v2.2.0

scola84 commented 3 years ago

Successfully integrated, thanks!