cnunciato / ng-mock-component

An Angular module for mocking components.
MIT License
53 stars 13 forks source link

Error in typescript 2.4 #8

Closed jdeboer-geoplan closed 7 years ago

jdeboer-geoplan commented 7 years ago

I get this error with typescript 2.4

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

Known breaking issue with typescript https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes

cnunciato commented 7 years ago

Interesting, thanks for the head's up. I'll take a look -- planning to do another release of this shortly.

aytacworld commented 7 years ago

a workaround would be casting Mock to any return Component(metadata)(<any>Mock); But it's not a real solution. Or you can downgrade your typescript package and make sure, your compiler and editor uses that one (https://stackoverflow.com/a/44858294)

shaungrady commented 7 years ago

👍

cnunciato commented 7 years ago

This should be fixed in 0.1.0; I went ahead with the casting approach, as it seemed reasonable enough.

musasesay commented 6 years ago

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

valueice commented 6 years ago

Was anyone able to solve this? Had same error: [TS] Type 'typeof HomePage' has no properties in common with type 'Component'.