0.0.7 • Published 6 months ago

@types/express-brute-redis v0.0.7

Weekly downloads
192
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for express-brute-redis 0.0
// Project: https://github.com/AdamPflug/express-brute-redis
// Definitions by: Scott Harwell <https://github.com/scottharwell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

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: Thu, 09 Dec 2021 09:01:22 GMT
  • Dependencies: @types/redis
  • Global values: none

Credits

These definitions were written by Scott Harwell.

0.0.5

8 months ago

0.0.7

6 months ago

0.0.6

7 months ago

0.0.4

2 years ago

0.0.3

3 years ago

0.0.2

4 years ago

0.0.1

7 years ago

0.0.0

7 years ago