import EventEmitter from 'node:events';
import memcache from 'memjs';
import { KeyvStoreAdapter, StoredData } from 'keyv';

type KeyvMemcacheOptions = {
    url?: string;
    expires?: number;
} & memcache.ClientOptions & Record<string, any>;
declare class KeyvMemcache extends EventEmitter implements KeyvStoreAdapter {
    ttlSupport: boolean;
    namespace?: string;
    client: memcache.Client;
    opts: KeyvMemcacheOptions;
    constructor(uri?: string, options?: KeyvMemcacheOptions);
    _getNamespace(): string;
    get<Value>(key: string): Promise<StoredData<Value>>;
    getMany<Value>(keys: string[]): Promise<StoredData<Value>[]>;
    set(key: string, value: any, ttl?: number): Promise<void>;
    delete(key: string): Promise<boolean>;
    deleteMany(keys: string[]): Promise<boolean>;
    clear(): Promise<void>;
    formatKey(key: string): string;
    has(key: string): Promise<boolean>;
}

export { KeyvMemcache, KeyvMemcache as default };
