getTSXRangesAsLSPRanges() — astro Function Reference
Architecture documentation for the getTSXRangesAsLSPRanges() function in astro2tsx.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 8c5a6977_b112_7226_8b86_40855f3ad574["getTSXRangesAsLSPRanges()"] f004a067_f0ae_35cb_fc32_ccf4d7476223["astro2tsx.ts"] 8c5a6977_b112_7226_8b86_40855f3ad574 -->|defined in| f004a067_f0ae_35cb_fc32_ccf4d7476223 3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169["astro2tsx()"] 3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169 -->|calls| 8c5a6977_b112_7226_8b86_40855f3ad574 style 8c5a6977_b112_7226_8b86_40855f3ad574 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/language-tools/language-server/src/core/astro2tsx.ts lines 68–83
export function getTSXRangesAsLSPRanges(tsx: TSXResult): LSPTSXRanges {
const textDocument = TextDocument.create('', 'typescriptreact', 0, tsx.code);
return {
frontmatter: Range.create(
textDocument.positionAt(tsx.metaRanges.frontmatter.start),
textDocument.positionAt(tsx.metaRanges.frontmatter.end),
),
body: Range.create(
textDocument.positionAt(tsx.metaRanges.body.start),
textDocument.positionAt(tsx.metaRanges.body.end),
),
scripts: tsx.metaRanges.scripts ?? [],
styles: tsx.metaRanges.styles ?? [],
};
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getTSXRangesAsLSPRanges() do?
getTSXRangesAsLSPRanges() is a function in the astro codebase, defined in packages/language-tools/language-server/src/core/astro2tsx.ts.
Where is getTSXRangesAsLSPRanges() defined?
getTSXRangesAsLSPRanges() is defined in packages/language-tools/language-server/src/core/astro2tsx.ts at line 68.
What calls getTSXRangesAsLSPRanges()?
getTSXRangesAsLSPRanges() is called by 1 function(s): astro2tsx.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free