<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async function scanPorts() {
    let result = await Promise.all(devices.map((device) =&gt; {
        return getPortStatus(device)
    }));
    return result.indexOf(&quot;open&quot;);
                          ^
}"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">scanPorts</span><span class="pl-kos">(</span><span class="pl-kos">)</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-k">await</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-s1">devices</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">device</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-en">getPortStatus</span><span class="pl-kos">(</span><span class="pl-s1">device</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">return</span> <span class="pl-s1">result</span><span class="pl-kos">.</span><span class="pl-en">indexOf</span><span class="pl-kos">(</span><span class="pl-s">"open"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
                          <span class="pl-c1">^</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Error</strong></p>
<p dir="auto"><code class="notranslate">error TS2345: Argument of type 'string' is not assignable to parameter of type 'Promise&lt;{}&gt;'.</code></p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.9</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Promise.all([Promise.resolve('')]);  // has type Promise&lt;Promise&lt;string&gt;[]&gt;"><pre class="notranslate"><span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>  <span class="pl-c">// has type Promise&lt;Promise&lt;string&gt;[]&gt;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
The expression has type <code class="notranslate">Promise&lt;string[]&gt;</code> as in 1.8.7<br>
<strong>Actual behavior:</strong><br>
The expression has type <code class="notranslate">Promise&lt;Promise&lt;string&gt;[]&gt;</code></p>