27 lines
1.2 KiB
Plaintext
27 lines
1.2 KiB
Plaintext
import type { DiagnosticMessage } from '@astrojs/compiler/types';
|
|
import { FileCapabilities, FileKind, type Language, type VirtualFile } from '@volar/language-core';
|
|
import type ts from 'typescript/lib/tsserverlibrary';
|
|
import type { HTMLDocument } from 'vscode-html-languageservice';
|
|
import { type AstroInstall } from '../utils.js';
|
|
import { AstroMetadata } from './parseAstro';
|
|
export declare function getLanguageModule(astroInstall: AstroInstall | undefined, ts: typeof import('typescript/lib/tsserverlibrary.js')): Language<AstroFile>;
|
|
export declare class AstroFile implements VirtualFile {
|
|
sourceFileName: string;
|
|
snapshot: ts.IScriptSnapshot;
|
|
private readonly ts;
|
|
kind: FileKind;
|
|
capabilities: FileCapabilities;
|
|
fileName: string;
|
|
mappings: VirtualFile['mappings'];
|
|
embeddedFiles: VirtualFile['embeddedFiles'];
|
|
astroMeta: AstroMetadata;
|
|
compilerDiagnostics: DiagnosticMessage[];
|
|
htmlDocument: HTMLDocument;
|
|
scriptFiles: string[];
|
|
codegenStacks: never[];
|
|
constructor(sourceFileName: string, snapshot: ts.IScriptSnapshot, ts: typeof import('typescript/lib/tsserverlibrary.js'));
|
|
get hasCompilationErrors(): boolean;
|
|
update(newSnapshot: ts.IScriptSnapshot): void;
|
|
onSnapshotUpdated(): void;
|
|
}
|