← All recipes
Moderne licensed

Replace form classes with untyped variants

Recipe IDorg.openrewrite.angular.migration.replace-untyped-formsArtifact@openrewrite/recipes-angular

Renames FormControl, FormGroup, FormArray, and FormBuilder to their Untyped* equivalents in imports and usages. Angular 14 introduced strictly typed forms, requiring existing untyped usages to migrate to the Untyped* aliases. Classes used in parameterized type positions (e.g. FormGroup<T>) are left unchanged because the user already opted into typed forms.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.angular.migration.replace-untyped-forms

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular