Property 'allSettled' does not exist on type 'PromiseConstructor'.ts(2339) : <p>I try to use <a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled" rel="noreferrer">Promise.allSettled</a> API with TypeScript. Code here:</p>

<p><code>server.test.ts</code>:</p>

<pre class="lang-js prettyprint-override"><code>it('should partial success if QPS &gt; 50', async () =&gt; {
  const requests: any[] = [];
  for (let i = 0; i &lt; 51; i++) {
    requests.push(rp('http://localhost:3000/place'));
  }
  await Promise.allSettled(requests);
  // ...
});
</code></pre>

<p>But TSC throws an error: </p>

<blockquote>
  <p>Property 'allSettled' does not exist on type 'PromiseConstructor'.ts(2339)</p>
</blockquote>

<p>I already added these values to <code>lib</code> option of <code>tsconfig.json</code>:</p>

<p><code>tsconfig.json</code>:</p>

<pre><code>{
  "compilerOptions": {
    /* Basic Options */
    "target": "ES2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
    "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
    "lib": [
      "ES2015",
      "ES2016",
      "ES2017",
      "ES2018",
      "ES2019",
      "ES2020",
      "ESNext"
    ] 
   // ...
}
</code></pre>

<p>TypeScript version: <code>"typescript": "^3.7.3"</code></p>

<p>So, how can I solve this? I know I can use an alternative module, but I am curious about working with TypeScript natively.</p>
