refactor(ivy): include generic type for ModuleWithProviders
in .d.ts files (#34235)
The `ModuleWithProviders` type has an optional type parameter that should be specified to indicate what NgModule class will be provided. This enables the Ivy compiler to statically determine the NgModule type from the declaration files. This type parameter will become required in the future, however to aid in the migration the compiler will detect code patterns where using `ModuleWithProviders` as return type is appropriate, in which case it transforms the emitted .d.ts files to include the generic type argument. This should reduce the number of occurrences where `ModuleWithProviders` is referenced without its generic type argument. Resolves FW-389 PR Close #34235
This commit is contained in:
@ -260,6 +260,11 @@ export class Identifiers {
|
||||
moduleName: CORE,
|
||||
};
|
||||
|
||||
static ModuleWithProviders: o.ExternalReference = {
|
||||
name: 'ModuleWithProviders',
|
||||
moduleName: CORE,
|
||||
};
|
||||
|
||||
static defineNgModule: o.ExternalReference = {name: 'ɵɵdefineNgModule', moduleName: CORE};
|
||||
static setNgModuleScope: o.ExternalReference = {name: 'ɵɵsetNgModuleScope', moduleName: CORE};
|
||||
|
||||
|
Reference in New Issue
Block a user