mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Merge pull request #33630 from sbutler2901/connect-redis-ttl
@types/connect-redis RedisStore ttl function support
This commit is contained in:
@@ -6,5 +6,8 @@ const store = new RedisStore({
|
||||
host: 'localhost',
|
||||
port: 6379,
|
||||
logErrors: error => console.warn(error),
|
||||
scanCount: 80,
|
||||
scanCount: 80,
|
||||
ttl: (store, sess, sessionID) => {
|
||||
return 60;
|
||||
}
|
||||
});
|
||||
|
||||
Vendored
+2
-1
@@ -1,6 +1,7 @@
|
||||
// Type definitions for connect-redis
|
||||
// Project: https://npmjs.com/package/connect-redis
|
||||
// Definitions by: Xavier Stouder <https://github.com/xstoudi>
|
||||
// Seth Butler <https://github.com/sbutler2901>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -26,7 +27,7 @@ declare module "connect-redis" {
|
||||
port?: number;
|
||||
socket?: string;
|
||||
url?: string;
|
||||
ttl?: number;
|
||||
ttl?: number | string | ((store: RedisStore, sess: Express.SessionData, sid: string) => number);
|
||||
disableTTL?: boolean;
|
||||
db?: number;
|
||||
pass?: string;
|
||||
|
||||
Reference in New Issue
Block a user