Incompatible with ioredis 5.x.x
SammyWhamy opened this issue · 3 comments
SammyWhamy commented
error TS2322: Type 'Redis' is not assignable to type 'RedisClient'.
Types of property 'multi' are incompatible.
Type '{ (options: { pipeline: false; }): Promise<"OK">; (): ChainableCommander; (options: { pipeline: true; }): ChainableCommander; (commands?: unknown[][] | undefined): ChainableCommander; }' is not assignable to type '() => RedisBatch'.
21 client: redis,
~~~~~~
node_modules/rolling-rate-limiter/lib/index.d.ts:100:5
100 client: RedisClient;
~~~~~~
The expected type comes from property 'client' which is declared here on type 'RedisRateLimiterOptions'
peterkhayes commented
Thanks for the heads up. Would appreciate a fix if you have time; probably just a type-level thing. If not I will get to this eventually.
victorhcortesp commented
Is it possible that they also have problems with version 4 of redis?
peterkhayes commented
This is now fixed! Upgrade to 0.4 and the newest versions of redis
and ioredis
will both work!