@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
17 lines (16 loc) • 842 B
TypeScript
/**
* @module RateLimiter
*/
import { type IReadableContext } from "../../../../execution-context/contracts/_module.js";
import { type IRateLimiterAdapter, type IRateLimiterAdapterState } from "../../../../rate-limiter/contracts/_module.js";
/**
* The `NoOpRateLimiterAdapter` will do nothing and is used for easily mocking {@link IRateLimiterFactory | `IRateLimiterFactory`} for testing.
*
* IMPORT_PATH: `"@daiso-tech/core/rate-limiter/no-op-rate-limiter-adapter"`
* @group Adapters
*/
export declare class NoOpRateLimiterAdapter implements IRateLimiterAdapter {
getState(_context: IReadableContext, _key: string): Promise<IRateLimiterAdapterState>;
updateState(_context: IReadableContext, _key: string, limit: number): Promise<IRateLimiterAdapterState>;
reset(_context: IReadableContext, _key: string): Promise<void>;
}