import { Action } from '@ngrx/store'; import { Observable, OperatorFunction } from 'rxjs'; import { AsyncRequest, ExtractFromApiActionPayloadType, FromApiActionPayload } from './async.interfaces'; /** * Custom operator to use instead of SwitchMap with effects based on FromApi actions. * It makes sure to emit an action when the inner subscription is unsubscribed in order to keep the store up-to-date with pending information. * @param successHandler function that returns the action to emit in case the FromApi call is a success * @param errorHandler function that returns the action to emit in case the FromApi call fails * @param cancelRequestActionFactory function that returns the action to emit in case the FromApi action is 'cancelled' because a new action was received by the switchMap */ export declare function fromApiEffectSwitchMap, S extends ExtractFromApiActionPayloadType, U extends Action, V extends Action, W extends Action>(successHandler: (result: S, action: T) => U | Observable | Promise, errorHandler?: (error: any, action: T) => Observable, cancelRequestActionFactory?: (props: AsyncRequest, action: T) => W): OperatorFunction; /** * Same as {@link fromApiEffectSwitchMap}, instead one inner subscription is kept by id. * @param successHandler * @param errorHandler * @param cancelRequestActionFactory * @param cleanUpTimer */ export declare function fromApiEffectSwitchMapById & { id: string; }, S extends ExtractFromApiActionPayloadType, U extends Action, V extends Action, W extends Action>(successHandler: (result: S, action: T) => U | Observable | Promise, errorHandler?: (error: any, action: T) => Observable, cancelRequestActionFactory?: (props: AsyncRequest, action: T) => W, cleanUpTimer?: number): OperatorFunction; //# sourceMappingURL=async.operators.d.ts.map