Files
travel-app/node_modules/bullmq/dist/esm/classes/bun-redis-client.d.ts
2026-08-09 21:56:00 +00:00

19 lines
783 B
TypeScript

import { IRedisClient } from '../interfaces/redis-client';
export type RedisCommandArgument = string | Buffer;
export interface BunRedisRawClient {
connected: boolean;
url?: string;
onconnect?: ((...args: any[]) => void) | null;
onclose?: ((...args: any[]) => void) | null;
onerror?: ((...args: any[]) => void) | null;
connect(): Promise<void>;
close(): void;
send<T = any>(command: string, args: RedisCommandArgument[]): Promise<T>;
get(key: string): Promise<string | null | undefined>;
smembers(key: string): Promise<unknown[] | null | undefined>;
incr(key: string): Promise<number>;
}
export declare function createBunRedisClient<TClient extends BunRedisRawClient>(client: TClient, opts?: {
lazyConnect?: boolean;
}): IRedisClient;