Closed HartS closed 2 years ago
@HartS Hi! thank you for the review :) Can you share an example of the output of the command?
@danitseitlin the output of which command exactly?
@danitseitlin the output of which command exactly?
Revrange and Range to verify that the output will indeed contain an 2 dimensional array of a number in index 0 and string in index 1.
@danitseitlin :
> ts = new rms.RedisTimeSeries(...)
RedisTimeSeries {
name: 'RedisTimeSeries',
redisOptions: { ... },
isHandleError: true,
showDebugLogs: false,
returnRawResponse: false,
clusterOptions: undefined,
rtsCommander: RedisTimeSeriesCommander {}
}
> ts.connect()
Promise { undefined }
> ts.range('ts:binance.BUSD/USDT.asks_LAST_60000', '-', '+').then((x)=>console.log(x))
Promise { <pending> }
> [
[ 1648209960000, '9.995E-1' ],
[ 1648212120000, '9.995E-1' ],
[ 1648212420000, '9.995E-1' ],
[ 1648216080000, '9.995E-1' ],
[ 1648216920000, '9.995E-1' ],
[ 1648216980000, '9.995E-1' ],
[ 1648217040000, '9.995E-1' ],
[ 1648227540000, '9.997E-1' ],
[ 1648230660000, '9.997E-1' ],
[ 1648230720000, '9.997E-1' ],
[ 1648231680000, '9.997E-1' ],
[ 1648231740000, '9.997E-1' ],
[ 1648232100000, '9.997E-1' ],
[ 1648242660000, '9.997E-1' ]
]
The return types for range and revrange are wrong, they should be
[number, string][]
instead ofnumber[]
.At a glance it looks like several other types are wrong here also, but I haven't looked into it too much.
The existing test suite still passes with these changes