import type { CommandOptions } from "./command"; import { Command } from "./command"; /** * @see https://redis.io/commands/bitcount * @see node_modules/@upstash/redis/docs/commands/bitmap/bitcount.mdx */ export class BitCountCommand extends Command { constructor( [key, start, end]: | [key: string, start?: never, end?: never] | [key: string, start: number, end: number], opts?: CommandOptions ) { const command: unknown[] = ["bitcount", key]; if (typeof start === "number") { command.push(start); } if (typeof end === "number") { command.push(end); } super(command, opts); } }