import { LevelDown as LevelDOWN, Bytes } from "leveldown";
export interface ITransaction<T> {
    TRANSACTION: Symbol;
    _updates: {
        key: string;
        value: Bytes;
    }[];
    _resultFns: {
        [key: string]: {
            fns: (() => T)[];
            position: number;
        };
    };
    commitUpdate(callback: (err?: Error | null | undefined, ...result: (T | T[] | undefined)[]) => void): void;
    commitDelete(callback: (err?: Error) => void): void;
    add(u: {
        key: string;
        value?: Bytes;
    } | {
        key: string;
        value?: Bytes;
    }[] | ITransaction<T> | ITransaction<T>[]): void;
    done(resultCb: () => T, resultBucket?: string): void;
}
export declare function transaction<T>(db: LevelDOWN): ITransaction<T>;
