title: Argument of type 'typeof Component' is not assignable to parameter of type 'ComponentType<Component>
body: <p>I would like to have one service that opens different dialogs depending on from which components has service been called.</p>
  
  <p>This is code from my service.
  <a href="https://i.stack.imgur.com/GEsP4.png" rel="nofollow noreferrer">pictureOfCode</a></p>
  
  <pre><code>public addEditItem(origin: string, item?: MoneyModel|BudgetItemModel|WorkflowModel|SportItemModel) {
      const dialogRef = this.dialog.open(this.pickDialog(origin), {
        data: {
          item: item ? item : null,
          origin: origin,
        },
        width: '500px',
    });
      dialogRef.afterClosed().subscribe(result =&gt; {
          this.data.next(result);
          console.log('The dialog was closed', result ? result : 'by clicking on cancel');
      });
  }
  
  public pickDialog(origin: string) {
      switch (origin) {
        case 'workflow': return AddEditWorkflowItemComponent;
        case 'sport': return AddEditSportItemComponent;
      }
  }
  </code></pre>
  
  <p>It works when I run it locally, but build fails because of this error: </p>
  
  <p><em>Argument of type 'typeof AddEditWorkflowItemComponent | typeof AddEditSportItemComponent' is not assignable to parameter of type 'ComponentType | TemplateRef'.
    Type 'typeof AddEditSportItemComponent' is not assignable to type 'ComponentType | TemplateRef'.
      Type 'typeof AddEditSportItemComponent' is not assignable to type 'ComponentType'.
        Property 'authors' is missing in type 'AddEditSportItemComponent' but required in type 'AddEditWorkflowItemComponent'.</em></p>
  
  <p>Is there a way how I could convert the return from switch from typeof Component to ComponentType? Or, is there a way how I could switch the components that dialog opens in a better way? Any help is appreciated.</p>