File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ type OfflineQueueItem = {
4848 node : unknown ;
4949} ;
5050
51+ export type ClusterNode =
52+ | string
53+ | number
54+ | {
55+ host ?: string | undefined ;
56+ port ?: number | undefined ;
57+ } ;
58+
5159type ClusterStatus =
5260 | "end"
5361 | "close"
@@ -106,10 +114,7 @@ class Cluster extends Commander {
106114 /**
107115 * Creates an instance of Cluster.
108116 */
109- constructor (
110- startupNodes : ( string | number | object ) [ ] ,
111- options : ClusterOptions = { }
112- ) {
117+ constructor ( startupNodes : ClusterNode [ ] , options : ClusterOptions = { } ) {
113118 super ( ) ;
114119 EventEmitter . call ( this ) ;
115120
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ export {
5252} from "./connectors/SentinelConnector" ;
5353export { StandaloneConnectionOptions } from "./connectors/StandaloneConnector" ;
5454export { RedisOptions , CommonRedisOptions } from "./redis/RedisOptions" ;
55+ export { ClusterNode } from "./cluster" ;
56+ export { ClusterOptions } from "./cluster/ClusterOptions" ;
57+ export { NodeRole } from "./cluster/util" ;
5558
5659// No TS typings
5760export const ReplyError = require ( "redis-errors" ) . ReplyError ;
You can’t perform that action at this time.
0 commit comments