I have a class that extends the React.Component class and I'm passing it my own interface for the props that I expect to receive.
The problem is that when I use the SomeComponent.propTypes = {... the webstorm linter says something is wrong, stating that Property 'propTypes' does not exist on type 'typeof SomeComponent'.
I have no Idea why that happends....
the code of SomeComponent is
class SomeComponent extends React.Component<IProps, {}> {...}
A similar exception is thrown when I write the following code to create a functional component:
const SomeComponent: React.FunctionComponent<IProps> = (props) => {...}
In this case, again I'm getting an error when using the SomeComponent.propTypes = {...} syntax...
this time the exception is type ... is not assignable to type ....\
Any help on why it happens and how to tell typescript that I should be able to use this property? Thanks!