Open ericrav opened 10 months ago
If you swap the arguments so it's redis.set('key', 'value', 'EX', 1000, 'NX');
it works, though this isn't how the redis docs describe the command https://redis.io/commands/set/ this is the definition that's causing it
set(
key: RedisKey,
value: string | Buffer | number,
secondsToken: "EX",
seconds: number | string,
nx: "NX",
callback?: Callback<"OK" | null>
): Result<"OK" | null, Context>;
https://raw.githubusercontent.com/redis/ioredis/main/lib/utils/RedisCommander.ts
I just ran into this issue as well
Yep, the only way to do it the officially documented way is to add @ts-ignore, which is really bad practice.
For example:
results in: