(parser: CommandParser, ...[key, value, fieldValue]: SingleFieldArguments | MultipleFieldsArguments)
| 19 | |
| 20 | export default { |
| 21 | parseCommand(parser: CommandParser, ...[key, value, fieldValue]: SingleFieldArguments | MultipleFieldsArguments) { |
| 22 | parser.push('HSET'); |
| 23 | parser.pushKey(key); |
| 24 | |
| 25 | if (typeof value === 'string' || typeof value === 'number' || value instanceof Buffer) { |
| 26 | parser.push( |
| 27 | convertValue(value), |
| 28 | convertValue(fieldValue!) |
| 29 | ); |
| 30 | } else if (value instanceof Map) { |
| 31 | pushMap(parser, value); |
| 32 | } else if (Array.isArray(value)) { |
| 33 | pushTuples(parser, value); |
| 34 | } else { |
| 35 | pushObject(parser, value); |
| 36 | } |
| 37 | }, |
| 38 | transformReply: undefined as unknown as () => NumberReply |
| 39 | } as const satisfies Command; |
| 40 |
nothing calls this directly
no test coverage detected