Skip to content

Commit

Permalink
Update typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Grondin committed Jul 17, 2019
1 parent 78ae54b commit 79632ea
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bottleneck.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ declare module "bottleneck" {
* An existing Bottleneck.RedisConnection or Bottleneck.IORedisConnection object to use.
* If using, `datastore`, `clientOptions` and `clusterNodes` will be ignored.
*/
/**
* Optional Redis/IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require Redis/IORedis at runtime.
*/
readonly Redis?: any;
/**
* Bottleneck connection object created from `new Bottleneck.RedisConnection` or `new Bottleneck.IORedisConnection`.
*/
readonly connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection | null;
/**
* When set to `true`, on initial startup, the limiter will wipe any existing Bottleneck state data on the Redis db.
Expand Down Expand Up @@ -170,7 +177,7 @@ declare module "bottleneck" {
*/
readonly client?: any;
/**
* Optional IORedis library from `require('ioredis')` or equivalent. If not, bottleneck will attempt to require ioredis at runtime.
* Optional Redis library from `require('redis')` or equivalent. If not, Bottleneck will attempt to require Redis at runtime.
*/
readonly Redis?: any;
};
Expand All @@ -189,7 +196,7 @@ declare module "bottleneck" {
*/
readonly client?: any;
/**
* Optional IORedis library from `require('ioredis')` or equivalent. If not, bottleneck will attempt to require
* Optional IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require IORedis at runtime.
*/
readonly Redis?: any;
};
Expand Down
15 changes: 15 additions & 0 deletions bottleneck.d.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ declare module "bottleneck" {
* An existing Bottleneck.RedisConnection or Bottleneck.IORedisConnection object to use.
* If using, `datastore`, `clientOptions` and `clusterNodes` will be ignored.
*/
/**
* Optional Redis/IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require Redis/IORedis at runtime.
*/
readonly Redis?: any;
/**
* Bottleneck connection object created from `new Bottleneck.RedisConnection` or `new Bottleneck.IORedisConnection`.
*/
readonly connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection | null;
/**
* When set to `true`, on initial startup, the limiter will wipe any existing Bottleneck state data on the Redis db.
Expand Down Expand Up @@ -169,6 +176,10 @@ declare module "bottleneck" {
* An existing NodeRedis client to use. If using, `clientOptions` will be ignored.
*/
readonly client?: any;
/**
* Optional Redis library from `require('redis')` or equivalent. If not, Bottleneck will attempt to require Redis at runtime.
*/
readonly Redis?: any;
};

type IORedisConnectionOptions = {
Expand All @@ -184,6 +195,10 @@ declare module "bottleneck" {
* An existing ioredis client to use. If using, `clientOptions` and `clusterNodes` will be ignored.
*/
readonly client?: any;
/**
* Optional IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require IORedis at runtime.
*/
readonly Redis?: any;
};

type BatcherOptions = {
Expand Down

0 comments on commit 79632ea

Please sign in to comment.