roccomuso / memorystore

express-session full featured MemoryStore layer without leaks!
MIT License
120 stars 20 forks source link

Typescript error since 1.6.5 #26

Closed SammyWhamy closed 3 years ago

SammyWhamy commented 3 years ago

I am currently using memory store like this:

import session from 'express-session';
import MemoryStore from 'memorystore';
const mStore = MemoryStore(session);

This was working perfectly fine until the most recent update, where TypeScript throws an error:

dashboard/dashboard.ts:23:28 - error TS2345:
Argument of type 'typeof import("/node_modules/@types/express-session/index")' is not assignable to parameter of type 'typeof import("/node_modules/@types/express-session/index.d.ts")'.
Property 'default' is missing in type 'typeof import("/node_modules/@types/express-session/index")' but required in type 'typeof import("/node_modules/@types/express-session/index.d.ts")'.

23 const mStore = MemoryStore(session);

Downgrading back to 1.6.4 immediately resolves the issue again

roccomuso commented 3 years ago

I'm releasing a new version reverting latest commits

roccomuso commented 3 years ago

Please try it with v1.6.6

SammyWhamy commented 3 years ago

That fixed it, thank you!

joebowbeer commented 3 years ago

/close ?