Updated RedisStoreOptions in @types/connect-redis

This commit is contained in:
Albert Kurniawan
2017-06-12 23:06:46 +10:00
parent 1a3263397f
commit d0e3272803
2 changed files with 9 additions and 0 deletions

View File

@@ -2,3 +2,9 @@ import * as connectRedis from "connect-redis";
import * as session from "express-session";
let RedisStore = connectRedis(session);
const store = new RedisStore({
host: 'localhost',
port: 6379,
logErrors: error => console.warn(error),
scanCount: 80,
});

View File

@@ -1,6 +1,7 @@
// Type definitions for connect-redis
// Project: https://npmjs.com/package/connect-redis
// Definitions by: Xavier Stouder <https://github.com/xstoudi>
// Albert Kurniawan <https://github.com/morcerf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="express" />
@@ -32,6 +33,8 @@ declare module "connect-redis" {
prefix?: string;
unref?: boolean;
serializer?: Serializer | JSON;
logErrors?: boolean | ((error: string) => void);
scanCount?: number;
}
interface Serializer {
stringify: Function;