mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Updated RedisStoreOptions in @types/connect-redis
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
3
types/connect-redis/index.d.ts
vendored
3
types/connect-redis/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user