sourceLocationToRange() — react Function Reference
Architecture documentation for the sourceLocationToRange() function in range.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 497f93b4_2542_8bd2_bd98_b0f4095478c3["sourceLocationToRange()"] 8e72bb38_0446_40c5_e453_1f12111e8936["range.ts"] 497f93b4_2542_8bd2_bd98_b0f4095478c3 -->|defined in| 8e72bb38_0446_40c5_e453_1f12111e8936 c22d5a3d_3487_16b9_1aaa_bcb46a8280f5["mapCompilerEventToLSPEvent()"] c22d5a3d_3487_16b9_1aaa_bcb46a8280f5 -->|calls| 497f93b4_2542_8bd2_bd98_b0f4095478c3 style 497f93b4_2542_8bd2_bd98_b0f4095478c3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/react-forgive/server/src/utils/range.ts lines 35–42
export function sourceLocationToRange(
loc: t.SourceLocation,
): [Position, Position] {
return [
{line: loc.start.line - 1, character: loc.start.column},
{line: loc.end.line - 1, character: loc.end.column},
];
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does sourceLocationToRange() do?
sourceLocationToRange() is a function in the react codebase, defined in compiler/packages/react-forgive/server/src/utils/range.ts.
Where is sourceLocationToRange() defined?
sourceLocationToRange() is defined in compiler/packages/react-forgive/server/src/utils/range.ts at line 35.
What calls sourceLocationToRange()?
sourceLocationToRange() is called by 1 function(s): mapCompilerEventToLSPEvent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free