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
  acdd7f41_dc47_4c7c_d901_ea0356cddf50["astro2tsx()"]
  b348b824_2985_3524_9b17_fd7579f42c1f["astro2tsx.ts"]
  acdd7f41_dc47_4c7c_d901_ea0356cddf50 -->|defined in| b348b824_2985_3524_9b17_fd7579f42c1f
  ec4054c5_ef8e_0bdd_5f55_3c3469ddd9ac["safeConvertToTSX()"]
  acdd7f41_dc47_4c7c_d901_ea0356cddf50 -->|calls| ec4054c5_ef8e_0bdd_5f55_3c3469ddd9ac
  840c0167_4b40_3f42_1c05_3306fbda825b["getVirtualFileTSX()"]
  acdd7f41_dc47_4c7c_d901_ea0356cddf50 -->|calls| 840c0167_4b40_3f42_1c05_3306fbda825b
  style acdd7f41_dc47_4c7c_d901_ea0356cddf50 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/language-tools/ts-plugin/src/astro2tsx.ts lines 49–56

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

	return {
		virtualFile: getVirtualFileTSX(input, tsx, fileName),
		diagnostics: tsx.diagnostics,
	};
}

Domain

Subdomains

Frequently Asked Questions

What does astro2tsx() do?
astro2tsx() is a function in the astro codebase, defined in packages/language-tools/ts-plugin/src/astro2tsx.ts.
Where is astro2tsx() defined?
astro2tsx() is defined in packages/language-tools/ts-plugin/src/astro2tsx.ts at line 49.
What does astro2tsx() call?
astro2tsx() calls 2 function(s): getVirtualFileTSX, safeConvertToTSX.

Analyze Your Own Codebase

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

Try Supermodel Free