import type { Stats } from './messages.js'; import type { FetchOptions, LRUCacheClustered, MSetEntry, ReadOptions, WriteOptions } from './index.js'; export interface Codec { encode(value: V): U | Promise; decode(raw: U): V | Promise; } export interface WrappedCache { readonly cache: LRUCacheClustered; readonly namespace: string; readonly ready: Promise; get(key: K, opts?: ReadOptions): Promise; set(key: K, value: V, opts?: WriteOptions): Promise; setIfAbsent(key: K, value: V, opts?: WriteOptions): Promise; has(key: K, opts?: ReadOptions): Promise; peek(key: K, opts?: ReadOptions): Promise; delete(key: K): Promise; getRemainingTTL(key: K): Promise; mGet(keys: K[], opts?: ReadOptions): Promise>; mSet(entries: Iterable>, opts?: WriteOptions): Promise; mDelete(keys: K[]): Promise; keys(): Promise; values(): Promise; entries(): Promise>; size(): Promise; [Symbol.asyncIterator](): AsyncIterableIterator<[K, V]>; clear(): Promise; destroy(): Promise; healthCheck(): Promise; purgeStale(): Promise; stats(): Promise; fetch(key: K, fetcher: (key: K) => Promise | V, opts?: FetchOptions): Promise; } export declare function wrap(cache: LRUCacheClustered, codec: Codec): WrappedCache; //# sourceMappingURL=codec.d.ts.map