You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
24 lines
521 B
TypeScript
24 lines
521 B
TypeScript
import { Timestamp, transformTimestampArgument } from '.';
|
|
|
|
interface MAddSample {
|
|
key: string;
|
|
timestamp: Timestamp;
|
|
value: number;
|
|
}
|
|
|
|
export function transformArguments(toAdd: Array<MAddSample>): Array<string> {
|
|
const args = ['TS.MADD'];
|
|
|
|
for (const { key, timestamp, value } of toAdd) {
|
|
args.push(
|
|
key,
|
|
transformTimestampArgument(timestamp),
|
|
value.toString()
|
|
);
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export declare function transformReply(): Array<number>;
|