The types for Promise.allSettled()
were only merged in January, and will apparently be released in TypeScript 3.8.
As an interim solution, you can declare a mock-ish type for the function yourself:
declare interface PromiseConstructor {
allSettled(promises: Array<Promise<any>>): Promise<Array<{status: 'fulfilled' | 'rejected', value?: any, reason?: any}>>;
}