import { Observable } from 'rxjs/internal/Observable'; import { OperatorFunction } from 'rxjs/internal/types'; export declare type Status = 'succeeded' | 'failed' | 'pending'; export interface Http { status: Status; req: Req; res?: Res; error?: any; } /** * Wraps ajax calls with a status: pending, succeeded or failed. * This pipe function is based on switch map, so all previous requests * in pending state will be cancelled by emitting a new one. * * Returned data holds information about status, response and initial request. * * @param withAjax - transformation function from Request to Observable Response. */ export declare function http(withAjax: (req: Req) => Observable): OperatorFunction>;