declare module 'telegraf-session-local' { import { AdapterSync, AdapterAsync, BaseAdapter } from 'lowdb' import { Context } from 'telegraf' type MiddlewareFn = (ctx: C, next: () => Promise) => Promise export interface LocalSessionOptions { storage?: AdapterSync | AdapterAsync database?: string property?: string state?: TSession format?: { serialize?: (value: TSession) => string deserialize?: (value: string) => TSession } getSessionKey?: (ctx: Context) => string } class LocalSession { public DB: unknown constructor(options?: LocalSessionOptions) getSessionKey(ctx: Context): string getSession(key: string): TSession saveSession(key: string, data: TSession): Promise middleware(property?: string): MiddlewareFn static get storageFileSync(): AdapterSync static get storageFileAsync(): AdapterAsync static get storageMemory(): AdapterSync static get storageBase(): BaseAdapter } export = LocalSession }