title: How to specify function parameters for React component callback with TypeScript?
body: <p>I have a React component in TypeScript that looks something like this:</p>
  
  <pre><code>interface FooDetails {
      name: string
      latitude: number,
      longitude: number,
  }
  
  interface FooSelectorProps {
      onDetailsChanged: Function,
  }
  
  class FooSelector extends React.Component&lt;FooSelectorProps, any&gt; {
      constructor(props: FooSelectorProps, context) {
          super(props, context);
      }
  
      onTravelTypeChange(event) {
          this.setState({ travelType: event.target.value });
      }
  
      onDetailsChange(fooData) {
          this.props.onDetailsChanged({
              name: fooData.name,
              latitude: fooData.latitude,
              longitude: fooData.longitude,
          });
      }
  
      render() {
              return &lt;div&gt;...Foo selection UI...&lt;/div&gt;
      }
  }
  </code></pre>
  
  <p>I'd like to be able to specify that the <code>onDetailsChanged</code> function in my propTypes (<code>FooSelectorProps</code>) takes a  <code>FooDetails</code> object, but I can't figure out how to do that. </p>