import { Redis } from 'ioredis';
export declare enum RedisRepositoryEvent {
    SET = "SET",
    GET = "GET"
}
export type RepositoryEventHandler<T> = (event: RedisRepositoryEvent, id: string, item: T) => any;
export declare class RedisRepository<T> {
    protected readonly redis: Redis;
    private readonly handlers;
    constructor(redis: Redis);
    set(id: string, item: T): Promise<'OK'>;
    get(id: string): Promise<T | null | undefined>;
    on(event: RedisRepositoryEvent, handler: RepositoryEventHandler<T>): () => void;
    onSet(handler: RepositoryEventHandler<T>): () => void;
    onGet(handler: RepositoryEventHandler<T>): () => void;
}
