I'm gradually moving my current react project into typescript. While doing that, I've met some strange situation.
// MyComponent.js
import {someHoc} from 'recompose' // is typed by DefinitelyTyped.
class MyComponent extends React.Component {
...
}
const component = someHoc(options)(MyComponent)
export default component
When I imported MyComponent
from a typed code, typescript check the Props of MyComponent
and throw errors on type checking someHoc
Why they check type from JS module? I think tsc should not check the type of exported
component
, cause it is written on JSHow can I suppress this error without converting
MyComponent
to typescript?