constructor() — astro Function Reference
Architecture documentation for the constructor() function in language.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 2e429449_b5ff_e4f3_f6d3_8d37d16517b9["constructor()"] 10cb8652_17ca_9a93_eb47_e7c594b2481f["AstroVirtualCode"] 2e429449_b5ff_e4f3_f6d3_8d37d16517b9 -->|defined in| 10cb8652_17ca_9a93_eb47_e7c594b2481f style 2e429449_b5ff_e4f3_f6d3_8d37d16517b9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/language-tools/ts-plugin/src/language.ts lines 48–73
constructor(
public fileName: string,
public snapshot: ts.IScriptSnapshot,
) {
this.mappings = [
{
sourceOffsets: [0],
generatedOffsets: [0],
lengths: [this.snapshot.getLength()],
data: {
verification: true,
completion: true,
semantic: true,
navigation: true,
structure: true,
format: false,
},
},
];
this.embeddedCodes = [];
const tsx = astro2tsx(this.snapshot.getText(0, this.snapshot.getLength()), this.fileName);
this.embeddedCodes.push(tsx.virtualFile);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does constructor() do?
constructor() is a function in the astro codebase, defined in packages/language-tools/ts-plugin/src/language.ts.
Where is constructor() defined?
constructor() is defined in packages/language-tools/ts-plugin/src/language.ts at line 48.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free