1.0.4 • Published 2 years ago

@types/koa-ratelimit-lru v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for koa-ratelimit-lru 1.0
// Project: https://github.com/Dreamacro/koa-ratelimit-lru
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

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: Thu, 08 Jul 2021 16:23:23 GMT
  • Dependencies: @types/koa
  • Global values: none

Credits

These definitions were written by Daniel Byrne.

1.0.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

4 years ago

1.0.0

7 years ago