@types/express-brute-redis
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Installation

npm install --save @types/express-brute-redis

Summary

This package contains type definitions for express-brute-redis (https://github.com/AdamPflug/express-brute-redis).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-brute-redis.

index.d.ts

import { ClientOpts, RedisClient } from "redis";

/**
 * @summary Redis store for Express Brute
 */
declare class RedisStore {
    /**
     * @summary constructor
     * @param options Options to configure the Redis client.
     */
    constructor(
        options?: ClientOpts & {
            client?: RedisClient | undefined;
            prefix?: string | undefined;
            host?: string | undefined;
            port?: number | string | undefined;
        },
        ...args: any[]
    );

    /**
     * @summary Sets a key in Redis storage.
     */
    set(key: string, value: string, lifetime?: number, callback?: (sender: RedisStore) => void): void;

    /**
     * @summary Gets a key in Redis storage.
     */
    get(key: string, callback?: (err: Error, data: any) => void): string | null;

    /**
     * @summary Resets a key in Redis storage.
     */
    reset(key: string, callback?: (err: Error, data: any) => void, ...args: any[]): void;

    static Redis: any;

    static defaults: {
        prefix: string;
        host: string;
        port: string;
    };
}

export = RedisStore;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:36 GMT
  • Dependencies: @types/redis

Credits

These definitions were written by Scott Harwell.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/express-brute-redis

Weekly Downloads

150

Version

0.0.7

License

MIT

Unpacked Size

4.94 kB

Total Files

5

Last publish

Collaborators

  • types