title: How to describe the method in a React component with interface of TypeScript?
body: <p>I am a freshman with typescript. I don't understand this error in my code.
  <a href="https://i.stack.imgur.com/P31Qd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P31Qd.png" alt="enter image description here"></a></p>
  
  <p>I use the <code>IProps</code> to describle the props of the class. Why does the typescript check the method of this class ? How can I solve this problem?</p>
  
  <pre><code>    export interface IProps extends FormComponentProps {
        dispatch: Dispatch&lt;any&gt;;
        loading: any;
      }
  
      @Form.create()
      @connect(({ global, loading }) =&gt; ({ global, loading }))
      export default class MessageBoard extends PureComponent&lt;IProps&gt; {
        state = {
          activated: false,
        };
  
        deactivate = () =&gt; {
          this.setState({ activated: true });
        };
        ...
        render() {
          ...
          return (...);
        }
      }
  </code></pre>