(prefix: DataPrefix_, suffix: string, field: DataField, value: any)
| 188 | // Set commands |
| 189 | |
| 190 | hset< |
| 191 | DataPrefix_ extends DataPrefix, |
| 192 | DataField extends Extract< |
| 193 | keyof (typeof dataHashes)[DataPrefix_]['fields'], |
| 194 | string |
| 195 | > = Extract<keyof (typeof dataHashes)[DataPrefix_]['fields'], string>, |
| 196 | >(prefix: DataPrefix_, suffix: string, field: DataField, value: any) { |
| 197 | const fullKey = getFullKey(prefix, suffix, field); |
| 198 | |
| 199 | this._logger.sub('hset').info(`${fullKey}: ${value}`); |
| 200 | |
| 201 | // Set subscribed value |
| 202 | |
| 203 | if (fullKey in this.subscriptions) { |
| 204 | this.values[fullKey] = value; |
| 205 | } |
| 206 | |
| 207 | // Add to buffer |
| 208 | |
| 209 | if (this._hsetBuffer.size === 0) { |
| 210 | setTimeout(this._flushHSetBuffer); |
| 211 | } |
| 212 | |
| 213 | this._hsetBuffer.set(fullKey, value); |
| 214 | } |
| 215 | hmset< |
| 216 | DataPrefix_ extends DataPrefix, |
| 217 | DataField extends Extract< |
no test coverage detected