(promises: Promise<any>[])
| 172 | * By using this race function instead, we can ignore those (the v8 JIT will easily optimize this out in production) |
| 173 | */ |
| 174 | export function race(promises: Promise<any>[]): Promise<any> { |
| 175 | const addMisbehavingPromise: <T>(p: Promise<T>) => Promise<T> = (global as any).addMisbehavingPromise; |
| 176 | return addMisbehavingPromise ? addMisbehavingPromise(Promise.race(promises)) : Promise.race(promises); |
| 177 | } |
no test coverage detected