mobxjs / mobx-react

React bindings for MobX
https://mobx.js.org/react-integration.html
MIT License
4.85k stars 350 forks source link

TypeScript unable to resolve signature of observer decorator #822

Closed ynejati closed 4 years ago

ynejati commented 4 years ago

I failed to mention yesterday that I wasn't sure that 818 was entirely ready. While converting the tests to TypeScript, I ran across this error with the observer decorator. To prevent a regression, we should revert back to the old shape, which appears to be correct. I wouldn't be surprised if I run into similar problems as a work my way through these tests. I will submit a PR soon, stand by.

Unable to resolve signature of class decorator when called as an expression.
  Type 'ClassicComponentClass<any>' is not assignable to type 'void | typeof Component'.
    Type 'ClassicComponentClass<any>' is not assignable to type 'typeof Component'.
      Property 'swapRenderFunc' is missing in type 'ClassicComponent<any, any>' but required in type 'Component'.ts(1238)
lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.