diff --git a/modules/entity/src/entity_state.ts b/modules/entity/src/entity_state.ts index aab8653b49..81fb423ffa 100644 --- a/modules/entity/src/entity_state.ts +++ b/modules/entity/src/entity_state.ts @@ -9,9 +9,9 @@ export function getInitialEntityState(): EntityState { export function createInitialStateFactory() { function getInitialState(): EntityState; - function getInitialState( - additionalState: S - ): EntityState & S; + function getInitialState>( + additionalState: Omit> + ): S; function getInitialState(additionalState: any = {}): any { return Object.assign(getInitialEntityState(), additionalState); } diff --git a/modules/entity/src/models.ts b/modules/entity/src/models.ts index 4138e3e960..be18b7951e 100644 --- a/modules/entity/src/models.ts +++ b/modules/entity/src/models.ts @@ -110,7 +110,9 @@ export interface EntityAdapter extends EntityStateAdapter { selectId: IdSelector; sortComparer: false | Comparer; getInitialState(): EntityState; - getInitialState(state: S): EntityState & S; + getInitialState>( + state: Omit> + ): S; getSelectors(): EntitySelectors>; getSelectors( selectState: (state: V) => EntityState