mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
rolling-rate-limiter: replace intersection by extending interface
This commit is contained in:
+1
-2
@@ -15,7 +15,7 @@ declare namespace RollingRateLimiter {
|
||||
minDifference?: number;
|
||||
}
|
||||
|
||||
interface RedisOptions {
|
||||
interface WithRedisOptions extends GeneralOptions {
|
||||
redis: CompatibleRedisClient;
|
||||
namespace?: string;
|
||||
}
|
||||
@@ -25,7 +25,6 @@ declare namespace RollingRateLimiter {
|
||||
}
|
||||
|
||||
type InMemoryOptions = GeneralOptions;
|
||||
type WithRedisOptions = GeneralOptions & RedisOptions;
|
||||
|
||||
type AsyncLimiterWithToken = (token: string, callback: AsyncLimiterCallback) => void;
|
||||
type AsyncLimiterWithoutToken = (callback: AsyncLimiterCallback) => void;
|
||||
|
||||
Reference in New Issue
Block a user