<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong></p>
<p dir="auto">Babel can't parse the following syntax. Works perfectly when using pure typescript.</p>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const importRowsToElasticDB = async &lt;T&gt;(rows: T[], indexName: string, typeName: string): Promise&lt;any&gt; =&gt; {
                                                                                       ^
Unexpected token, expected &quot;;&quot;

    at Object.raise (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:3831:17)
    at Object.unexpected (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:5143:16)
    at Object.semicolon (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:5131:40)
    at Object.parseVarStatement (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:7715:10)
    at Object.parseStatementContent (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:7310:21)
    at Object.parseStatementContent (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:10130:18)
    at Object.parseStatement (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:7243:17)
    at Object.parseBlockOrModuleBlockBody (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:7810:25)
    at Object.parseBlockBody (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:7797:10)
    at Object.parseTopLevel (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:7181:10)
    at Object.parse (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:8660:17)
    at parse (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/parser/lib/index.js:10660:38)
    at parser (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/core/lib/transformation/normalize-file.js:170:34)
    at normalizeFile (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/core/lib/transformation/normalize-file.js:138:11)
    at runSync (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/core/lib/transformation/index.js:44:43)
    at runAsync (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/core/lib/transformation/index.js:35:14)
    at process.nextTick (/Users/congy/Desktop/projects/ua-app-backend/node_modules/@babel/core/lib/transform.js:34:34)
    at process._tickCallback (internal/process/next_tick.js:61:11)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">importRowsToElasticDB</span> <span class="pl-c1">=</span> <span class="pl-s1">async</span> <span class="pl-c1">&lt;</span><span class="pl-v">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">rows</span>: <span class="pl-v">T</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">indexName</span>: <span class="pl-s1">string</span><span class="pl-kos">,</span> <span class="pl-s1">typeName</span>: <span class="pl-s1">string</span><span class="pl-kos">)</span>: <span class="pl-v">Promise</span><span class="pl-c1">&lt;</span><span class="pl-s1">any</span><span class="pl-c1">&gt;</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
                                                                                       <span class="pl-c1">^</span>
<span class="pl-v">Unexpected</span> <span class="pl-s1">token</span><span class="pl-kos">,</span> <span class="pl-s1">expected</span> <span class="pl-s">";"</span>

    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">raise</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">3831</span>:<span class="pl-c1">17</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">unexpected</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">5143</span>:<span class="pl-c1">16</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">semicolon</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">5131</span>:<span class="pl-c1">40</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parseVarStatement</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">7715</span>:<span class="pl-c1">10</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parseStatementContent</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">7310</span>:<span class="pl-c1">21</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parseStatementContent</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">10130</span>:<span class="pl-c1">18</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parseStatement</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">7243</span>:<span class="pl-c1">17</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parseBlockOrModuleBlockBody</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">7810</span>:<span class="pl-c1">25</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parseBlockBody</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">7797</span>:<span class="pl-c1">10</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parseTopLevel</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">7181</span>:<span class="pl-c1">10</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">parse</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">8660</span>:<span class="pl-c1">17</span><span class="pl-kos">)</span>
    <span class="pl-en">at</span> <span class="pl-s1">parse</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>parser<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">10660</span>:<span class="pl-c1">38</span><span class="pl-kos">)</span>
    <span class="pl-en">at</span> <span class="pl-s1">parser</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>core<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">transformation</span><span class="pl-c1">/</span><span class="pl-s1">normalize</span><span class="pl-c1">-</span><span class="pl-s1">file</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">170</span>:<span class="pl-c1">34</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">normalizeFile</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>core<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">transformation</span><span class="pl-c1">/</span><span class="pl-s1">normalize</span><span class="pl-c1">-</span><span class="pl-s1">file</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">138</span>:<span class="pl-c1">11</span><span class="pl-kos">)</span>
    <span class="pl-en">at</span> <span class="pl-s1">runSync</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>core<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">transformation</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">44</span>:<span class="pl-c1">43</span><span class="pl-kos">)</span>
    <span class="pl-en">at</span> <span class="pl-s1">runAsync</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>core<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">transformation</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">35</span>:<span class="pl-c1">14</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">nextTick</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Users<span class="pl-c1">/</span>congy</span><span class="pl-c1">/</span><span class="pl-v">Desktop</span><span class="pl-c1">/</span><span class="pl-s1">projects</span><span class="pl-c1">/</span><span class="pl-s1">ua</span><span class="pl-c1">-</span><span class="pl-s1">app</span><span class="pl-c1">-</span><span class="pl-s1">backend</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span>@<span class="pl-s1">babel</span><span class="pl-pds"><span class="pl-c1">/</span>core<span class="pl-c1">/</span>lib</span><span class="pl-c1">/</span><span class="pl-s1">transform</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">34</span>:<span class="pl-c1">34</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">_tickCallback</span> <span class="pl-kos">(</span><span class="pl-s1">internal</span><span class="pl-c1">/</span><span class="pl-s1">process</span><span class="pl-c1">/</span><span class="pl-s1">next_tick</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">61</span>:<span class="pl-c1">11</span><span class="pl-kos">)</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong></p>
<p dir="auto">babel-typescript correctly parses this syntax</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [
    &quot;@babel/preset-typescript&quot;,
    [&quot;@babel/preset-env&quot;, {
      &quot;targets&quot;: { &quot;node&quot;: &quot;8.10&quot; },
      &quot;useBuiltIns&quot;: &quot;usage&quot;,
      &quot;modules&quot;: false,
      &quot;loose&quot;: true
    }]
  ],
  &quot;plugins&quot;: [
    &quot;babel-plugin-node-source-map-support&quot;,
    &quot;@babel/plugin-proposal-optional-catch-binding&quot;
  ]
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span>
    <span class="pl-s">"@babel/preset-typescript"</span><span class="pl-kos">,</span>
    <span class="pl-kos">[</span><span class="pl-s">"@babel/preset-env"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
      <span class="pl-s">"targets"</span>: <span class="pl-kos">{</span> <span class="pl-s">"node"</span>: <span class="pl-s">"8.10"</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-s">"useBuiltIns"</span>: <span class="pl-s">"usage"</span><span class="pl-kos">,</span>
      <span class="pl-s">"modules"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
      <span class="pl-s">"loose"</span>: <span class="pl-c1">true</span>
    <span class="pl-kos">}</span><span class="pl-kos">]</span>
  <span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
    <span class="pl-s">"babel-plugin-node-source-map-support"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/plugin-proposal-optional-catch-binding"</span>
  <span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): @babel/core@7.3.4, @babel/preset-typescript@7.3.3</li>
<li>Node/npm version: Node 11/yarn 1.13</li>
<li>OS: e.g. OSX 10.13.6</li>
<li>Monorepo: no</li>
<li>How you are using Babel: via webpack (latest v4)</li>
<li>typescript: 3.3.3</li>
</ul>
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong></p>
<p dir="auto">In the current <code class="notranslate">@babel/parser</code> version 7.3.3, a class property that defines an async arrow function with generics breaks the parser.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    SyntaxError: boost/packages/core/src/Executor.ts: Unexpected token, expected &quot;;&quot; (85:52)

      83 |    * Execute a task with the provided value.
      84 |    */
    &gt; 85 |   executeTask = async &lt;T&gt;(task: Task&lt;Ctx&gt;, value?: T): Promise&lt;any&gt; =&gt; {
         |                                                      ^
      86 |     const { console: cli } = this.tool;
      87 |     let result = null;
      88 | 

      at Object.raise (node_modules/@babel/parser/lib/index.js:3831:17)"><pre class="notranslate"><code class="notranslate">    SyntaxError: boost/packages/core/src/Executor.ts: Unexpected token, expected ";" (85:52)

      83 |    * Execute a task with the provided value.
      84 |    */
    &gt; 85 |   executeTask = async &lt;T&gt;(task: Task&lt;Ctx&gt;, value?: T): Promise&lt;any&gt; =&gt; {
         |                                                      ^
      86 |     const { console: cli } = this.tool;
      87 |     let result = null;
      88 | 

      at Object.raise (node_modules/@babel/parser/lib/index.js:3831:17)
</code></pre></div>
<p dir="auto">If you remove the <code class="notranslate">&lt;T&gt;</code> generics or the <code class="notranslate">async/await</code>, the parser works.</p>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  executeTask = async &lt;T&gt;(task: Task&lt;Ctx&gt;, value?: T): Promise&lt;any&gt; =&gt; {
    const { console: cli } = this.tool;
    let result = null;

    cli.emit('task', [task, value, this.parallel]);

    try {
      result = await task.run(this.context, value);

      if (task.isSkipped()) {
        cli.emit('task.skip', [task, value, this.parallel]);
      } else {
        cli.emit('task.pass', [task, result, this.parallel]);
      }
    } catch (error) {
      cli.emit('task.fail', [task, error, this.parallel]);

      throw error;
    }

    return result;
  };"><pre class="notranslate">  <span class="pl-en">executeTask</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">task</span>: <span class="pl-smi">Task</span><span class="pl-kos">&lt;</span><span class="pl-smi">Ctx</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-s1">value</span>?: <span class="pl-smi">T</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">any</span><span class="pl-kos">&gt;</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-c1">console</span>: <span class="pl-s1">cli</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">tool</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span><span class="pl-kos">;</span>

    <span class="pl-s1">cli</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s">'task'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">task</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">parallel</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-k">try</span> <span class="pl-kos">{</span>
      <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">task</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">context</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

      <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">task</span><span class="pl-kos">.</span><span class="pl-en">isSkipped</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-s1">cli</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s">'task.skip'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">task</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">parallel</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
        <span class="pl-s1">cli</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s">'task.pass'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">task</span><span class="pl-kos">,</span> <span class="pl-s1">result</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">parallel</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-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-s1">cli</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s">'task.fail'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">task</span><span class="pl-kos">,</span> <span class="pl-s1">error</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">parallel</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

      <span class="pl-k">throw</span> <span class="pl-s1">error</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-k">return</span> <span class="pl-s1">result</span><span class="pl-kos">;</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">It parses. This worked in the previous version.</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
  &quot;babelrc&quot;: false,
  &quot;comments&quot;: false,
  &quot;plugins&quot;: [
    &quot;@babel/plugin-proposal-class-properties&quot;,
    &quot;@babel/plugin-proposal-export-default-from&quot;,
    &quot;@babel/plugin-proposal-nullish-coalescing-operator&quot;,
    &quot;@babel/plugin-proposal-optional-catch-binding&quot;,
    &quot;@babel/plugin-proposal-optional-chaining&quot;,
    &quot;@babel/plugin-syntax-dynamic-import&quot;,
    [
      &quot;babel-plugin-transform-dev&quot;,
      {
        &quot;evaluate&quot;: false
      }
    ]
  ],
  &quot;presets&quot;: [
    [
      &quot;@babel/preset-env&quot;,
      {
        &quot;modules&quot;: &quot;commonjs&quot;,
        &quot;shippedProposals&quot;: true,
        &quot;targets&quot;: {
          &quot;node&quot;: &quot;10.9.0&quot;
        },
        &quot;useBuiltIns&quot;: false
      }
    ],
    &quot;@babel/preset-typescript&quot;
  ]
};"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-s">"babelrc"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
  <span class="pl-s">"comments"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
  <span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
    <span class="pl-s">"@babel/plugin-proposal-class-properties"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/plugin-proposal-export-default-from"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/plugin-proposal-nullish-coalescing-operator"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/plugin-proposal-optional-catch-binding"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/plugin-proposal-optional-chaining"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/plugin-syntax-dynamic-import"</span><span class="pl-kos">,</span>
    <span class="pl-kos">[</span>
      <span class="pl-s">"babel-plugin-transform-dev"</span><span class="pl-kos">,</span>
      <span class="pl-kos">{</span>
        <span class="pl-s">"evaluate"</span>: <span class="pl-c1">false</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">]</span>
  <span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span>
    <span class="pl-kos">[</span>
      <span class="pl-s">"@babel/preset-env"</span><span class="pl-kos">,</span>
      <span class="pl-kos">{</span>
        <span class="pl-s">"modules"</span>: <span class="pl-s">"commonjs"</span><span class="pl-kos">,</span>
        <span class="pl-s">"shippedProposals"</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-s">"targets"</span>: <span class="pl-kos">{</span>
          <span class="pl-s">"node"</span>: <span class="pl-s">"10.9.0"</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-s">"useBuiltIns"</span>: <span class="pl-c1">false</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/preset-typescript"</span>
  <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): 7.3.3</li>
<li>Node/npm version: 10.14.1/6.5.0</li>
<li>OS: OSX 10.14.3</li>
<li>Monorepo: yes</li>
<li>How you are using Babel: cli</li>
</ul>