import { Injector, Type } from '@angular/core'; import { BaseWidgetComponent } from '../base-widget.component'; export type WidgetStaticDefinition = { name: string; component: Type; }; export type WidgetLazyDefinition = { name: string; load: () => Promise<(injector: Injector) => Type>; }; export type WidgetDefinition = WidgetStaticDefinition | WidgetLazyDefinition;