Installation
npm install --save @types/koa-ratelimit-lru
Summary
This package contains type definitions for koa-ratelimit-lru (https://github.com/Dreamacro/koa-ratelimit-lru).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-ratelimit-lru.
index.d.ts
import { Middleware } from "koa";
declare namespace rateLimit {
interface Options {
readonly duration?: number | undefined;
readonly max?: number | undefined;
readonly prefix?: string | undefined;
readonly store?: any; // lru-cache ?
readonly rate?: number | undefined;
readonly id?: string | undefined;
readonly headers?: {
readonly remaining?: string | undefined;
readonly reset?: string | undefined;
readonly total?: string | undefined;
} | undefined;
readonly errorMessage?: string | undefined;
}
}
declare function rateLimit(options?: rateLimit.Options): Middleware;
export = rateLimit;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:38 GMT
- Dependencies: @types/koa
Credits
These definitions were written by Daniel Byrne.