mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #45853 @types/ioredis - Add ClusterOptions and status to Cluster interface by @JeffreyCA
* Add ClusterOptions and status to Cluster interface * Make properties readonly
This commit is contained in:
parent
8c81e77bba
commit
93cc323acc
6
types/ioredis/index.d.ts
vendored
6
types/ioredis/index.d.ts
vendored
@ -921,8 +921,8 @@ declare namespace IORedis {
|
||||
|
||||
interface Redis extends EventEmitter, Commander, Commands {
|
||||
Promise: typeof Promise;
|
||||
options: RedisOptions;
|
||||
status: string;
|
||||
readonly options: RedisOptions;
|
||||
readonly status: string;
|
||||
connect(callback?: () => void): Promise<void>;
|
||||
disconnect(): void;
|
||||
duplicate(): Redis;
|
||||
@ -1400,6 +1400,8 @@ declare namespace IORedis {
|
||||
type Ok = 'OK';
|
||||
|
||||
interface Cluster extends EventEmitter, Commander, Commands {
|
||||
readonly options: ClusterOptions;
|
||||
readonly status: string;
|
||||
connect(): Promise<void>;
|
||||
disconnect(): void;
|
||||
nodes(role?: NodeRole): Redis[];
|
||||
|
||||
@ -661,4 +661,7 @@ redis.pipeline()
|
||||
// do something with res or err
|
||||
});
|
||||
|
||||
const { port, host } = redis.options;
|
||||
redis.options.host;
|
||||
redis.status;
|
||||
cluster.options.maxRedirections;
|
||||
cluster.status;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user