数通智联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.6 KiB

2 years ago
import { SourceMap } from '@volar/source-map';
import type * as ts from 'typescript/lib/tsserverlibrary';
import { MirrorMap } from './sourceMaps';
2 years ago
import type { FileRangeCapabilities, Language, VirtualFile } from './types';
2 years ago
export type VirtualFiles = ReturnType<typeof createVirtualFiles>;
export interface Source {
fileName: string;
2 years ago
languageId: string | undefined;
2 years ago
snapshot: ts.IScriptSnapshot;
root: VirtualFile;
2 years ago
language: Language;
2 years ago
}
2 years ago
export declare function createVirtualFiles(languages: Language[]): {
2 years ago
allSources(): Source[];
updateSource(fileName: string, snapshot: ts.IScriptSnapshot, languageId: string | undefined): VirtualFile | undefined;
deleteSource(fileName: string): void;
getSource(fileName: string): Source | undefined;
hasSource: (fileName: string) => boolean;
getMirrorMap: (file: VirtualFile) => MirrorMap | undefined;
2 years ago
getMaps: (virtualFile: VirtualFile) => Map<string, [ts.IScriptSnapshot, SourceMap<FileRangeCapabilities>]>;
2 years ago
hasVirtualFile(fileName: string): boolean;
getVirtualFile(fileName: string): readonly [VirtualFile, Source] | readonly [undefined, undefined];
};
2 years ago
export declare function updateVirtualFileMaps(virtualFile: VirtualFile, getSourceSnapshot: (source: string | undefined) => [string, ts.IScriptSnapshot] | undefined, map?: Map<string, [ts.IScriptSnapshot, SourceMap<FileRangeCapabilities>]>): Map<string, [ts.IScriptSnapshot, SourceMap<FileRangeCapabilities>]>;
2 years ago
export declare function forEachEmbeddedFile(file: VirtualFile, cb: (embedded: VirtualFile) => void): void;
2 years ago
//# sourceMappingURL=virtualFiles.d.ts.map