title: default type argument and default argument in typescript 3.6
body: <p>Ever since upgrading to typescript 3.5, I am plagued with the same error message, I do not understand:</p>
  
  <p>I have this react component</p>
  
  <pre><code>export const RouteWrapper = function RouteWrapper&lt;
    P = { children?: ReactNode },
    TRoute extends RouteProps = Route
  &gt;(
    Wrapper: React.ComponentType&lt;P&gt;,
    RouteType: React.ComponentType&lt;RouteProps&gt; = Route,
    options: Partial&lt;TRoute&gt; = {},
    wrapperProps: P = ({} as unknown) as P
  ) {
    return function RouteWrapperResuslt({
      component: RouteComponent,
      path,
      exact,
      ...rest
    }: RouteWrapperProps&lt;P, Partial&lt;TRoute&gt;&gt;) {
      return (
        &lt;RouteType
          path={path}
          exact={exact}
          {...options}
          component={(props: P) =&gt; (
            &lt;Wrapper {...wrapperProps || {}}&gt;
              &lt;RouteComponent {...rest} {...props} /&gt;
            &lt;/Wrapper&gt;
          )}
        /&gt;
      );
    };
  };
  </code></pre>
  
  <p>But this line errors:</p>
  
  <pre><code>&lt;Wrapper {...(wrapperProps || {})}&gt;
    &lt;RouteComponent {...rest} {...props} /&gt;
  &lt;/Wrapper&gt;
  </code></pre>
  
  <p>With this error</p>
  
  <pre><code>Type '{ children: Element; }' is not assignable to type 'P'.
    '{ children: Element; }' is assignable to the constraint of type 'P', but 'P' could be instantiated with a different subtype of constraint '{}'
  </code></pre>
  
  <p>Here is a <a href="https://codesandbox.io/s/dependency-array-tnryz" rel="nofollow noreferrer">codesandbox</a> with a full example</p>