Open kristianmandrup opened 3 months ago
import redisMock from "ioredis-mock";
const mockSender = new RedisSender(new redisMock.default());
Ah, thanks. Wasn't entirely clear from the docs. I also managed to get the linter to accept it by simply changing the import to:
import RedisMock from "ioredis-mock";
const redis = new RedisMock();
I've been trying to use this without success in typescript with nodenext. I installed typings from @types/ioredis-mock
The typings includes an index.d.ts which looks as follows:
I can see there is an old issue on this https://github.com/stipsan/ioredis-mock/issues/661#issuecomment-1344836474
It works if I add my own
ioredis.d.ts
file as follows whereredisMock
is capitalized toRedisMock