File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ type OfflineQueueItem = {
48
48
node : unknown ;
49
49
} ;
50
50
51
+ export type ClusterNode =
52
+ | string
53
+ | number
54
+ | {
55
+ host ?: string | undefined ;
56
+ port ?: number | undefined ;
57
+ } ;
58
+
51
59
type ClusterStatus =
52
60
| "end"
53
61
| "close"
@@ -106,10 +114,7 @@ class Cluster extends Commander {
106
114
/**
107
115
* Creates an instance of Cluster.
108
116
*/
109
- constructor (
110
- startupNodes : ( string | number | object ) [ ] ,
111
- options : ClusterOptions = { }
112
- ) {
117
+ constructor ( startupNodes : ClusterNode [ ] , options : ClusterOptions = { } ) {
113
118
super ( ) ;
114
119
EventEmitter . call ( this ) ;
115
120
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ export {
52
52
} from "./connectors/SentinelConnector" ;
53
53
export { StandaloneConnectionOptions } from "./connectors/StandaloneConnector" ;
54
54
export { RedisOptions , CommonRedisOptions } from "./redis/RedisOptions" ;
55
+ export { ClusterNode } from "./cluster" ;
56
+ export { ClusterOptions } from "./cluster/ClusterOptions" ;
57
+ export { NodeRole } from "./cluster/util" ;
55
58
56
59
// No TS typings
57
60
export const ReplyError = require ( "redis-errors" ) . ReplyError ;
You can’t perform that action at this time.
0 commit comments