/**
* This file is generated by @ioredis/interface-generator.
* Don't edit it manually. Instead, run `npm run generate` to update
* this file.
*/
///
///
import { Callback } from "../types";
export type RedisKey = string | Buffer;
export type RedisValue = string | Buffer | number;
export interface ResultTypes {
default: Promise;
pipeline: ChainableCommander;
}
export interface ChainableCommander extends RedisCommander<{
type: "pipeline";
mapping: Mapping;
}> {
length: number;
}
export type ClientContext = {
type: keyof ResultTypes;
mapping?: "resp2" | "resp3";
};
export type Result = ResultTypes[Context["type"]];
export type Resp2 = {
readonly __resp2: T;
};
export type Resp3 = {
readonly __resp3: T;
};
export type Resp3Double = number;
export type Resp3Map = Record;
export type RespShape, Resp3Result extends Resp3, Context extends ClientContext> = Context extends {
mapping: "resp3";
} ? Resp3Result["__resp3"] : Resp2Result["__resp2"];
export type VsimReply = Extract extends never ? Extract extends never ? V[] : RespShape, Resp3>>, Context> : Extract extends never ? RespShape, Resp3>, Context> : RespShape, Resp3, attributes: V | null]>>, Context>;
interface RedisCommander {
/**
* Call arbitrary commands.
*
* `redis.call('set', 'foo', 'bar')` is the same as `redis.set('foo', 'bar')`,
* so the only case you need to use this method is when the command is not
* supported by ioredis.
*
* ```ts
* redis.call('set', 'foo', 'bar');
* redis.call('get', 'foo', (err, value) => {
* // value === 'bar'
* });
* ```
*/
call(command: string, callback?: Callback): Result;
call(command: string, args: (string | Buffer | number)[], callback?: Callback): Result;
call(...args: [
command: string,
...args: (string | Buffer | number)[],
callback: Callback
]): Result;
call(...args: [command: string, ...args: (string | Buffer | number)[]]): Result;
callBuffer(command: string, callback?: Callback): Result;
callBuffer(command: string, args: (string | Buffer | number)[], callback?: Callback): Result;
callBuffer(...args: [
command: string,
...args: (string | Buffer | number)[],
callback: Callback
]): Result;
callBuffer(...args: [command: string, ...args: (string | Buffer | number)[]]): Result;
/**
* Lists the ACL categories, or the commands inside a category.
* - _group_: server
* - _complexity_: O(1) since the categories and commands are a fixed set.
* - _since_: 6.0.0
*/
acl(subcommand: 'CAT', callback?: Callback): Result;
acl(subcommand: 'CAT', category: string | Buffer, callback?: Callback): Result;
/**
* Deletes ACL users, and terminates their connections.
* - _group_: server
* - _complexity_: O(1) amortized time considering the typical user.
* - _since_: 6.0.0
*/
acl(...args: [subcommand: 'DELUSER', ...usernames: (string | Buffer)[], callback: Callback]): Result;
acl(...args: [subcommand: 'DELUSER', ...usernames: (string | Buffer)[]]): Result;
/**
* Simulates the execution of a command by a user, without executing the command.
* - _group_: server
* - _complexity_: O(1).
* - _since_: 7.0.0
*/
acl(subcommand: 'DRYRUN', username: string | Buffer, command: string | Buffer, callback?: Callback): Result;
aclBuffer(subcommand: 'DRYRUN', username: string | Buffer, command: string | Buffer, callback?: Callback): Result;
acl(...args: [subcommand: 'DRYRUN', username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[], callback: Callback]): Result;
aclBuffer(...args: [subcommand: 'DRYRUN', username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[], callback: Callback]): Result;
acl(...args: [subcommand: 'DRYRUN', username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[]]): Result;
aclBuffer(...args: [subcommand: 'DRYRUN', username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[]]): Result;
/**
* Generates a pseudorandom, secure password that can be used to identify ACL users.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
acl(subcommand: 'GENPASS', callback?: Callback): Result;
aclBuffer(subcommand: 'GENPASS', callback?: Callback): Result;
acl(subcommand: 'GENPASS', bits: number | string, callback?: Callback): Result;
aclBuffer(subcommand: 'GENPASS', bits: number | string, callback?: Callback): Result;
/**
* Lists the ACL rules of a user.
* - _group_: server
* - _complexity_: O(N). Where N is the number of password, command and pattern rules that the user has.
* - _since_: 6.0.0
*/
acl(subcommand: 'GETUSER', username: string | Buffer, callback?: Callback): Result;
aclBuffer(subcommand: 'GETUSER', username: string | Buffer, callback?: Callback): Result;
/**
* Returns helpful text about the different subcommands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
acl(subcommand: 'HELP', callback?: Callback): Result;
/**
* Dumps the effective rules in ACL file format.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: 'LIST', callback?: Callback): Result;
aclBuffer(subcommand: 'LIST', callback?: Callback): Result;
/**
* Reloads the rules from the configured ACL file.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: 'LOAD', callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Lists recent security events generated due to ACL rules.
* - _group_: server
* - _complexity_: O(N) with N being the number of entries shown.
* - _since_: 6.0.0
*/
acl(subcommand: 'LOG', reset: 'RESET', callback?: Callback): Result;
acl(subcommand: 'LOG', callback?: Callback): Result;
acl(subcommand: 'LOG', count: number | string, callback?: Callback): Result;
/**
* Saves the effective ACL rules in the configured ACL file.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: 'SAVE', callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Creates and modifies an ACL user and its rules.
* - _group_: server
* - _complexity_: O(N). Where N is the number of rules provided.
* - _since_: 6.0.0
*/
acl(subcommand: 'SETUSER', username: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
acl(...args: [subcommand: 'SETUSER', username: string | Buffer, ...rules: (string | Buffer)[], callback: Callback<"OK">]): Result<"OK", Context>;
acl(...args: [subcommand: 'SETUSER', username: string | Buffer, ...rules: (string | Buffer)[]]): Result<"OK", Context>;
/**
* Lists all ACL users.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: 'USERS', callback?: Callback): Result;
aclBuffer(subcommand: 'USERS', callback?: Callback): Result;
/**
* Returns the authenticated username of the current connection.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
acl(subcommand: 'WHOAMI', callback?: Callback): Result;
aclBuffer(subcommand: 'WHOAMI', callback?: Callback): Result;
/**
* Appends a string to the value of a key. Creates the key if it doesn't exist.
* - _group_: string
* - _complexity_: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.
* - _since_: 2.0.0
*/
append(key: RedisKey, value: string | Buffer | number, callback?: Callback): Result;
/**
* Returns the number of non-empty elements in an array.
* - _group_: array
* - _complexity_: O(1)
* - _since_: 8.8.0
*/
arcount(key: RedisKey, callback?: Callback): Result;
/**
* Deletes elements at the specified indices in an array.
* - _group_: array
* - _complexity_: O(N) where N is the number of indices to delete
* - _since_: 8.8.0
*/
ardel(...args: [key: RedisKey, ...indices: (number | string)[], callback: Callback]): Result;
ardel(...args: [key: RedisKey, ...indices: (number | string)[]]): Result;
/**
* Deletes elements in one or more ranges.
* - _group_: array
* - _complexity_: Proportional to the number of existing elements / slices touched, not to the numeric span of the requested ranges
* - _since_: 8.8.0
*/
ardelrange(...args: [key: RedisKey, ...ranges: (string | number)[], callback: Callback]): Result;
ardelrange(...args: [key: RedisKey, ...ranges: (string | number)[]]): Result;
/**
* Gets the value at an index in an array.
* - _group_: array
* - _complexity_: O(1)
* - _since_: 8.8.0
*/
arget(key: RedisKey, index: number | string, callback?: Callback): Result;
argetBuffer(key: RedisKey, index: number | string, callback?: Callback): Result;
/**
* Gets values in a range of indices.
* - _group_: array
* - _complexity_: O(N) where N is the range length
* - _since_: 8.8.0
*/
argetrange(key: RedisKey, start: number | string, end: number | string, callback?: Callback<(string | null)[]>): Result<(string | null)[], Context>;
argetrangeBuffer(key: RedisKey, start: number | string, end: number | string, callback?: Callback<(Buffer | null)[]>): Result<(Buffer | null)[], Context>;
/**
* Searches array elements in a range using textual predicates.
* - _group_: array
* - _complexity_: O(P * C) where P is the number of visited positions in touched slices and C is the cost of evaluating the predicates on one existing element.
* - _since_: 8.8.0
*/
argrep(key: RedisKey, start: number | string, end: number | string, predicate: 'EXACT' | 'MATCH' | 'GLOB' | 'RE', value: RedisValue, callback: Callback): Result;
argrep(...args: [key: RedisKey, start: number | string, end: number | string, predicate: 'EXACT' | 'MATCH' | 'GLOB' | 'RE', value: RedisValue, ...args: RedisValue[], callback: Callback>]): Result, Context>;
argrep(...args: [key: RedisKey, start: number | string, end: number | string, predicate: 'EXACT' | 'MATCH' | 'GLOB' | 'RE', value: RedisValue, ...args: T]): Result<'WITHVALUES' extends T[number] ? Array<[index: number, value: string]> : number[], Context>;
argrepBuffer(key: RedisKey, start: number | string, end: number | string, predicate: 'EXACT' | 'MATCH' | 'GLOB' | 'RE', value: RedisValue, callback: Callback): Result;
argrepBuffer(...args: [key: RedisKey, start: number | string, end: number | string, predicate: 'EXACT' | 'MATCH' | 'GLOB' | 'RE', value: RedisValue, ...args: RedisValue[], callback: Callback>]): Result, Context>;
argrepBuffer(...args: [key: RedisKey, start: number | string, end: number | string, predicate: 'EXACT' | 'MATCH' | 'GLOB' | 'RE', value: RedisValue, ...args: T]): Result<'WITHVALUES' extends T[number] ? Array<[index: number, value: Buffer]> : number[], Context>;
/**
* Returns metadata about an array.
* - _group_: array
* - _complexity_: O(1), or O(N) with FULL option where N is the number of slices.
* - _since_: 8.8.0
*/
arinfo(key: RedisKey, full: 'FULL', callback?: Callback<(string | number)[]>): Result<(string | number)[], Context>;
arinfoBuffer(key: RedisKey, full: 'FULL', callback?: Callback<(Buffer | number)[]>): Result<(Buffer | number)[], Context>;
arinfo(key: RedisKey, callback?: Callback<(string | number)[]>): Result<(string | number)[], Context>;
arinfoBuffer(key: RedisKey, callback?: Callback<(Buffer | number)[]>): Result<(Buffer | number)[], Context>;
/**
* Inserts one or more values at consecutive indices.
* - _group_: array
* - _complexity_: O(N) where N is the number of values
* - _since_: 8.8.0
*/
arinsert(...args: [key: RedisKey, ...values: (string | Buffer | number)[], callback: Callback]): Result;
arinsert(...args: [key: RedisKey, ...values: (string | Buffer | number)[]]): Result;
/**
* Returns the most recently inserted elements.
* - _group_: array
* - _complexity_: O(N) where N is the count
* - _since_: 8.8.0
*/
arlastitems(key: RedisKey, count: number | string, rev: 'REV', callback?: Callback<(string | null)[]>): Result<(string | null)[], Context>;
arlastitemsBuffer(key: RedisKey, count: number | string, rev: 'REV', callback?: Callback<(Buffer | null)[]>): Result<(Buffer | null)[], Context>;
arlastitems(key: RedisKey, count: number | string, callback?: Callback<(string | null)[]>): Result<(string | null)[], Context>;
arlastitemsBuffer(key: RedisKey, count: number | string, callback?: Callback<(Buffer | null)[]>): Result<(Buffer | null)[], Context>;
/**
* Returns the length of an array (max index + 1).
* - _group_: array
* - _complexity_: O(1)
* - _since_: 8.8.0
*/
arlen(key: RedisKey, callback?: Callback): Result;
/**
* Gets values at multiple indices in an array.
* - _group_: array
* - _complexity_: O(N) where N is the number of indices
* - _since_: 8.8.0
*/
armget(...args: [key: RedisKey, ...indices: (number | string)[], callback: Callback<(string | null)[]>]): Result<(string | null)[], Context>;
armgetBuffer(...args: [key: RedisKey, ...indices: (number | string)[], callback: Callback<(Buffer | null)[]>]): Result<(Buffer | null)[], Context>;
armget(...args: [key: RedisKey, ...indices: (number | string)[]]): Result<(string | null)[], Context>;
armgetBuffer(...args: [key: RedisKey, ...indices: (number | string)[]]): Result<(Buffer | null)[], Context>;
/**
* Sets multiple index-value pairs in an array.
* - _group_: array
* - _complexity_: O(N) where N is the number of pairs
* - _since_: 8.8.0
*/
armset(...args: [key: RedisKey, ...data: (string | Buffer | number)[], callback: Callback]): Result;
armset(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result;
/**
* Returns the next index ARINSERT would use.
* - _group_: array
* - _complexity_: O(1)
* - _since_: 8.8.0
*/
arnext(key: RedisKey, callback?: Callback): Result;
/**
* Performs aggregate operations on array elements in a range.
* - _group_: array
* - _complexity_: O(P) where P is visited positions in touched slices (dense scanned slots + sparse entries), with worst-case O(|end-start|+1) and typical case close to O(N), where N is the number of existing elements in range.
* - _since_: 8.8.0
*/
arop(key: RedisKey, start: number | string, end: number | string, sum: 'SUM', callback?: Callback): Result;
aropBuffer(key: RedisKey, start: number | string, end: number | string, sum: 'SUM', callback?: Callback): Result;
arop(key: RedisKey, start: number | string, end: number | string, min: 'MIN', callback?: Callback): Result;
aropBuffer(key: RedisKey, start: number | string, end: number | string, min: 'MIN', callback?: Callback): Result;
arop(key: RedisKey, start: number | string, end: number | string, max: 'MAX', callback?: Callback): Result;
aropBuffer(key: RedisKey, start: number | string, end: number | string, max: 'MAX', callback?: Callback): Result;
arop(key: RedisKey, start: number | string, end: number | string, and: 'AND', callback?: Callback): Result;
arop(key: RedisKey, start: number | string, end: number | string, or: 'OR', callback?: Callback): Result;
arop(key: RedisKey, start: number | string, end: number | string, xor: 'XOR', callback?: Callback): Result;
arop(key: RedisKey, start: number | string, end: number | string, match: 'MATCH', value: string | Buffer | number, callback?: Callback): Result;
arop(key: RedisKey, start: number | string, end: number | string, used: 'USED', callback?: Callback): Result;
/**
* Inserts values into a ring buffer of specified size, wrapping and truncating as needed.
* - _group_: array
* - _complexity_: O(M) normally, O(N+M) on ring resize, where N is the maximum of the old and new ring size and M is the number of inserted values
* - _since_: 8.8.0
*/
arring(...args: [key: RedisKey, size: number | string, ...values: (string | Buffer | number)[], callback: Callback]): Result;
arring(...args: [key: RedisKey, size: number | string, ...values: (string | Buffer | number)[]]): Result;
/**
* Iterates existing elements in a range, returning index-value pairs.
* - _group_: array
* - _complexity_: O(P) where P is visited positions in touched slices (dense scanned slots + sparse entries), with worst-case O(|end-start|+1) and typical case close to O(N), where N is the number of existing elements in range.
* - _since_: 8.8.0
*/
arscan(key: RedisKey, start: number | string, end: number | string, limitToken: 'LIMIT', limit: number | string, callback?: Callback>): Result, Context>;
arscanBuffer(key: RedisKey, start: number | string, end: number | string, limitToken: 'LIMIT', limit: number | string, callback?: Callback>): Result, Context>;
arscan(key: RedisKey, start: number | string, end: number | string, callback?: Callback>): Result, Context>;
arscanBuffer(key: RedisKey, start: number | string, end: number | string, callback?: Callback>): Result, Context>;
/**
* Sets the ARINSERT / ARRING cursor to a specific index.
* - _group_: array
* - _complexity_: O(1)
* - _since_: 8.8.0
*/
arseek(key: RedisKey, index: number | string, callback?: Callback): Result;
/**
* Sets one or more contiguous values starting at an index in an array.
* - _group_: array
* - _complexity_: O(N) where N is the number of values
* - _since_: 8.8.0
*/
arset(...args: [key: RedisKey, index: number | string, ...values: (string | Buffer | number)[], callback: Callback]): Result;
arset(...args: [key: RedisKey, index: number | string, ...values: (string | Buffer | number)[]]): Result;
/**
* Signals that a cluster client is following an -ASK redirect.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
asking(callback?: Callback<'OK'>): Result<'OK', Context>;
/**
* Authenticates the connection.
* - _group_: connection
* - _complexity_: O(N) where N is the number of passwords defined for the user
* - _since_: 1.0.0
*/
auth(password: string | Buffer, callback?: Callback<'OK'>): Result<'OK', Context>;
auth(username: string | Buffer, password: string | Buffer, callback?: Callback<'OK'>): Result<'OK', Context>;
/**
* Asynchronously rewrites the append-only file to disk.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
bgrewriteaof(callback?: Callback): Result;
bgrewriteaofBuffer(callback?: Callback): Result;
/**
* Asynchronously saves the database(s) to disk.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
bgsave(schedule: 'SCHEDULE', callback?: Callback<'OK'>): Result<'OK', Context>;
bgsave(callback?: Callback<'OK'>): Result<'OK', Context>;
/**
* Counts the number of set bits (population counting) in a string.
* - _group_: bitmap
* - _complexity_: O(N)
* - _since_: 2.6.0
*/
bitcount(key: RedisKey, start: number | string, end: number | string, byte: 'BYTE', callback?: Callback): Result;
bitcount(key: RedisKey, start: number | string, end: number | string, bit: 'BIT', callback?: Callback): Result;
bitcount(key: RedisKey, callback?: Callback): Result;
bitcount(key: RedisKey, start: number | string, end: number | string, callback?: Callback): Result;
/**
* Performs arbitrary bitfield integer operations on strings.
* - _group_: bitmap
* - _complexity_: O(1) for each subcommand specified
* - _since_: 3.2.0
*/
bitfield(key: RedisKey, overflow: 'OVERFLOW', wrap: 'WRAP', setBlockToken: 'SET', encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, overflow: 'OVERFLOW', wrap: 'WRAP', incrbyBlockToken: 'INCRBY', encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, overflow: 'OVERFLOW', sat: 'SAT', setBlockToken: 'SET', encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, overflow: 'OVERFLOW', sat: 'SAT', incrbyBlockToken: 'INCRBY', encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, overflow: 'OVERFLOW', fail: 'FAIL', setBlockToken: 'SET', encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, overflow: 'OVERFLOW', fail: 'FAIL', incrbyBlockToken: 'INCRBY', encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, getBlockToken: 'GET', encoding: string | Buffer, offset: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, setBlockToken: 'SET', encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, incrbyBlockToken: 'INCRBY', encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result;
bitfield(key: RedisKey, callback?: Callback): Result;
/**
* Performs arbitrary read-only bitfield integer operations on strings.
* - _group_: bitmap
* - _complexity_: O(1) for each subcommand specified
* - _since_: 6.0.0
*/
bitfield_ro(...args: [key: RedisKey, getBlockToken: 'GET', ...getBlocks: (string | Buffer | number)[], callback: Callback]): Result;
bitfield_ro(...args: [key: RedisKey, getBlockToken: 'GET', ...getBlocks: (string | Buffer | number)[]]): Result;
bitfield_ro(key: RedisKey, callback?: Callback): Result;
/**
* Performs bitwise operations on multiple strings, and stores the result.
* - _group_: bitmap
* - _complexity_: O(N)
* - _since_: 2.6.0
*/
bitop(...args: [and: 'AND', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [and: 'AND', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [and: 'AND', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [and: 'AND', destkey: RedisKey, keys: (RedisKey)[]]): Result;
bitop(...args: [or: 'OR', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [or: 'OR', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [or: 'OR', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [or: 'OR', destkey: RedisKey, keys: (RedisKey)[]]): Result;
bitop(...args: [xor: 'XOR', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [xor: 'XOR', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [xor: 'XOR', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [xor: 'XOR', destkey: RedisKey, keys: (RedisKey)[]]): Result;
bitop(...args: [not: 'NOT', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [not: 'NOT', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [not: 'NOT', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [not: 'NOT', destkey: RedisKey, keys: (RedisKey)[]]): Result;
bitop(...args: [diff: 'DIFF', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [diff: 'DIFF', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [diff: 'DIFF', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [diff: 'DIFF', destkey: RedisKey, keys: (RedisKey)[]]): Result;
bitop(...args: [diff1: 'DIFF1', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [diff1: 'DIFF1', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [diff1: 'DIFF1', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [diff1: 'DIFF1', destkey: RedisKey, keys: (RedisKey)[]]): Result;
bitop(...args: [andor: 'ANDOR', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [andor: 'ANDOR', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [andor: 'ANDOR', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [andor: 'ANDOR', destkey: RedisKey, keys: (RedisKey)[]]): Result;
bitop(...args: [one: 'ONE', destkey: RedisKey, ...keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [one: 'ONE', destkey: RedisKey, keys: (RedisKey)[], callback: Callback]): Result;
bitop(...args: [one: 'ONE', destkey: RedisKey, ...keys: (RedisKey)[]]): Result;
bitop(...args: [one: 'ONE', destkey: RedisKey, keys: (RedisKey)[]]): Result;
/**
* Finds the first set (1) or clear (0) bit in a string.
* - _group_: bitmap
* - _complexity_: O(N)
* - _since_: 2.8.7
*/
bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, byte: 'BYTE', callback?: Callback): Result;
bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, bit1: 'BIT', callback?: Callback): Result;
bitpos(key: RedisKey, bit: number | string, callback?: Callback): Result;
bitpos(key: RedisKey, bit: number | string, start: number | string, callback?: Callback): Result;
bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, callback?: Callback): Result