prisma-redis-middleware
prisma-redis-middleware copied to clipboard
Typescript error on `storage.type`
Describe the bug I copied the code form README page and although the code is working well, typescript gives me an error.
Code :
import Prisma from 'prisma';
import Redis from 'ioredis';
import { createPrismaRedisCache } from 'prisma-redis-middleware';
const redis = new Redis();
const cacheMiddleware: Prisma.Middleware = createPrismaRedisCache({
storage: {
type: 'redis', // error here : Type '"redis"' is not assignable to type '"memory"'.ts(2322)
options: {
client: redis,
invalidation: { // error here : Type '{ referencesTTL: number; }' is not assignable to type 'boolean | undefined'.ts(2322)
referencesTTL: 300
},
log: console
}
},
// rest of the code
});


Desktop (please complete the following information):
- OS: VSCode (1.70.2) devcontainer on WSL2 (Debian)