angular-cn/goldens/public-api
Dylan Hunn e49fc96ed3 feat(forms): Make Form Statuses use stricter types. (#42952)
Specifically: narrow the type used for form statuses from string to a union of possible statuses. Change the API methods from any to use the new type.

This is a breaking change. However, as discussed in the PR, breakage seems minimal, and google3 has been prepped to land this.

Background: we uncovered these any typings in the course of design work for typed forms. They could be fixed in a non-breaking manner by piggybacking them on top of the new typed forms generics, but it would be much cleaner to fix them separately if possible.

BREAKING CHANGE:

A new type called `FormControlStatus` has been introduced, which is a union of all possible status strings for form controls. `AbstractControl.status` has been narrowed from `string` to `FormControlStatus`, and `statusChanges` has been narrowed from `Observable<any>` to `Observable<FormControlStatus>`. Most applications should consume the new types seamlessly. Any breakage caused by this change is likely due to one of the following two problems: (1) the app is comparing `AbstractControl.status` against a string which is not a valid status; or, (2) the app is using `statusChanges` events as if they were something other than strings.

PR Close #42952
2021-08-04 16:28:20 -07:00
..
animations build: update API goldens after api-extractor update (#42737) 2021-07-02 10:08:03 -07:00
common build: update API goldens after api-extractor update (#42737) 2021-07-02 10:08:03 -07:00
compiler-cli fix(compiler-cli): check split two way binding (#42601) 2021-07-13 08:47:11 -07:00
core fix(core): allow proper type inference when `ngFor` is used with a `trackBy` function (#42692) 2021-07-13 14:08:05 -07:00
elements build: update API goldens to reflect new tool (#42688) 2021-06-30 11:43:48 -07:00
forms feat(forms): Make Form Statuses use stricter types. (#42952) 2021-08-04 16:28:20 -07:00
localize build: update API goldens after api-extractor update (#42737) 2021-07-02 10:08:03 -07:00
platform-browser build: update API goldens to reflect new tool (#42688) 2021-06-30 11:43:48 -07:00
platform-browser-dynamic build: update API goldens to reflect new tool (#42688) 2021-06-30 11:43:48 -07:00
platform-server build: update API goldens to reflect new tool (#42688) 2021-06-30 11:43:48 -07:00
router fix(router): add missing outlet events to RouterOutletContract (#42431) 2021-07-27 16:34:24 -07:00
service-worker build: update API goldens after api-extractor update (#42737) 2021-07-02 10:08:03 -07:00
upgrade build: update API goldens to reflect new tool (#42688) 2021-06-30 11:43:48 -07:00
manage.js ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00