volar-service-typescript 0.0.39 → 0.0.40
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/lib/plugins/syntactic.js
CHANGED
|
@@ -4,12 +4,12 @@ exports.create = exports.getLanguageServiceByDocument = void 0;
|
|
|
4
4
|
const getFormatCodeSettings_1 = require("../configs/getFormatCodeSettings");
|
|
5
5
|
const shared_1 = require("../shared");
|
|
6
6
|
const lspConverters_1 = require("../utils/lspConverters");
|
|
7
|
-
const
|
|
7
|
+
const syntaxOnlyService_1 = require("../syntaxOnlyService");
|
|
8
8
|
const snapshots = new WeakMap();
|
|
9
9
|
let created;
|
|
10
10
|
function getLanguageServiceByDocument(ts, document) {
|
|
11
11
|
if (!created) {
|
|
12
|
-
created = (0,
|
|
12
|
+
created = (0, syntaxOnlyService_1.createSyntaxOnlyService)(ts, true);
|
|
13
13
|
}
|
|
14
14
|
let cache = snapshots.get(document);
|
|
15
15
|
if (!cache || cache[0] !== document.version) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as ts from 'typescript';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function createSyntaxOnlyService(ts: typeof import('typescript'), syntaxOnly: boolean): {
|
|
3
3
|
languageService: ts.LanguageService;
|
|
4
4
|
updateFile: (fileName: string, snapshot: ts.IScriptSnapshot, scriptKind: ts.ScriptKind) => void;
|
|
5
5
|
};
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=syntaxOnlyService.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.createSyntaxOnlyService = void 0;
|
|
4
|
+
function createSyntaxOnlyService(ts, syntaxOnly) {
|
|
5
5
|
let currentProjectVersion = -1;
|
|
6
6
|
let fileNames = [];
|
|
7
7
|
const scriptInfos = new Map();
|
|
@@ -9,7 +9,8 @@ function createLanguageService(ts, syntaxOnly) {
|
|
|
9
9
|
getProjectVersion: () => currentProjectVersion.toString(),
|
|
10
10
|
getScriptFileNames: () => fileNames,
|
|
11
11
|
getScriptVersion: () => currentProjectVersion.toString(),
|
|
12
|
-
getScriptSnapshot: fileName => scriptInfos.get(fileName)
|
|
12
|
+
getScriptSnapshot: fileName => scriptInfos.get(fileName).snapshot,
|
|
13
|
+
getScriptKind: fileName => scriptInfos.get(fileName).kind,
|
|
13
14
|
getCompilationSettings: () => ({}),
|
|
14
15
|
getCurrentDirectory: () => '',
|
|
15
16
|
getDefaultLibFileName: () => '',
|
|
@@ -40,5 +41,5 @@ function createLanguageService(ts, syntaxOnly) {
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
exports.
|
|
44
|
-
//# sourceMappingURL=
|
|
44
|
+
exports.createSyntaxOnlyService = createSyntaxOnlyService;
|
|
45
|
+
//# sourceMappingURL=syntaxOnlyService.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as ts from 'typescript';
|
|
2
2
|
export declare namespace SymbolKind {
|
|
3
|
-
function fromProtocolScriptElementKind(kind: ts.ScriptElementKind): 2 | 5 |
|
|
3
|
+
function fromProtocolScriptElementKind(kind: ts.ScriptElementKind): 2 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 15 | 22 | 26;
|
|
4
4
|
}
|
|
5
5
|
//# sourceMappingURL=typeConverters.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volar-service-typescript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"description": "Integrate TypeScript into Volar",
|
|
5
5
|
"homepage": "https://github.com/volarjs/services/tree/master/packages/typescript",
|
|
6
6
|
"bugs": "https://github.com/volarjs/services/issues",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"optional": true
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "75c5472887e274929fa4c0c2a54f9e97e4fe30a0"
|
|
46
46
|
}
|