yinzerflow 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { createClient } from 'redis';
1
+ import { Redis } from 'ioredis';
2
+ import { RedisClientType } from 'redis';
2
3
 
3
4
  /**
4
5
  * Generic types for handler callbacks that define the structure of request data
@@ -1646,6 +1647,7 @@ export interface BaseStoreConfig {
1646
1647
  /** Type of the store @default 'memory' */
1647
1648
  type: RateLimitStoreType;
1648
1649
  }
1650
+ export type RedisClient = Redis | RedisClientType;
1649
1651
  export interface MemoryStoreConfig extends BaseStoreConfig {
1650
1652
  type: "memory";
1651
1653
  }
@@ -1655,7 +1657,7 @@ export interface MemoryStoreConfig extends BaseStoreConfig {
1655
1657
  export interface RedisStoreConfig extends BaseStoreConfig {
1656
1658
  type: "redis";
1657
1659
  /** Redis client instance of ioredis or redis */
1658
- client: ReturnType<typeof createClient>;
1660
+ client: RedisClient;
1659
1661
  /** Key prefix for the rate limit keys @default 'rate_limit:' */
1660
1662
  keyPrefix?: string;
1661
1663
  /** Maximum number of connection retry attempts @default 3 */