MCPcopy
hub / github.com/facebook/react / aggregateErrors

Function aggregateErrors

packages/internal-test-utils/internalAct.js:35–41  ·  view source on GitHub ↗
(errors: Array<mixed>)

Source from the content-addressed store, hash-verified

33}
34
35function 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
43export async function act<T>(scope: () => Thenable<T>): Thenable<T> {
44 if (Scheduler.unstable_flushUntilNextPaint === undefined) {

Callers 2

actFunction · 0.70
serverActFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected