import { Context } from 'koishi'; import type { Tables } from '@koishijs/cache'; import { Config } from './config'; export declare class Cache { readonly config: Config; readonly tableName: K; private _cache; constructor(ctx: Context, config: Config, tableName: K); get(tableName: E, id: string): Promise; get(id: string): Promise; set(tableName: E, id: string, value: R): Promise; set(id: string, value: T): Promise; delete(tableName: E, id: string): Promise; delete(id: string): Promise; clear(tableName: E): Promise; clear(): Promise; } declare module '@koishijs/cache' { interface Tables { 'chatluna/keys': string; } } declare module 'koishi' { interface Tables { cache: CacheEntry; } } interface CacheEntry { table: string; key: string; value: string; expire: Date; } export {};