import { Redis, Cluster, type ClusterNode, type ClusterOptions, type RedisOptions } from 'ioredis';
import type { Presence } from '@colyseus/core';
import EventEmitter from 'events';
type Callback = (...args: any[]) => void;
export declare class RedisPresence implements Presence {
    protected sub: Redis | Cluster;
    protected pub: Redis | Cluster;
    protected subscriptions: EventEmitter<[never]>;
    constructor(options?: number | string | RedisOptions | ClusterNode[] | Redis | Cluster, clusterOptions?: ClusterOptions);
    subscribe(topic: string, callback: Callback): Promise<this>;
    unsubscribe(topic: string, callback?: Callback): Promise<this>;
    publish(topic: string, data: any): Promise<void>;
    channels(pattern?: string): Promise<string[]>;
    exists(key: string): Promise<boolean>;
    set(key: string, value: string): Promise<unknown>;
    setex(key: string, value: string, seconds: number): Promise<unknown>;
    expire(key: string, seconds: number): Promise<unknown>;
    get(key: string): Promise<unknown>;
    del(roomId: string): Promise<unknown>;
    sadd(key: string, value: any): Promise<unknown>;
    smembers(key: string): Promise<string[]>;
    sismember(key: string, field: string): Promise<number>;
    srem(key: string, value: any): Promise<number>;
    scard(key: string): Promise<number>;
    sinter(...keys: string[]): Promise<string[]>;
    hset(key: string, field: string, value: string): Promise<boolean>;
    hincrby(key: string, field: string, value: number): Promise<number>;
    hincrbyex(key: string, field: string, value: number, expireInSeconds: number): Promise<number>;
    hget(key: string, field: string): Promise<string>;
    hgetall(key: string): Promise<Record<string, string>>;
    hdel(key: string, field: string): Promise<boolean>;
    hlen(key: string): Promise<number>;
    incr(key: string): Promise<number>;
    decr(key: string): Promise<number>;
    llen(key: string): Promise<number>;
    rpush(key: string, value: string): Promise<number>;
    lpush(key: string, value: string): Promise<number>;
    rpop(key: string): Promise<string | null>;
    lpop(key: string): Promise<string | null>;
    brpop(...args: any): Promise<[string, string] | null>;
    shutdown(): void;
    setMaxListeners(number: number): void;
    protected handleSubscription: (channel: any, message: any) => void;
}
export {};
