"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HScanCommand = void 0;
const command_js_1 = require("./command.js");
/**
 * @see https://redis.io/commands/hscan
 */
class HScanCommand extends command_js_1.Command {
    constructor([key, cursor, cmdOpts], opts) {
        const command = ["hscan", key, cursor];
        if (cmdOpts?.match) {
            command.push("match", cmdOpts.match);
        }
        if (typeof cmdOpts?.count === "number") {
            command.push("count", cmdOpts.count);
        }
        super(command, opts);
    }
}
exports.HScanCommand = HScanCommand;
