<p dir="auto">Right now createPalette and createMuiTheme accept a Partial, but actually they should accept a DeepPartial since they do a deepmerge instead of a shallow merge</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type DeepPartial&lt;T&gt; = {
  [ P in keyof T ]?: DeepPartial&lt;T[ P ]&gt;;
};"><pre class="notranslate"><span class="pl-s1">type</span> <span class="pl-v">DeepPartial</span><span class="pl-c1">&lt;</span><span class="pl-v">T</span><span class="pl-c1">&gt;</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-kos">[</span> <span class="pl-v">P</span> <span class="pl-k">in</span> <span class="pl-s1">keyof</span> <span class="pl-v">T</span> <span class="pl-kos">]</span>?: <span class="pl-v">DeepPartial</span><span class="pl-c1">&lt;</span><span class="pl-v">T</span><span class="pl-kos">[</span> <span class="pl-v">P</span> <span class="pl-kos">]</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>


<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>

<p dir="auto">Using a palette like this should not give type errors:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="createPalette({
  shades: {
    dark: {
      text: {
        primary: 'green',
      }
    }
  }
});"><pre class="notranslate"><span class="pl-en">createPalette</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c1">shades</span>: <span class="pl-kos">{</span>
    <span class="pl-c1">dark</span>: <span class="pl-kos">{</span>
      <span class="pl-c1">text</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">primary</span>: <span class="pl-s">'green'</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h2 dir="auto">Current Behavior</h2>

<p dir="auto">It gives a compilation error, forcing you to cast it to any or to fill in the complete sub-types.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>

<p dir="auto">See code above.</p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>latest beta</td>
</tr>
<tr>
<td>React</td>
<td>16.2.0</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 62</td>
</tr>
<tr>
<td>TS</td>
<td>2.6.2</td>
</tr>
</tbody>
</table>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>

<h2 dir="auto">Current Behavior</h2>

<h2 dir="auto">Steps to Reproduce (for bugs)</h2>

<ol dir="auto">
<li></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export const domRender = (Component) =&gt; {
  const div = document.createElement('div');
  document.body.appendChild(div);
  function destory() {
    const unmountResult = ReactDOM.findDOMNode(div);
    if (unmountResult &amp;&amp; div.parentNode) {
      console.log(div);
      div.parentNode.removeChild(div);
    }
  }
  ReactDOM.render(&lt;Component destory={() =&gt; destory()} /&gt;, div);
};"><pre class="notranslate"><code class="notranslate">export const domRender = (Component) =&gt; {
  const div = document.createElement('div');
  document.body.appendChild(div);
  function destory() {
    const unmountResult = ReactDOM.findDOMNode(div);
    if (unmountResult &amp;&amp; div.parentNode) {
      console.log(div);
      div.parentNode.removeChild(div);
    }
  }
  ReactDOM.render(&lt;Component destory={() =&gt; destory()} /&gt;, div);
};
</code></pre></div>
<ol start="2" dir="auto">
<li></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Test extends PureComponent {
  state = {
    open: true,
  }
  render() {
    const { destory } = this.props;
    const { open } = this.state;
    return (
      &lt;div&gt;
        &lt;Dialog
          open={open}
          onExited={() =&gt; { if (destory) destory(); }}
          // transition={props =&gt; &lt;Slide direction=&quot;up&quot; {...props} /&gt;}
          keepMounted
          onClose={() =&gt; 
            this.setState({
              open: false,
            });
          }}
        &gt;
          &lt;Login /&gt;
        &lt;/Dialog&gt;
      &lt;/div&gt;
    );
  }
}

domRender(&lt;Test /&gt;)"><pre class="notranslate"><code class="notranslate">class Test extends PureComponent {
  state = {
    open: true,
  }
  render() {
    const { destory } = this.props;
    const { open } = this.state;
    return (
      &lt;div&gt;
        &lt;Dialog
          open={open}
          onExited={() =&gt; { if (destory) destory(); }}
          // transition={props =&gt; &lt;Slide direction="up" {...props} /&gt;}
          keepMounted
          onClose={() =&gt; 
            this.setState({
              open: false,
            });
          }}
        &gt;
          &lt;Login /&gt;
        &lt;/Dialog&gt;
      &lt;/div&gt;
    );
  }
}

domRender(&lt;Test /&gt;)
</code></pre></div>
<ol start="3" dir="auto">
<li></li>
</ol>
<p dir="auto">the dialog can't close<br>
4.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12379461/34609847-4ea2a048-f259-11e7-8aad-9e8e264979ea.png"><img src="https://user-images.githubusercontent.com/12379461/34609847-4ea2a048-f259-11e7-8aad-9e8e264979ea.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">Context</h2>

<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.26</td>
</tr>
<tr>
<td>React</td>
<td>16.2.0</td>
</tr>
<tr>
<td>browser</td>
<td>chrome 63.0.3239.84</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>