/// <reference types="node" />
import { EventEmitter } from "events";
import { PostgreSQL, QuerySelect } from "./types";
declare type WhereCondition = Function | object | object[];
declare type ChangeAction = "delete" | "insert" | "update";
export interface ChangeEvent {
    action: ChangeAction;
    new_val?: object;
    old_val?: object;
}
export declare class Changes extends EventEmitter {
    private db;
    private table;
    private select;
    private watch;
    private where;
    private trigger_name;
    private closed;
    private condition?;
    private match_condition;
    private val_update_cache;
    constructor(db: PostgreSQL, table: string, select: QuerySelect, watch: string[], where: WhereCondition, cb: Function);
    init(cb: Function): Promise<void>;
    private dbg;
    private fail;
    close(): void;
    insert(where: any): Promise<void>;
    delete(where: any): void;
    private handle_change;
    private new_val_update;
    private init_where;
}
export {};
