/** @ts-ignore - TS 7 mismatch */ type FileExtensionInfo = import("typescript").FileExtensionInfo; /** * Describes a non-standard source language, such as Vue or Astro. * * If the language is supported via Volar, {@linkcode volarTypeScript} and * {@linkcode createVolarPlugins} must both be provided. */ interface CustomLanguage { /** Patterns that identify files written in this language. */ extensionPatterns: RegExp[]; /** Extra file extensions passed to the TypeScript compiler. */ tsFileExtensionInfos?: FileExtensionInfo[]; /** * Maps a source filename to the TypeScript filename used for declarations. * Required for custom file extensions. */ toTsFilename?: (id: string) => string; /** @ts-ignore - optional dep */ volarTypeScript?: typeof import("@volar/typescript"); /** @ts-ignore - optional dep */ createVolarPlugins?: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2]; } declare class LanguageContext { languages: CustomLanguage[]; patterns: RegExp[]; constructor(languages: CustomLanguage[]); isCustomLanguageFile(id: string): boolean; isUsingVolar(): boolean; getExtraFileExtensions(): FileExtensionInfo[] | undefined; toTsFilename(id: string): string; } export { LanguageContext as n, CustomLanguage as t };