title: Passing context into a react SFC using Typescript
body: <p>I'm trying to pass context into a SFC as outlined in the <a href="https://reactjs.org/docs/context.html#referencing-context-in-stateless-functional-components" rel="nofollow noreferrer">react docs</a>, but typescript is freaking out about it. I've reproduced <a href="https://codesandbox.io/s/l91l2mqp9q?module=%2Fcomponents%2FShirt.tsx" rel="nofollow noreferrer">the issue on codesandbox.io</a>, and inlined relevant info bellow. So-</p>
  
  <h2>How do I tell Typescript <code>Chill, everything will be okay</code>?</h2>
  
  <h3>Error Message:</h3>
  
  <p><code>Property 'contextTypes' does not exist on type '(props: ShirtProps, context: any) =&gt; Element'.</code></p>
  
  <h3>A simplified version of my <code>component</code> looks like this:</h3>
  
  <pre class="lang-js prettyprint-override"><code>import * as React from 'react';
  import * as PropTypes from 'prop-types';
  import { ShirtProps as Props } from '../types';
  
  // tslint:disable-next-line:no-any
  export const Shirt = (props: Props, context: any) =&gt; {
    return (
      &lt;h1&gt;Example text size is {props.scale}&lt;/h1&gt;
    );
  };
  
  // Typescript throws the following warning:
  // Property 'contextTypes' does not exist on type '(props: ShirtProps, context: any) =&gt; Element'.
  Shirt.contextTypes = {
    parallaxController: PropTypes.object.isRequired
  };
  
  export default Shirt;
  </code></pre>
  
  <p>Thanks!</p>
  
  <p><em>*Any other tips are welcome- I'm just getting started with Typescript AND React.</em></p>