babelLocationToRange() — react Function Reference
Architecture documentation for the babelLocationToRange() function in compat.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3e51182d_0019_646a_282c_ef6a018befe9["babelLocationToRange()"] ac1db11e_9998_2099_ee28_376258253927["compat.ts"] 3e51182d_0019_646a_282c_ef6a018befe9 -->|defined in| ac1db11e_9998_2099_ee28_376258253927 style 3e51182d_0019_646a_282c_ef6a018befe9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/react-forgive/server/src/compiler/compat.ts lines 11–19
export function babelLocationToRange(loc: SourceLocation): Range | null {
if (typeof loc === 'symbol') {
return null;
}
return {
start: {line: loc.start.line - 1, character: loc.start.column},
end: {line: loc.end.line - 1, character: loc.end.column},
};
}
Domain
Subdomains
Source
Frequently Asked Questions
What does babelLocationToRange() do?
babelLocationToRange() is a function in the react codebase, defined in compiler/packages/react-forgive/server/src/compiler/compat.ts.
Where is babelLocationToRange() defined?
babelLocationToRange() is defined in compiler/packages/react-forgive/server/src/compiler/compat.ts at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free