mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
allow ioredis client (#40375)
* allow ioredis client * update Definitions
This commit is contained in:
parent
21f0c51251
commit
477dcb3404
15
types/connect-redis/index.d.ts
vendored
15
types/connect-redis/index.d.ts
vendored
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user