title: jest/react/typescript compilation error in tutorial's example
body: <p>I am trying to launch the basic example from the <a href="https://facebook.github.io/jest/docs/tutorial-react.html" rel="nofollow noreferrer">Jest Tutorial Page</a>, using Jest, React and Typescript</p>
  
  <p><code>Link.tsx</code></p>
  
  <pre><code>import * as React from 'react';
  
  const STATUS = {
      NORMAL: 'normal',
      HOVERED: 'hovered',
  };
  
  interface theProps {
      page:string
  }
  
  export default class Link extends React.Component&lt;theProps,any&gt; {
  
      constructor(props) {
          super(props);
  
          this._onMouseEnter = this._onMouseEnter.bind(this);
          this._onMouseLeave = this._onMouseLeave.bind(this);
  
          this.state = {
              class: STATUS.NORMAL,
          };
      }
  
      _onMouseEnter() {
          this.setState({class: STATUS.HOVERED});
      }
  
      _onMouseLeave() {
          this.setState({class: STATUS.NORMAL});
      }
  
      render() {
          return (
              &lt;a
                  className={this.state.class}
                  href={this.props.page || '#'}
                  onMouseEnter={this._onMouseEnter}
                  onMouseLeave={this._onMouseLeave}&gt;
                  {this.props.children}
              &lt;/a&gt;
          );
      }
  
  }
  </code></pre>
  
  <p><code>test.tsx</code></p>
  
  <pre><code>import * as React from 'react';
  import Link from '../app/Link';
  import * as renderer from 'react-test-renderer';
  
  it('Link changes the class when hovered', () =&gt; {
      const component = renderer.create(
          &lt;Link page="http://www.facebook.com"&gt;Facebook&lt;/Link&gt;
      );
      let tree = component.toJSON();
      expect(tree).toMatchSnapshot();
  
      // manually trigger the callback
      tree.props.onMouseEnter();
      // re-renderingf
      tree = component.toJSON();
      expect(tree).toMatchSnapshot();
  
      // manually trigger the callback
      tree.props.onMouseLeave();
      // re-rendering
      tree = component.toJSON();
      expect(tree).toMatchSnapshot();
  });
  </code></pre>
  
  <p>But even though the test run fine with <code>jest</code>, both Webpack and IntelliJ complain about the line <code>tree.props.onMouseEnter();</code>: 
  <code>Unresolved function or method onMouseLeave()</code></p>
  
  <p>This kind of makes sense as the props object has the type <code>{ [propName: string]: string }</code></p>
  
  <p>Is there anything I can include the skip those warning/error messages ? </p>