UNPKG

redis-time-series-ts

Version:
17 lines (16 loc) 547 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExpireCommand = void 0; class ExpireCommand { constructor(receiver, key, seconds) { this.key = key; this.seconds = seconds; this.receiver = receiver; if (!Number.isInteger(this.seconds)) throw new Error(`Only integers allowed for 'seconds' parameter. ${seconds} is not an integer.`); } execute() { return this.receiver.expire(this.key, this.seconds); } } exports.ExpireCommand = ExpireCommand;