Home / Function/ astro2tsx() — astro Function Reference

astro2tsx() — astro Function Reference

Architecture documentation for the astro2tsx() function in astro2tsx.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169["astro2tsx()"]
  f004a067_f0ae_35cb_fc32_ccf4d7476223["astro2tsx.ts"]
  3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169 -->|defined in| f004a067_f0ae_35cb_fc32_ccf4d7476223
  113ec72f_0497_ec7d_997c_ec2ef65c0af8["safeConvertToTSX()"]
  3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169 -->|calls| 113ec72f_0497_ec7d_997c_ec2ef65c0af8
  00848da5_4f63_d1d3_21f7_67bc828a4fce["getVirtualCodeTSX()"]
  3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169 -->|calls| 00848da5_4f63_d1d3_21f7_67bc828a4fce
  8c5a6977_b112_7226_8b86_40855f3ad574["getTSXRangesAsLSPRanges()"]
  3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169 -->|calls| 8c5a6977_b112_7226_8b86_40855f3ad574
  style 3b0a8762_2dc4_2dd5_6c0b_507bb1bd0169 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/language-tools/language-server/src/core/astro2tsx.ts lines 85–93

export function astro2tsx(input: string, fileName: string) {
	const tsx = safeConvertToTSX(input, { filename: fileName });

	return {
		virtualCode: getVirtualCodeTSX(input, tsx, fileName),
		diagnostics: tsx.diagnostics,
		ranges: getTSXRangesAsLSPRanges(tsx),
	};
}

Domain

Subdomains

Frequently Asked Questions

What does astro2tsx() do?
astro2tsx() is a function in the astro codebase, defined in packages/language-tools/language-server/src/core/astro2tsx.ts.
Where is astro2tsx() defined?
astro2tsx() is defined in packages/language-tools/language-server/src/core/astro2tsx.ts at line 85.
What does astro2tsx() call?
astro2tsx() calls 3 function(s): getTSXRangesAsLSPRanges, getVirtualCodeTSX, safeConvertToTSX.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free