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

3.0.4 • Public • Published

Installation

npm install --save @types/node-redis-pubsub

Summary

This package contains type definitions for node-redis-pubsub (https://github.com/louischatriot/node-redis-pubsub#readme).

Details

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

index.d.ts

import * as redis from "redis";

declare function NRP(options: object): NRP.NodeRedisPubSub;
declare namespace NRP {
    function initClient(options: object): NodeRedisPubSub;
    class NodeRedisPubSub {
        constructor(options: object);
        getRedisClient(): redis.RedisClient;
        on(
            channel: string,
            handler: (data: string, channel: string) => void,
            callback?: () => void,
        ): () => void;
        subscribe(
            channel: string,
            handler: (data: string, channel: string) => void,
            callback?: () => void,
        ): () => void;
        emit(channel: string, message: string): void;
        publish(channel: string, message: string): void;
        quit(): void;
        end(): void;
    }
}

export = NRP;

Additional Details

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

Credits

These definitions were written by Rene Keijzer.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/node-redis-pubsub

Weekly Downloads

1,490

Version

3.0.4

License

MIT

Unpacked Size

4.3 kB

Total Files

5

Last publish

Collaborators

  • types