Upgrade typedefs for ioredis to v5
ahkhanjani opened this issue · comments
Amir H. Khanjani commented
This code:
import * as session from 'express-session';
import Redis from 'ioredis';
import connectRedis from 'connect-redis';
const redis = new Redis();
const RedisStore = connectRedis(session);
app.use(
session({
store: new RedisStore({ client: redis })
})
);
Produces this error:
Type 'Redis' is not assignable to type 'Client'.
Type 'Redis' is missing the following properties from type 'Cluster': nodes, rpushBuffer, lpushBuffer, hsetBuffer, and 2 more.ts(2322)
index.d.ts(28, 13): The expected type comes from property 'client' which is declared here on type 'RedisStoreOptions'
ioredis v5 uses built-in typedefs instead of @types/ioredis. Please consider upgrading.
Marc Harter commented
Types for this project are not officially maintained, they are maintained by a third party so would need to be updated there.