← All recipes
Moderne licensed

Add generic type to ModuleWithProviders

Recipe IDorg.openrewrite.angular.migration.add-module-with-providers-genericArtifact@openrewrite/recipes-angular

Adds the required generic type parameter to bare ModuleWithProviders return types. Angular 10 requires ModuleWithProviders<T> where T is the NgModule type. The module type is inferred from the ngModule property in the return statement.

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.add-module-with-providers-generic

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

mod config recipes npm install @openrewrite/recipes-angular