Typescript: 2.4.1 Error: Type "typeof _" has no properties in common with type 'Component'

Created on 11 Jul 2017  路  6Comments  路  Source: microsoft/TypeScript



TypeScript Version: 2.4.1

Code

import { Component } from "@angular/core";

export function MockComponent(options: Component): Component {
  let metadata: Component = {
    selector: options.selector,
    template: options.template || "",
    inputs: options.inputs,
    outputs: options.outputs
  };

  return Component(metadata)(class {});
}

Expected behavior:

Actual behavior:

image

Duplicate

Most helpful comment

Got same error but in terminal, for me it seems like it's not a Visual Studio Code issue

All 6 comments

This was working with the previous version

Closing this issue as it seems to be something with the new update of Visual Studio Code

Got same error but in terminal, for me it seems like it's not a Visual Studio Code issue

You can find temp solution of problem in this issue:
https://github.com/cnunciato/ng2-mock-component/issues/8

I got same error I am using "typescript": "2.6.2"

Type 'typeof UserMgmtComponent' has no properties in common with type 'Component'.

with old versions it was working fine for me.

did any one find any solution for it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DanielRosenwasser picture DanielRosenwasser  路  3Comments

dlaberge picture dlaberge  路  3Comments

manekinekko picture manekinekko  路  3Comments

Roam-Cooper picture Roam-Cooper  路  3Comments

blendsdk picture blendsdk  路  3Comments