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

5.0.10 • Public • Published

Installation

npm install --save @types/hapi__catbox-redis

Summary

This package contains type definitions for @hapi/catbox-redis (https://github.com/hapijs/catbox-redis).

Details

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

index.d.ts

/* eslint-disable @definitelytyped/no-declare-current-package */
// eslint-disable-next-line @definitelytyped/no-single-declare-module
declare module "@hapi/catbox-redis" {
    import { Cluster, Redis } from "ioredis";
    import { Client, ClientOptions, EnginePrototype } from "@hapi/catbox";
    namespace CatboxRedis {
        interface CatboxRedisOptions extends ClientOptions {
            /**
             * Raw client.
             */
            client?: Redis | Cluster | undefined;
            /**
             * the Redis server URL (if url is provided, host, port, and socket are ignored)
             */
            url?: string | undefined;
            /**
             * the Redis server hostname.
             * Defaults to '127.0.0.1'.
             */
            host?: string | undefined;
            /**
             * the Redis server port or unix domain socket path.
             * Defaults to 6379.
             */
            port?: number | undefined;
            /**
             * the unix socket string to connect to (if socket is provided, host and port are ignored)
             */
            socket?: string | undefined;
            /**
             * the Redis authentication password when required.
             */
            password?: string | undefined;
            /**
             * the Redis database.
             */
            database?: string | undefined;
            /**
             * an array of redis sentinel addresses to connect to.
             */
            sentinels?:
                | Array<{
                    host: string;
                }>
                | undefined;
            /**
             * the name of the sentinel master.
             * (Only needed when sentinels is specified)
             */
            sentinelName?: string | undefined;
        }
    }
    class CatboxRedis<T> extends Client<T> {
        constructor(options: CatboxRedis.CatboxRedisOptions);
    }
    export = CatboxRedis;
}

Additional Details

Credits

These definitions were written by Simon Schick, and Silas Rech.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/hapi__catbox-redis

Weekly Downloads

1,666

Version

5.0.10

License

MIT

Unpacked Size

6.96 kB

Total Files

5

Last publish

Collaborators

  • types