Type 'Redis' is not assignable to parameter of type 'Store'.
J053Fabi0 opened this issue · comments
There's a problem with the typing of the example in the README. Here's my code:
import { connect } from "redis/mod.ts";
import { redisSession } from "fresh-session/mod.ts";
const redis = await connect({
port: REDIS_PORT,
hostname: REDIS_HOSTNAME,
});
export const { handler }: Middleware<State> = {
handler: [
redisSession(redis, {
secure: true,
httpOnly: true,
sameSite: "Strict",
maxAge: Number.MAX_SAFE_INTEGER,
})
]
};
deno.json
"redis/": "https://deno.land/x/redis@v0.30.0/",
"fresh-session/": "https://deno.land/x/fresh_session@0.2.1/",
Error:
Argument of type 'Redis' is not assignable to parameter of type 'Store'.
Type 'Redis' is missing the following properties from type 'Store': set, get, del
Never mind, it was a problem with my cache. I reload it and it worked again.