@types/node package and had problems.This is mentioned in by @SimonSchick in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38401
I'm concerned causing incompatibilities due to name/signature conflicts of types.
Currently, @types/node at 12.12.7 does not have definitions for Promise.allSettled
Gotta wait for new libs, alternatively you can just write your own version by extending the definition of Promise until we get an official one :)
How long must we wait?
The promise extension (workaround) would be something like the following from SO?
declare interface PromiseConstructor {
allSettled(promises: Array<Promise<any>>): Promise<Array<{status: 'fulfilled' | 'rejected', value?: any, reason?: any}>>;
}
Also see: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promise.allsettled
Most helpful comment
Gotta wait for new libs, alternatively you can just write your own version by extending the definition of
Promiseuntil we get an official one :)