I have the following interface:
interface Drawer {
title: string,
content: Component
}
Afterwards I instantiate this interface:
let workspace: Drawer = {
title: 'Workspaces',
content: SidebarWorkspacesComponent
};
During compilation I get the following error:
ERROR in src/app/components/sidebar/sidebar-toggler.component.ts(36,4): error TS2559: Type 'typeof SidebarWorkspacesComponent' has no properties in common with type 'Component'.
Now I tried using ComponentRef and read dozens of articles but can't figure out how to pass a component in an interface. Obviously I could simply declare content as "any" but I would rather know how to do things properly.
Thanks in advance!