<blockquote>
<p dir="auto">Issue originally reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/andy-ms/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/andy-ms">@andy-ms</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="268060740" data-permission-text="Title is private" data-url="https://github.com/babel/babylon/issues/768" data-hovercard-type="issue" data-hovercard-url="/babel/babylon/issues/768/hovercard" href="https://github.com/babel/babylon/issues/768">babel/babylon#768</a></p>
</blockquote>
<h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export type T = ({x, y}: any) =&gt; void;"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">type</span> <span class="pl-smi">T</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span>x<span class="pl-kos">,</span> y<span class="pl-kos">}</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span></pre></div>
<p dir="auto">(from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="248604208" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/6065" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/6065/hovercard?comment_id=338848155&amp;comment_type=issue_comment" href="https://github.com/babel/babel/issues/6065#issuecomment-338848155">#6065 (comment)</a>)</p>
<h3 dir="auto">Babylon/Babel Configuration</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [&quot;typescript&quot;]
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"typescript"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Parse succeeds</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto"><code class="notranslate">{ SyntaxError: src\a.ts: Unexpected token, expected ) (1:23)</code></p>
<h3 dir="auto">Your Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babylon</td>
<td>7.0.0-beta.29</td>
</tr>
<tr>
<td>node</td>
<td>8.7.0</td>
</tr>
<tr>
<td>npm</td>
<td>5.5.1</td>
</tr>
<tr>
<td>Operating System</td>
<td>Windows 10 Enterprise</td>
</tr>
</tbody>
</table>
<p dir="auto">(would assign myself if I could)</p>
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
Code fails with Babel, works with TSC.</p>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li><a href="https://babeljs.io/repl#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;spec=false&amp;loose=false&amp;code_lz=C4TwDgpgBAsiAq5oF4oAoDeVgAsIFtoBfALii1wIjIGdgAnASwDsBzKIgSimQD4o6TNgChhAYwD2zOlAAeZOIkg9yRIA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=true&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=module&amp;lineWrap=false&amp;presets=typescript&amp;prettier=false&amp;targets=&amp;version=7.0.0-beta.54&amp;envVersion=" rel="nofollow">Babel REPL</a> (ps: needs to install the <code class="notranslate">@babel/plugin-transform-typescript</code> plugin)</li>
<li><a href="http://www.typescriptlang.org/play/#src=type%20MyType%20%3D%20(%7B%20theme%20%7D%3A%20%7B%20theme%3A%20string%20%7D)%20%3D%3E%20string%0D%0A%0D%0Aconst%20x%3A%20MyType%20%3D%20%7B%7D" rel="nofollow">TypeScript Playground</a></li>
</ul>
<p dir="auto">This code fails on Babel but not on TSC:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type MyType = ({ theme }: { theme: string }) =&gt; string

const x: MyType = {}"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">MyType</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> theme <span class="pl-kos">}</span>: <span class="pl-kos">{</span> <span class="pl-c1">theme</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">string</span>

<span class="pl-k">const</span> <span class="pl-s1">x</span>: <span class="pl-smi">MyType</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">This code works on both:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type MyType = (param: { theme: string }) =&gt; string

const x: MyType = {}"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">MyType</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">param</span>: <span class="pl-kos">{</span> <span class="pl-c1">theme</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">string</span>

<span class="pl-k">const</span> <span class="pl-s1">x</span>: <span class="pl-smi">MyType</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong></p>
<p dir="auto">Support this syntax, because tsc supports it.</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<p dir="auto">The one inside Create React App v2, plus typescript preset. (<a href="https://github.com/brunolemos/create-react-app/blob/next-typescript/packages/babel-preset-react-app/create.js">file</a>)</p>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): 7.1.0</li>
<li>Node/npm version: 5.6.0</li>
<li>OS: macOS 10.14</li>
<li>Monorepo yes (yarn workspace)</li>
<li>How you are using Babel: CRA</li>
</ul>
<p dir="auto"><strong>Additional context</strong></p>
<p dir="auto">Possibly related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="343621304" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/8365" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/8365/hovercard" href="https://github.com/babel/babel/issues/8365">#8365</a></p>