allow ioredis client (#40375)

* allow ioredis client

* update Definitions
This commit is contained in:
Jip Sterk 2019-11-14 20:41:39 +01:00 committed by Pranav Senthilnathan
parent 21f0c51251
commit 477dcb3404

View File

@ -2,6 +2,7 @@
// Project: https://npmjs.com/package/connect-redis
// Definitions by: Xavier Stouder <https://github.com/xstoudi>
// Seth Butler <https://github.com/sbutler2901>
// Jip Sterk <https://github.com/JipSterk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@ -9,21 +10,21 @@
/// <reference types="express-session" />
/// <reference types="redis" />
declare module "connect-redis" {
import * as express from "express";
import * as session from "express-session";
import * as redis from "redis";
declare module 'connect-redis' {
import * as express from 'express';
import * as session from 'express-session';
import * as ioRedis from 'ioredis';
import * as redis from 'redis';
function s(options: (options?: session.SessionOptions) => express.RequestHandler): s.RedisStore;
namespace s {
interface RedisStore extends session.Store {
new (options: RedisStoreOptions): RedisStore;
client: redis.RedisClient;
client: redis.RedisClient | ioRedis.Redis;
}
interface RedisStoreOptions {
client?: redis.RedisClient;
client?: redis.RedisClient | ioRedis.Redis;
host?: string;
port?: number;
socket?: string;