Answers for "Property 'allSettled' does not exist on type 'PromiseConstructor'"

0

Property 'allSettled' does not exist on type 'PromiseConstructor'

/* To get this running on Linux, I needed the latest typescript version: */

npm install -g typescript@latest

/* Then in your tsconfig you currently need the ES2020.Promise lib. */

{
  "compilerOptions": {
    "lib": [
      "ES2020.Promise",
    ]
  },
}

/* Usage: */ const results = await Promise.allSettled(BatchOfPromises);
Posted by: Guest on March-01-2021

Code answers related to "Property 'allSettled' does not exist on type 'PromiseConstructor'"

Browse Popular Code Answers by Language