mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
changed recommended by tslint break other projects (mongo-store) depending on this declaration, so reverted
This commit is contained in:
parent
1a4cd67206
commit
2b902bfe59
42
types/express-session/index.d.ts
vendored
42
types/express-session/index.d.ts
vendored
@ -24,7 +24,7 @@ declare global {
|
||||
interface SessionCookieData {
|
||||
originalMaxAge: number;
|
||||
path: string;
|
||||
maxAge: number;
|
||||
maxAge: number | null;
|
||||
secure?: boolean;
|
||||
httpOnly: boolean;
|
||||
domain?: string;
|
||||
@ -64,35 +64,35 @@ declare namespace session {
|
||||
}
|
||||
|
||||
interface BaseMemoryStore {
|
||||
get(sid: string, callback: (err: any, session: Express.Session) => void): void;
|
||||
set(sid: string, session: Express.Session, callback: (err: any) => void): void;
|
||||
destroy(sid: string, callback: (err: any) => void): void;
|
||||
length?(callback: (err: any, length: number) => void): void;
|
||||
clear?(callback: (err: any) => void): void;
|
||||
get: (sid: string, callback: (err: any, session: Express.Session) => void) => void;
|
||||
set: (sid: string, session: Express.Session, callback: (err: any) => void) => void;
|
||||
destroy: (sid: string, callback: (err: any) => void) => void;
|
||||
length?: (callback: (err: any, length: number) => void) => void;
|
||||
clear?: (callback: (err: any) => void) => void;
|
||||
}
|
||||
|
||||
abstract class Store extends node.EventEmitter {
|
||||
constructor(config?: any);
|
||||
|
||||
regenerate(req: express.Request, fn: (err: any) => any): void;
|
||||
load(sid: string, fn: (err: any, session: Express.Session) => any): void;
|
||||
createSession(req: express.Request, sess: Express.SessionData): void;
|
||||
regenerate: (req: express.Request, fn: (err: any) => any) => void;
|
||||
load: (sid: string, fn: (err: any, session: Express.Session) => any) => void;
|
||||
createSession: (req: express.Request, sess: Express.SessionData) => void;
|
||||
|
||||
get(sid: string, callback: (err: any, session: Express.Session) => void): void;
|
||||
set(sid: string, session: Express.Session, callback: (err: any) => void): void;
|
||||
destroy(sid: string, callback: (err: any) => void): void;
|
||||
all(callback: (err: any, obj: { [sid: string]: Express.SessionData; }) => void): void;
|
||||
length(callback: (err: any, length: number) => void): void;
|
||||
clear(callback: (err: any) => void): void;
|
||||
get: (sid: string, callback: (err: any, session: Express.Session) => void) => void;
|
||||
set: (sid: string, session: Express.Session, callback: (err: any) => void) => void;
|
||||
destroy: (sid: string, callback: (err: any) => void) => void;
|
||||
all: (callback: (err: any, obj: { [sid: string]: Express.SessionData; }) => void) => void;
|
||||
length: (callback: (err: any, length: number) => void) => void;
|
||||
clear: (callback: (err: any) => void) => void;
|
||||
}
|
||||
|
||||
class MemoryStore implements BaseMemoryStore {
|
||||
get(sid: string, callback: (err: any, session: Express.Session) => void): void;
|
||||
set(sid: string, session: Express.Session, callback: (err: any) => void): void;
|
||||
destroy(sid: string, callback: (err: any) => void): void;
|
||||
all(callback: (err: any, obj: { [sid: string]: Express.Session; }) => void): void;
|
||||
length(callback: (err: any, length: number) => void): void;
|
||||
clear(callback: (err: any) => void): void;
|
||||
get: (sid: string, callback: (err: any, session: Express.Session) => void) => void;
|
||||
set: (sid: string, session: Express.Session, callback: (err: any) => void) => void;
|
||||
destroy: (sid: string, callback: (err: any) => void) => void;
|
||||
all: (callback: (err: any, obj: { [sid: string]: Express.Session; }) => void) => void;
|
||||
length: (callback: (err: any, length: number) => void) => void;
|
||||
clear: (callback: (err: any) => void) => void;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user