File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1- //@ts -ignore
21import Redis from 'ioredis' ;
32import { RateLimiterOptions , RateLimiterSelection , TokenBucketOptions } from '../@types/rateLimit' ;
43import SlidingWindowCounter from '../rateLimiters/slidingWindowCounter' ;
@@ -21,6 +20,7 @@ export default function setupRateLimiter(
2120 switch ( selection ) {
2221 case 'TOKEN_BUCKET' :
2322 // todo validate options
23+ //@ts -ignore
2424 return new TokenBucket ( options . bucketSize , options . refillRate , client ) ;
2525 break ;
2626 case 'LEAKY_BUCKET' :
@@ -33,6 +33,7 @@ export default function setupRateLimiter(
3333 throw new Error ( 'Sliding Window Log has not be implemented.' ) ;
3434 break ;
3535 case 'SLIDING_WINDOW_COUNTER' :
36+ //@ts -ignore
3637 return new SlidingWindowCounter ( options . windowSize , options . capacity , client ) ;
3738 break ;
3839 default :
You can’t perform that action at this time.
0 commit comments