The Wayback Machine - https://web.archive.org/web/20220610044718/https://github.com/angular/angular/pull/45281
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(forms): Update the typed forms migration. #45281

Closed
wants to merge 1 commit into from
Closed

Conversation

dylhunn
Copy link
Contributor

@dylhunn dylhunn commented Mar 7, 2022

The typed forms migration was previously designed to add <any> type parameters to existing forms classes. However, due to some design changes, the new opt-out strategy requires untyped aliases the classes, as introduced in #45205 and #45268.

This PR updates the migration to import these new classes (in an idempotent manner), and replace constructor calls with the new classes. It respects qualified imports as well.

Finally, the code has been refactored to move as much common code as possible into util.ts, and the new schematic code is much simpler.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

@ngbot ngbot bot added this to the Backlog milestone Mar 7, 2022
@ngbot ngbot bot added this to the Backlog milestone Mar 7, 2022
@ngbot ngbot bot added this to the Backlog milestone Mar 7, 2022
@ngbot ngbot bot added this to the Backlog milestone Mar 7, 2022
@ngbot ngbot bot added this to the Backlog milestone Mar 7, 2022
@dylhunn dylhunn requested review from alxhub, devversion, AndrewKushnir and crisbeto and removed request for alxhub Mar 7, 2022
@dylhunn
Copy link
Contributor Author

@dylhunn dylhunn commented Mar 7, 2022

(Sorry for the noise -- accidentally hit the "assignees" section instead of the "reviewers" section.)

Copy link
Member

@devversion devversion left a comment

LGTM overall, but would like to see what you think about @crisbeto's comment/idea

Copy link
Member

@devversion devversion left a comment

LGTM

@dylhunn dylhunn removed the request for review from AndrewKushnir Mar 7, 2022
Copy link
Member

@crisbeto crisbeto left a comment

LGTM

The typed forms migration was previously designed to add `<any>` type parameters to existing forms classes. However, due to some design changes, the new opt-out strategy requires untyped versions of the classes, as introduced in angular#45205 and angular#45268.

This PR updates the migration to import these new classes (in an idempotent manner), and replace constructor calls with the new classes. It respects qualified imports as well. Finally, the code has been refactored to move as much common code as possible into `util.ts`.
@dylhunn dylhunn added action: merge and removed action: review labels Mar 7, 2022
@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Mar 7, 2022

This PR was merged into the repository by commit d336ba9.

@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Apr 7, 2022

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 7, 2022
josmar-crwdstffng pushed a commit to josmar-crwdstffng/angular that referenced this issue Apr 8, 2022
The typed forms migration was previously designed to add `<any>` type parameters to existing forms classes. However, due to some design changes, the new opt-out strategy requires untyped versions of the classes, as introduced in angular#45205 and angular#45268.

This PR updates the migration to import these new classes (in an idempotent manner), and replace constructor calls with the new classes. It respects qualified imports as well. Finally, the code has been refactored to move as much common code as possible into `util.ts`.

PR Close angular#45281
@dylhunn dylhunn deleted the mig branch Apr 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge comp: forms comp: migrations cross-cutting: types forms: strictly typed target: minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants