-
Notifications
You must be signed in to change notification settings - Fork 1.9k
RedisClientType not compatible across @redis/client versions #2556
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
Comments
We are changing the command options API in v5, which removes the |
Cool I hope this can be resolved in v5! I tried the I published an example repository to illustrate this: https://github.com/marwankhalili/redis-utility-example
|
Rethinking this, the root issue might be that Lines 25 to 32 in a7d5bc7
I believe this issue could be resolved if the caret (^) semver range specifier was used instead, but perhaps there's a reason why that isn't being used? |
Uh oh!
There was an error while loading. Please reload this page.
Description
Hi!
I'm trying to write a utility package for my microservices. Part of the abstraction is related to data stored in Redis‚ so I thought my utility package could reuse the microservice's client connection:
This utility package worked fine in one microservice, but caused a TypeScript error in another. I noticed the problem occurs when the internal
@redis/client
version differs between the utility package and the microservice.Minimal reproducible example:
package.json:
The TypeScript compatibility issue is partially due to the "private" class fields in the declaration files (see microsoft/TypeScript#18499) but also due to the unique symbol used in
CommandOptions<T>
. The example above only works if I remove both from the declaration files of@redis/client
.Node Redis Version
4.6.6
The text was updated successfully, but these errors were encountered: