MrWolfZ/ngrx-forms

Add compatibility with typescript 4.8

RasmusWa opened this issue · 1 comments

Describe the bug
When upgrading our application to typescript 4.8.4, we get the following error:

Error: node_modules/ngrx-forms/src/update-function/update-group.d.ts:131:132 - error TS2344: Type 'TValue' does not satisfy the  constraint 'KeyValue'.

131 export declare function updateGroup<TValue>(state: FormGroupState<TValue>, updateFnsArr: StateUpdateFns<TValue>[]):  FormGroupState<TValue>;

   node_modules/ngrx-forms/src/update-function/update-group.d.ts:131:37
    131 export declare function updateGroup<TValue>(state: FormGroupState<TValue>, updateFnsArr: StateUpdateFns<TValue>[]):  FormGroupState<TValue>;
    This type parameter might need an `extends KeyValue` constraint.

To Reproduce
Steps to reproduce the behavior:

  1. Create an angular application with typescript 4.8.4
  2. Add ngrx-forms as a dependency
  3. Utilize the updateGroup function
  4. Run the application with ng serve
  5. The error will appear in the logs

Expected behavior
The application should compile without an error

Library version:
Tested with ngrx-forms@6.3.6 and ngrx-forms@7.0.0

I've just released version 8.0.0 that updates the types for compatibility with TypeScript 4.8+.