import { ARInterface, ResourceEvent } from '@tdm/data'; export declare class EventConsumer> { ar: T; private _data; constructor(ar: T); events(...events: string[]): this; timeout(value: number): this; loose(value: boolean): this; onEvent(fn: (event: ResourceEvent) => void): this; run(before?: (ec: EventConsumer) => void): Promise; } export declare function eventConsumer>(ar: T): EventConsumer;