import { IPersistable, IPersistence } from '@darlean/base';
export declare class MemoryPersistence<T> implements IPersistence<T> {
    protected values: Map<string, Map<string, unknown>>;
    constructor();
    persistable(partitionKey: string[] | undefined, sortKey: string[] | undefined, value: T | undefined): IPersistable<T>;
    load(partitionKey?: string[], sortKey?: string[]): Promise<IPersistable<T>>;
    loadImpl(partitionKey?: string[], sortKey?: string[]): Promise<[value: T | undefined, version: string | undefined]>;
    storeImpl(partitionKey: string[] | undefined, sortKey: string[] | undefined, value: T | undefined, _version: string | undefined): Promise<void>;
    sub(partitionKey?: string[], sortKey?: string[]): IPersistence<T>;
    clear(): void;
}
export declare class SubPersistence<T> implements IPersistence<T> {
    protected superPersistence: IPersistence<T>;
    protected basePartitionKey: string[];
    protected baseSortKey: string[];
    constructor(superPersistence: IPersistence<T>, basePartitionKey?: string[], baseSortKey?: string[]);
    persistable(partitionKey: string[] | undefined, sortKey: string[] | undefined, value: T | undefined): IPersistable<T>;
    load(partitionKey?: string[], sortKey?: string[]): Promise<IPersistable<T>>;
    sub(partitionKey?: string[], sortKey?: string[]): IPersistence<T>;
    protected deriveKeys(partitionKey: string[] | undefined, sortKey: string[] | undefined): {
        pk: string[];
        sk: string[];
    };
}
export declare function idToText(id: string[]): string;
export declare function idFromText(text: string): string[];
export declare function idToText2(id: string[]): string;
export declare function idFromText2(text: string): string[];
