Skip to content

Commit

Permalink
Merge pull request #180 from ntziolis/master-1
Browse files Browse the repository at this point in the history
fix(typings): correctly unpack values of nested form group arrays
  • Loading branch information
NetanelBasal committed Aug 11, 2023
2 parents 8825292 + 26e2fc2 commit b774fe8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/reactive-forms/src/lib/types.ts
Expand Up @@ -19,7 +19,11 @@ export type ValuesOf<T extends ControlsOf<any>> = {
? R
: NonUndefined<T[K]> extends FormGroup<infer R>
? ValuesOf<R>
: NonUndefined<T[K]> extends FormArray<infer R, infer C> ? R[] : NonUndefined<T[K]>;
: NonUndefined<T[K]> extends FormArray<infer R, infer C>

Check warning on line 22 in libs/reactive-forms/src/lib/types.ts

View workflow job for this annotation

GitHub Actions / build

'C' is defined but never used
? R extends Record<any, any>
? ValuesOf<R>[]
: R[]
: NonUndefined<T[K]>;
};

export type DeepPartial<T> = {
Expand Down

0 comments on commit b774fe8

Please sign in to comment.