@types/koa-ratelimit-lru
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/koa-ratelimit-lru

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

4.11 kB

Total Files

5

Last publish

Collaborators

  • types