raiseUnificationErrors() — react Function Reference
Architecture documentation for the raiseUnificationErrors() function in TypeErrors.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6d1b2d46_0ca2_05d3_a741_39438aeec04a["raiseUnificationErrors()"] 8086dd94_cb7f_b871_d873_325159c25b69["TypeErrors.ts"] 6d1b2d46_0ca2_05d3_a741_39438aeec04a -->|defined in| 8086dd94_cb7f_b871_d873_325159c25b69 17f69d0d_e4c0_8640_3524_a834e66c3fee["printUnificationError()"] 6d1b2d46_0ca2_05d3_a741_39438aeec04a -->|calls| 17f69d0d_e4c0_8640_3524_a834e66c3fee style 6d1b2d46_0ca2_05d3_a741_39438aeec04a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Flood/TypeErrors.ts lines 41–66
export function raiseUnificationErrors(
errs: null | Array<UnificationError>,
loc: SourceLocation,
): void {
if (errs != null) {
if (errs.length === 0) {
CompilerError.invariant(false, {
reason: 'Should not have array of zero errors',
loc,
});
} else if (errs.length === 1) {
CompilerError.throwInvalidJS({
reason: `Unable to unify types because ${printUnificationError(errs[0])}`,
loc,
});
} else {
const messages = errs
.map(err => `\t* ${printUnificationError(err)}`)
.join('\n');
CompilerError.throwInvalidJS({
reason: `Unable to unify types because:\n${messages}`,
loc,
});
}
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does raiseUnificationErrors() do?
raiseUnificationErrors() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Flood/TypeErrors.ts.
Where is raiseUnificationErrors() defined?
raiseUnificationErrors() is defined in compiler/packages/babel-plugin-react-compiler/src/Flood/TypeErrors.ts at line 41.
What does raiseUnificationErrors() call?
raiseUnificationErrors() calls 1 function(s): printUnificationError.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free