(command: Command, resp: RespVersions)
| 64 | } |
| 65 | |
| 66 | export function createCommand<T extends ProxySentinel | ProxySentinelClient>(command: Command, resp: RespVersions) { |
| 67 | const transformReply = getTransformReply(command, resp); |
| 68 | |
| 69 | return async function (this: T, ...args: Array<unknown>) { |
| 70 | const parser = new BasicCommandParser(this._self._keyPrefix); |
| 71 | command.parseCommand(parser, ...args); |
| 72 | |
| 73 | return this._self._execute( |
| 74 | command.IS_READ_ONLY, |
| 75 | client => client._executeCommand(command, parser, this.commandOptions, transformReply) |
| 76 | ); |
| 77 | }; |
| 78 | } |
| 79 | |
| 80 | export function createFunctionCommand<T extends NamespaceProxySentinel | NamespaceProxySentinelClient>(name: string, fn: RedisFunction, resp: RespVersions) { |
| 81 | const prefix = functionArgumentsPrefix(name, fn); |
no test coverage detected