File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,20 @@ import { EventEmitter } from 'events';
33import { Store as ExpressStore } from 'express-session' ;
44import MemoryStore from './store/memory' ;
55
6- export function Store ( ) {
6+ function CompatibleStore ( ) {
77 // @ts -ignore
88 EventEmitter . call ( this ) ;
99}
10- inherits ( Store , EventEmitter ) ;
10+ inherits ( CompatibleStore , EventEmitter ) ;
1111
1212// no-op for compat
1313function expressSession ( options ?: any ) : any { }
1414
15- expressSession . Store = Store ;
15+ expressSession . Store = CompatibleStore ;
1616
1717function CallbackMemoryStore ( ) { }
18- inherits ( CallbackMemoryStore , Store ) ;
18+ inherits ( CallbackMemoryStore , CompatibleStore ) ;
19+
1920CallbackMemoryStore . prototype . get = callbackify ( MemoryStore . prototype . get ) ;
2021CallbackMemoryStore . prototype . set = callbackify ( MemoryStore . prototype . set ) ;
2122CallbackMemoryStore . prototype . destroy = callbackify (
Original file line number Diff line number Diff line change 11export { default as withSession } from './withSession' ;
22export { default as session } from './connect' ;
33export { applySession } from './core' ;
4- export { promisifyStore , expressSession , Store } from './compat' ;
4+ export { promisifyStore , expressSession } from './compat' ;
55export { default as MemoryStore } from './store/memory' ;
66export { SessionData , SessionCookieData , SessionStore } from './types' ;
You can’t perform that action at this time.
0 commit comments