title: Typescript wrong type with Material-UI Higher Order Components
body: <p>I'm trying to update from <em>Material-UI 1.x</em> to <em>Material-UI 3.9.2</em>.</p>
  
  <p>I had a few components, including the example below, that were working properly with <em>Higher Order Components (HOC)</em>, but I have a hard time at migrating them to <em>3.9.2</em>.</p>
  
  <p>In this example, I reduced a problem and don't get why the typings are wrong (<em>Typescript 3.3.3</em>). It seems to me to be consistent with the way <em>MUI PropInjector</em> works.</p>
  
  <p>Here is an example:</p>
  
  <pre><code>import { createStyles, Theme, withStyles, WithStyles } from '@material-ui/core';
  import Dialog, { DialogProps } from '@material-ui/core/Dialog';
  
  const styles = (theme: Theme) =&gt; createStyles({
      defaultPaperWidthSm: {
          backgroundColor: "#fafafa",
          minWidth: 320,
          maxWidth: 700
      },
      largePaperWidthSm: {
          backgroundColor: "#fafafa",
          width: 700,
          maxWidth: 700,
          [theme.breakpoints.up('md')]: {
              minWidth: 900,
              width: "unset",
              maxWidth: "80vw",
          }
      }
  })
  
  export default withStyles(styles)(
      function ResponsiveDialog(props: DialogProps &amp; WithStyles&lt;typeof styles&gt;) {
          let { classes, className, ...otherProps } = props
          return &lt;Dialog {...otherProps} /&gt;
      }
  )
  </code></pre>
  
  <p>Using it as a component:</p>
  
  <pre><code>&lt;ResponsiveDialog open={true}&gt;
      &lt;span&gt;Blabla&lt;/span&gt;
  &lt;/ResponsiveDialog&gt;
  </code></pre>
  
  <p>It returns this error, and I don't get why:</p>
  
  <blockquote>
    <p>Type '{ children: Element; open: boolean; }' is not assignable to type 'IntrinsicAttributes &amp; Pick &amp; StyledComponentProps&lt;"defaultPaperWidthSm" | "largePaperWidthSm"> &amp; { children?: ReactNode; }'.</p>
    
    <p>Property 'open' does not exist on type 'IntrinsicAttributes &amp; Pick &amp; StyledComponentProps&lt;"defaultPaperWidthSm" | "largePaperWidthSm"> &amp; { children?: ReactNode; }'.</p>
  </blockquote>