f2a1c660313224bdfa1ccb0cf3790e4ec7c00805

ModuleWithProviders
functions (#27326)
Exported functions or static method that return a `ModuleWithProviders` compatible structure need to provide information about the referenced `NgModule` type in their return type. This allows ngtsc to be able to understand the type of `NgModule` that is being returned from calls to the function, without having to dig into the internals of the compiled library. There are two ways to provide this information: * Add a type parameter to the `ModuleWithProviders` return type. E.g. ``` static forRoot(): ModuleWithProviders<SomeNgModule>; ``` * Convert the return type to a union that includes a literal type. E.g. ``` static forRoot(): (SomeOtherType)&{ngModule:SomeNgModule}; ``` This commit updates the rendering of typings files to include this type information on all matching functions/methods. PR Close #27326
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
86.3%
JavaScript
8.5%
HTML
1.8%
Starlark
1.7%
CSS
1%
Other
0.6%