import { createClient } from "redis"; import type { RedisClientOptions } from "redis"; import { SessionStore } from "./types"; type Client = ReturnType; interface NewClientOpts { /** * `redis[s]://[[username][:password]@][host][:port][/db-number]` * * See [`redis`](https://www.iana.org/assignments/uri-schemes/prov/redis) and [`rediss`](https://www.iana.org/assignments/uri-schemes/prov/rediss) IANA registration for more details */ url?: string; config?: Omit; /** Prefix to use for session keys. Defaults to "telegraf:". */ prefix?: string; /** Called on fatal connection or setup errors */ onInitError?: (err: unknown) => void; } interface ExistingClientOpts { /** If passed, we'll reuse this client instead of creating our own. */ client: Client; /** Prefix to use for session keys. Defaults to "telegraf:". */ prefix?: string; } /** @unstable */ export declare function Redis(opts: NewClientOpts): SessionStore; export declare function Redis(opts: ExistingClientOpts): SessionStore; export {};