@volar/language-core 1.4.0-alpha.1 → 1.4.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/index.js +1 -0
- package/out/languageContext.d.ts +3 -1
- package/out/languageContext.js +3 -2
- package/out/sourceMaps.js +1 -0
- package/out/types.d.ts +0 -1
- package/out/types.js +1 -0
- package/out/virtualFiles.d.ts +2 -1
- package/out/virtualFiles.js +1 -0
- package/package.json +3 -3
package/out/index.js
CHANGED
package/out/languageContext.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
2
2
|
import { LanguageModule, LanguageServiceHost } from './types';
|
|
3
3
|
export type LanguageContext = ReturnType<typeof createLanguageContext>;
|
|
4
|
-
export declare function createLanguageContext(host: LanguageServiceHost,
|
|
4
|
+
export declare function createLanguageContext(host: LanguageServiceHost, modules: {
|
|
5
|
+
typescript?: typeof import('typescript/lib/tsserverlibrary');
|
|
6
|
+
}, languageModules: LanguageModule[]): {
|
|
5
7
|
typescript: {
|
|
6
8
|
languageServiceHost: ts.LanguageServiceHost;
|
|
7
9
|
};
|
package/out/languageContext.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
3
|
exports.createLanguageContext = void 0;
|
|
3
4
|
const path_1 = require("path");
|
|
4
5
|
const virtualFiles_1 = require("./virtualFiles");
|
|
5
6
|
const types_1 = require("./types");
|
|
6
|
-
function createLanguageContext(host, languageModules) {
|
|
7
|
+
function createLanguageContext(host, modules, languageModules) {
|
|
7
8
|
for (const languageModule of languageModules.reverse()) {
|
|
8
9
|
if (languageModule.proxyLanguageServiceHost) {
|
|
9
10
|
const proxyApis = languageModule.proxyLanguageServiceHost(host);
|
|
@@ -20,7 +21,7 @@ function createLanguageContext(host, languageModules) {
|
|
|
20
21
|
let lastProjectVersion;
|
|
21
22
|
let tsProjectVersion = 0;
|
|
22
23
|
const virtualFiles = (0, virtualFiles_1.createVirtualFiles)(languageModules);
|
|
23
|
-
const ts =
|
|
24
|
+
const ts = modules.typescript;
|
|
24
25
|
const scriptSnapshots = new Map();
|
|
25
26
|
const sourceTsFileVersions = new Map();
|
|
26
27
|
const sourceFileVersions = new Map();
|
package/out/sourceMaps.js
CHANGED
package/out/types.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ export interface LanguageModule<T extends VirtualFile = VirtualFile> {
|
|
|
59
59
|
proxyLanguageServiceHost?(host: LanguageServiceHost): Partial<LanguageServiceHost>;
|
|
60
60
|
}
|
|
61
61
|
export interface LanguageServiceHost extends ts.LanguageServiceHost {
|
|
62
|
-
getTypeScriptModule?(): typeof import('typescript/lib/tsserverlibrary');
|
|
63
62
|
getScriptLanguageId?(fileName: string): string | undefined;
|
|
64
63
|
isTsc?: boolean;
|
|
65
64
|
}
|
package/out/types.js
CHANGED
package/out/virtualFiles.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SourceMap } from '@volar/source-map';
|
|
2
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
2
3
|
import { MirrorMap } from './sourceMaps';
|
|
3
|
-
import type {
|
|
4
|
+
import type { FileRangeCapabilities, LanguageModule, VirtualFile } from './types';
|
|
4
5
|
export type VirtualFiles = ReturnType<typeof createVirtualFiles>;
|
|
5
6
|
export interface Source {
|
|
6
7
|
fileName: string;
|
package/out/virtualFiles.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-core",
|
|
3
|
-
"version": "1.4.0-alpha.
|
|
3
|
+
"version": "1.4.0-alpha.11",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"directory": "packages/language-core"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/source-map": "1.4.0-alpha.
|
|
16
|
+
"@volar/source-map": "1.4.0-alpha.11"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "56ab336278ed7f06851c3dfe1bbcd5b9a3112846"
|
|
19
19
|
}
|