forked from mweibel/connect-session-sequelize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
33 lines (26 loc) · 806 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
declare module 'connect-session-sequelize' {
import { Store } from 'express-session';
import { Sequelize, Model } from 'sequelize';
interface DefaultFields {
data: string;
expires: Date;
}
interface Data {
[column: string]: any;
}
interface SequelizeStoreOptions {
db: Sequelize;
table?: Model<any, any>;
extendDefaultFields?: (defaults: DefaultFields, session: any) => Data;
checkExpirationInterval?: number;
expiration?: number;
}
class SequelizeStore extends Store {
sync(): void
touch: (sid: string, data: any, callback?: (err: any) => void) => void
}
interface SequelizeStoreConstructor {
new(options: SequelizeStoreOptions): SequelizeStore;
}
export default function init(store: typeof Store): SequelizeStoreConstructor;
}