How to reuse type definition in childContextTypes in react?
<p>I am using <code>Typescript</code> to develop <code>React</code>, I want to use <code>childContextTypes</code> in a <code>Component</code>:</p>

<pre><code>import * as React from "react";

interface Props {
  foo: string;
  bar: string;
}

export class Parent extends React.Component&lt;Props, {}&gt; {
    constructor(props:Props, context:any) {
      super(props, context);
    }

    static childContextTypes =  {
      foo: React.PropTypes.string.isRequired,
        bar: React.PropTypes.string.isRequired,
    }

    getChildContext() {
        return this.props;
    }

    render() {
        return &lt;Child /&gt;
    }
}

class Child extends React.Component&lt;{}, {}&gt; {
    context: any;

    static contextTypes = {
      foo: React.PropTypes.string.isRequired,
        bar: React.PropTypes.string.isRequired
    }

    render() {
      return &lt;div&gt;Hello, {this.context.foo}, {this.context.bar}&lt;/div&gt;;
    }
}
</code></pre>

<p>As you can see, I just want to reuse all my <code>Props</code>, but in <code>childContextTypes</code> I have to specify all <code>childContextTypes</code> and I can not reuse <code>Props</code> interface.</p>

<p><strong>Can I reuse <code>Props</code>?</strong> Why I need this? For now, I have only two props, but I may have much more props in some condition, I do not want to rewrite it!</p>