Why don't BrowserModule and HttpClientModule implement the NgModule interface?

Just discovered that BrowserModule and HttpClientModule do not implement the NgModule interface. Can anyone explain why?

Update: The actual problem I'm trying to solve is to extract the import section to split the array that I can create based on certain rules. Therefore, the idea is to indicate the type of this array . I do not want to put any here:

 const importedModules: any[] = [ BrowserModule, HttpClientModule, FormsModule, SharedModule, ... ]; if (!environment.production) { importedModules.push(StoreDevtoolsModule.instrument()); } @NgModule({ //... imports: importedModules, //... }) 
+5
source share

Source: https://habr.com/ru/post/1273145/


All Articles