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

Function aggregateErrors

packages/internal-test-utils/ReactInternalTestUtils.js:123–129  ·  view source on GitHub ↗
(errors: Array<mixed>)

Source from the content-addressed store, hash-verified

121}
122
123function aggregateErrors(errors: Array<mixed>): mixed {
124 if (errors.length > 1 && typeof AggregateError === 'function') {
125 // eslint-disable-next-line no-undef
126 return new AggregateError(errors);
127 }
128 return errors[0];
129}
130
131export async function waitForThrow(expectedError: mixed): mixed {
132 assertYieldsWereCleared(waitForThrow);

Callers 1

waitForThrowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected