(command: Command, resp: RespVersions)
| 94 | }; |
| 95 | |
| 96 | export function createModuleCommand<T extends NamespaceProxySentinel | NamespaceProxySentinelClient>(command: Command, resp: RespVersions) { |
| 97 | const transformReply = getTransformReply(command, resp); |
| 98 | |
| 99 | return async function (this: T, ...args: Array<unknown>) { |
| 100 | const parser = new BasicCommandParser(this._self._keyPrefix); |
| 101 | command.parseCommand(parser, ...args); |
| 102 | |
| 103 | return this._self._execute( |
| 104 | command.IS_READ_ONLY, |
| 105 | client => client._executeCommand(command, parser, this._self.commandOptions, transformReply) |
| 106 | ); |
| 107 | } |
| 108 | }; |
| 109 | |
| 110 | export function createScriptCommand<T extends ProxySentinel | ProxySentinelClient>(script: RedisScript, resp: RespVersions) { |
| 111 | const prefix = scriptArgumentsPrefix(script); |
no test coverage detected