UNPKG

@gooddata/gooddata-js

Version:
22 lines (21 loc) 784 B
import { AFM } from "@gooddata/typings"; import { IAdapter } from "./interfaces/Adapter"; import { ApiResponseError } from "../xhr"; export declare type IDataSubscriber = (data: any) => void; export declare type IErrorSubscriber = (error: ApiResponseError) => void; export declare class DataTable<T> { private static getDefaultDimensionsForTable; private adapter; private dataSubscribers; private errorSubscribers; private afm?; private dataSource?; private subject; constructor(adapter: IAdapter<T>); getData(afm: AFM.IAfm, resultSpec?: AFM.IResultSpec): void; onData(callback: IDataSubscriber): this; onError(callback: IErrorSubscriber): this; resetDataSubscribers(): this; resetErrorSubscribers(): this; private fetchData; }