87968: Automatic upgrade to NgRx 13

This commit is contained in:
Yura Bondarenko
2022-03-14 18:36:57 +01:00
parent 8f7389c83a
commit 8e4f1993bf
17 changed files with 182 additions and 182 deletions

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { map } from 'rxjs/operators';
import { Effect, Actions, ofType } from '@ngrx/effects';
import { createEffect, Actions, ofType } from '@ngrx/effects';
import {
CommitPatchOperationsAction, FlushPatchOperationsAction,
@@ -17,11 +17,11 @@ export class JsonPatchOperationsEffects {
/**
* Dispatches a FlushPatchOperationsAction for every dispatched CommitPatchOperationsAction
*/
@Effect() commit$ = this.actions$.pipe(
commit$ = createEffect(() => this.actions$.pipe(
ofType(JsonPatchOperationsActionTypes.COMMIT_JSON_PATCH_OPERATIONS),
map((action: CommitPatchOperationsAction) => {
return new FlushPatchOperationsAction(action.payload.resourceType, action.payload.resourceId);
}));
})));
constructor(private actions$: Actions) {}