/**
 * @packageDocumentation
 * @module async-data
 */
import { HttpErrorResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Status } from '../types/k8s';
export interface DataStateAdapter<D> {
    rawData$: Observable<D>;
    data$: Observable<D>;
    loading$: Observable<boolean>;
    error$: Observable<DataError>;
    reload: () => void;
}
export declare type Fetcher<D, P> = (params: P) => Observable<D>;
export interface LoaderConfig<D, P> {
    fetcher: Fetcher<D, P>;
    params$?: Observable<P>;
    params?: P;
    dataFilter?: (data: D, index: number) => boolean;
}
export interface LoaderConfigWithInterval<D, P> extends LoaderConfig<D, P> {
    interval: number;
    intervalFilter?: (index: number) => boolean;
    compare: string[] | ((a: D, b: D) => boolean);
}
export declare type DataError = Partial<HttpErrorResponse & Status>;
export declare type DataMapper<D> = (data: D) => D;
