import type { SessionStoreData, Store } from 'svelte-kit-sessions';
import type { KVNamespace } from '@cloudflare/workers-types';
interface Serializer<T extends SessionStoreData> {
    parse(s: string): T | Promise<T>;
    stringify(data: T): string;
}
interface KvStoreOptions<T extends SessionStoreData> {
    /**
     * An KVNamespace.
     */
    client: KVNamespace;
    /**
     * The prefix of the key in redis.
     * @default 'sess:'
     */
    prefix?: string;
    /**
     * The serializer to use.
     * @default JSON
     */
    serializer?: Serializer<T>;
    /**
     * Time to live in milliseconds.
     * This ttl to be used if ttl is _Infinity_ when used from `svelte-kit-sessions`
     * @default 86400 * 1000
     */
    ttl?: number;
}
export default class KvStore<T extends SessionStoreData> implements Store {
    constructor(options: KvStoreOptions<T>);
    /**
     * An KVNamespace.
     */
    client: KVNamespace;
    /**
     * The prefix of the key in redis.
     * @default 'sess:'
     */
    prefix: string;
    /**
     * The serializer to use.
     * @default JSON
     */
    serializer: Serializer<T>;
    /**
     * Time to live in milliseconds.
     * default: 86400 * 1000
     */
    ttl: number;
    get(id: string): Promise<T | null>;
    set(id: string, storeData: T, ttl: number): Promise<void>;
    destroy(id: string): Promise<void>;
    touch(id: string, ttl: number): Promise<void>;
}
export {};
