import { HttpErrorResponse } from '@angular/common/http'; import { Actions } from '@ngrx/effects'; import { Action, ActionCreator, Creator } from '@ngrx/store'; import { Observable } from 'rxjs'; import { ErrorParams } from './error-handling'; /** * Abkürzung von `createEffect` für den Standardfall, wenn man auf Actions reagiert * ```ts * loadList$ = createActionEffect( * [listActions.init, apiActions.createSuccess], * switchMap(() => this.webApi.getList()), * ); * create$ = createActionEffect( * listActions.create, * pipe( * showDialog(new CreateDialog()), * switchMap(({ dto }) => this.webApi.create(dto)), * ), * ); * ``` */ export declare function createActionEffect>(actions: ActionCreator | ActionCreator[], fn: (obs$: Observable>) => Observable, actions$?: Actions): Observable> & import("@ngrx/effects").CreateEffectMetadata; export declare abstract class EffectBase { protected readonly actions$: Actions; protected on>(actions: ActionCreator | ActionCreator[], fn: (obs$: Observable>) => Observable): Observable> & import("@ngrx/effects").CreateEffectMetadata; protected onError(action: ActionCreator>, actionText: string): Observable<{ error: ErrorParams; actionText: string; handling: "messageBox" | "dialog"; } & Action<"[App] Error">> & import("@ngrx/effects").CreateEffectMetadata; protected onDialogError(action: ActionCreator>): Observable<{ error: ErrorParams; actionText: string; handling: "messageBox" | "dialog"; } & Action<"[App] Error">> & import("@ngrx/effects").CreateEffectMetadata; }