We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
When writing code, which flushes DB/all:
await client.flushDb()
There might be a need to flush asynchronously: https://redis.io/commands/flushdb/ client.flushDB() expects optional arg mode?: RedisFlushModes | undefined. This enum is implemented here: https://github.com/redis/node-redis/blob/master/packages/client/lib/commands/FLUSHALL.ts But the RedisFlushModes is not exported by redis module and cannot be referenced in the code. Am I missing something?
client.flushDB()
mode?: RedisFlushModes | undefined
RedisFlushModes
redis
v16.18.1
unrelated to server
redis@4.6.4
Linux
No response
The text was updated successfully, but these errors were encountered:
Until we fix it you can either import the type from the file directly
import { RedisFlushModes } from '@redis/client/dist/lib/commands/FLUSHALL.js';
or use as any
as any
client.flushDb('SYNC' as any);
Thanks for reporting!
Sorry, something went wrong.
fix redis#2411 - export RedisFlushModes
4dea972
fix #2411 - export RedisFlushModes (#2425)
63e5228
Successfully merging a pull request may close this issue.
Description
When writing code, which flushes DB/all:
There might be a need to flush asynchronously: https://redis.io/commands/flushdb/
client.flushDB()
expects optional argmode?: RedisFlushModes | undefined
.This enum is implemented here: https://github.com/redis/node-redis/blob/master/packages/client/lib/commands/FLUSHALL.ts
But the
RedisFlushModes
is not exported byredis
module and cannot be referenced in the code.Am I missing something?
Node.js Version
v16.18.1
Redis Server Version
unrelated to server
Node Redis Version
redis@4.6.4
Platform
Linux
Logs
No response
The text was updated successfully, but these errors were encountered: