@@ -53,6 +53,15 @@ interface PermissiveAbstractControlOptions extends Omit<AbstractControlOptions,
5353 updateOn ?: string ;
5454}
5555
56+ // Note: these two types have been extracted into type aliases to work around a .d.ts generation
57+ // issue in TypeScript 5.7. See: https://github.com/Microsoft/TypeScript/issues/60506. The types
58+ // have to be exported for the workaround to work.
59+ /** Group of nullable form controls. */
60+ export type ɵNullableFormGroup < T > = FormGroup < { [ K in keyof T ] : ɵElement < T [ K ] , null > } > ;
61+
62+ /** Group of non-nullable form controls. */
63+ export type ɵNonNullableFormGroup < T > = FormGroup < { [ K in keyof T ] : ɵElement < T [ K ] , never > } > ;
64+
5665/**
5766 * ControlConfig<T> is a tuple containing a value of type T, plus optional validators and async
5867 * validators.
@@ -194,10 +203,7 @@ export class FormBuilder {
194203 * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur'
195204 * | submit').
196205 */
197- group < T extends { } > (
198- controls : T ,
199- options ?: AbstractControlOptions | null ,
200- ) : FormGroup < { [ K in keyof T ] : ɵElement < T [ K ] , null > } > ;
206+ group < T extends { } > ( controls : T , options ?: AbstractControlOptions | null ) : ɵNullableFormGroup < T > ;
201207
202208 /**
203209 * @description
@@ -418,7 +424,7 @@ export abstract class NonNullableFormBuilder {
418424 abstract group < T extends { } > (
419425 controls : T ,
420426 options ?: AbstractControlOptions | null ,
421- ) : FormGroup < { [ K in keyof T ] : ɵElement < T [ K ] , never > } > ;
427+ ) : ɵNonNullableFormGroup < T > ;
422428
423429 /**
424430 * Similar to `FormBuilder#record`, except any implicitly constructed `FormControl`
0 commit comments