compilerUtils.ts — astro Source File
Architecture documentation for compilerUtils.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 470b063f_455a_f07b_1eba_571bfd1041c5["compilerUtils.ts"] 40286c5f_532d_1bd5_70e5_3dbec8398413["compiler"] 470b063f_455a_f07b_1eba_571bfd1041c5 --> 40286c5f_532d_1bd5_70e5_3dbec8398413 6857b6b2_4d48_bfb0_0a0e_8e2e52fabb56["language-server"] 470b063f_455a_f07b_1eba_571bfd1041c5 --> 6857b6b2_4d48_bfb0_0a0e_8e2e52fabb56 style 470b063f_455a_f07b_1eba_571bfd1041c5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { AttributeNode, Point } from '@astrojs/compiler';
import { Position as LSPPosition } from '@volar/language-server';
/**
* Transform a Point from the Astro compiler to an LSP Position
*/
export function PointToPosition(point: Point) {
// Columns and lines are 0-based in LSP, but the compiler's Point are 1 based.
return LSPPosition.create(point.line - 1, point.column - 1);
}
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
export type AttributeNodeWithPosition = WithRequired<AttributeNode, 'position'>;
Domain
Subdomains
Functions
Dependencies
- compiler
- language-server
Source
Frequently Asked Questions
What does compilerUtils.ts do?
compilerUtils.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, CoreMiddleware subdomain.
What functions are defined in compilerUtils.ts?
compilerUtils.ts defines 1 function(s): PointToPosition.
What does compilerUtils.ts depend on?
compilerUtils.ts imports 2 module(s): compiler, language-server.
Where is compilerUtils.ts in the architecture?
compilerUtils.ts is located at packages/language-tools/language-server/src/core/compilerUtils.ts (domain: CoreAstro, subdomain: CoreMiddleware, directory: packages/language-tools/language-server/src/core).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free