(errors: Array<mixed>)
| 33 | } |
| 34 | |
| 35 | function aggregateErrors(errors: Array<mixed>): mixed { |
| 36 | if (errors.length > 1 && typeof AggregateError === 'function') { |
| 37 | // eslint-disable-next-line no-undef |
| 38 | return new AggregateError(errors); |
| 39 | } |
| 40 | return errors[0]; |
| 41 | } |
| 42 | |
| 43 | export async function act<T>(scope: () => Thenable<T>): Thenable<T> { |
| 44 | if (Scheduler.unstable_flushUntilNextPaint === undefined) { |