You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
More fixes for socket issue (#2710)
* more typing fixes * try to redo typing a bit and genericize to make better * use genericized cluster options for cluster as well
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Command, RedisFunction, RedisScript, RespVersions } from '../RESP/types';
|
||||
import { RedisSocketOptions } from '../client/socket';
|
||||
import { RedisSocketOptions, RedisTcpSocketOptions } from '../client/socket';
|
||||
import { functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander';
|
||||
import { NamespaceProxySentinel, NamespaceProxySentinelClient, NodeInfo, ProxySentinel, ProxySentinelClient, RedisNode } from './types';
|
||||
|
||||
@@ -27,9 +27,11 @@ export function createNodeList(nodes: Array<NodeInfo>) {
|
||||
}
|
||||
|
||||
export function clientSocketToNode(socket: RedisSocketOptions): RedisNode {
|
||||
const s = socket as RedisTcpSocketOptions;
|
||||
|
||||
return {
|
||||
host: socket.host!,
|
||||
port: socket.port!
|
||||
host: s.host!,
|
||||
port: s.port!
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user