export type SessionData = Record<string, any>;
export declare class SessionHandler {
    readonly path: string;
    readonly prefix: string;
    constructor(path?: string, prefix?: string);
    read(id: string): SessionData;
    getPath(id: string): string;
    write(id: string, data: SessionData): void;
}
export declare class Session {
    protected handler: SessionHandler;
    readonly id: string;
    data?: SessionData;
    constructor(handler: SessionHandler, id?: string);
    load(): void;
    set<T>(key: string, value: T): this;
    get<T>(key: string, defaultValue?: T): T | null | undefined;
    has(key: string): boolean;
    remove(key: string): this;
    save(): void;
}
