angular/packages/forms/test
Dylan Hunn ff3f5a8d12 fix(forms): Fix a typing bug in FormBuilder. (#45684)
Previously, the following code would fail to compile:

```
let form: FormGroup<{email: FormControl<string | null>}>;
form = fb.group({
    email: ['', Validators.required]
});
```

This is because the compiler was unable to properly infer the inner type of `ControlConfig` arrays in some cases. The same issue applies to `FormArray` as well under certain circumstances.

This change cleans up the `FormBuilder` type signatures to always use the explicit Element type, and to catch `ControlConfig` types that might fall through.

PR Close #45684
2022-04-20 09:15:46 -07:00
..
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
directives_spec.ts fix(forms): improve error message for invalid value accessors (#45192) 2022-03-15 13:26:03 -07:00
form_array_spec.ts feat(forms): Implement strict types for the Angular Forms package. (#43834) 2022-04-12 17:37:04 +00:00
form_builder_spec.ts fix(forms): Make UntypedFormBuilder assignable to FormBuilder, and vice versa. (#45421) 2022-03-24 10:49:10 -07:00
form_control_spec.ts refactor(forms): Move FormControl to an overridden exported constructor. (#44316) (#44806) 2022-01-31 22:48:23 +00:00
form_group_spec.ts feat(forms): Implement strict types for the Angular Forms package. (#43834) 2022-04-12 17:37:04 +00:00
reactive_integration_spec.ts fix(forms): not picking up disabled state if group is swapped out and disabled (#43499) 2022-03-28 09:26:19 -07:00
template_integration_spec.ts feat(core): triggerEventHandler accept optional eventObj (#45279) 2022-03-09 13:51:54 -08:00
typed_integration_spec.ts fix(forms): Fix a typing bug in FormBuilder. (#45684) 2022-04-20 09:15:46 -07:00
util.ts refactor(forms): refactor common validators used in unit tests (#38020) 2020-07-22 20:42:43 -07:00
validators_spec.ts fix(forms): Correct empty validator to handle objects with a property length: 0. (#33729) 2022-02-03 23:15:27 -08:00
value_accessor_integration_spec.ts fix(forms): ensure OnPush ancestors are marked dirty when the promise resolves (#44886) 2022-01-31 21:38:39 +00:00