From e7edc905c352e4d0cf763b7602fec3755ee53829 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 29 Dec 2020 22:09:02 +0300 Subject: [PATCH] assert generic state to deep partial state --- .../packages/core/src/lib/utils/internal-store-utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts index 924c48d988..27a8e9cbcf 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts @@ -19,7 +19,7 @@ export class InternalStore { ) => this.state$.pipe(map(selector), distinctUntilChanged(compareFn)); sliceUpdate = ( - selector: (state: State) => Slice, + selector: (state: DeepPartial) => Slice, filterFn = (x: Slice) => x !== undefined, ) => this.update$.pipe(map(selector), filter(filterFn)); @@ -33,7 +33,7 @@ export class InternalStore { } this.state$.next(patchedState); - this.update$.next(patchedState); + this.update$.next(patchedState as DeepPartial); } deepPatch(state: DeepPartial) { @@ -43,7 +43,7 @@ export class InternalStore { set(state: State) { this.state$.next(state); - this.update$.next(state); + this.update$.next(state as DeepPartial); } reset() {