Looking for a way to avoid duplicating the array entries:
import { ComponentA } from './components/A.component';
import { ComponentB } from './components/B.component';
const COMPONENTS: any[] = [
ComponentA,
ComponentB
];
@NgModule({
declarations: COMPONENTS,
exports: COMPONENTS
})
export class ExampleModule {
}
What would be a more specific type for const COMPONENTS: any[]
besides any[]
? Using object[]
seems to work, but there may be a better solution that I have yet to find.