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
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: @types/hapi__catbox, @types/ioredis
Credits
These definitions were written by Simon Schick, and Silas Rech.