volar-service-typescript 0.0.5 → 0.0.6
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.d.ts +1 -0
- package/out/index.js +2 -2
- package/out/protocol.const.js +5 -5
- package/out/utils/typeConverters.d.ts +1 -1
- package/out/utils/typeConverters.js +1 -1
- package/package.json +3 -3
package/out/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { IDtsHost } from '@volar/typescript';
|
|
|
5
5
|
export * from '@volar/typescript';
|
|
6
6
|
export interface Provide {
|
|
7
7
|
'typescript/typescript': () => typeof import('typescript/lib/tsserverlibrary');
|
|
8
|
+
'typescript/sys': () => ts.System;
|
|
8
9
|
'typescript/sourceFile': (document: TextDocument) => ts.SourceFile | undefined;
|
|
9
10
|
'typescript/textDocument': (uri: string) => TextDocument | undefined;
|
|
10
11
|
'typescript/languageService': (document?: TextDocument) => ts.LanguageService;
|
package/out/index.js
CHANGED
|
@@ -59,7 +59,6 @@ const typescript_1 = require("@volar/typescript");
|
|
|
59
59
|
const tsFaster = __importStar(require("typescript-auto-import-cache"));
|
|
60
60
|
__exportStar(require("@volar/typescript"), exports);
|
|
61
61
|
;
|
|
62
|
-
let documentRegistry;
|
|
63
62
|
exports.default = (options) => (contextOrNull, modules) => {
|
|
64
63
|
const jsDocTriggerCharacter = '*';
|
|
65
64
|
const directiveCommentTriggerCharacter = '@';
|
|
@@ -85,7 +84,7 @@ exports.default = (options) => (contextOrNull, modules) => {
|
|
|
85
84
|
const ts = modules.typescript;
|
|
86
85
|
const sys = (0, typescript_1.createSys)(context, ts, context.env, options?.dtsHost);
|
|
87
86
|
const languageServiceHost = (0, typescript_1.createLanguageServiceHost)(context, ts, sys);
|
|
88
|
-
const created = tsFaster.createLanguageService(ts, sys, languageServiceHost, proxiedHost => ts.createLanguageService(proxiedHost,
|
|
87
|
+
const created = tsFaster.createLanguageService(ts, sys, languageServiceHost, proxiedHost => ts.createLanguageService(proxiedHost, (0, typescript_1.getDocumentRegistry)(ts, sys.useCaseSensitiveFileNames, context.host.getCurrentDirectory())));
|
|
89
88
|
const { languageService } = created;
|
|
90
89
|
if (created.setPreferences && context.env.getConfiguration) {
|
|
91
90
|
updatePreferences();
|
|
@@ -194,6 +193,7 @@ exports.default = (options) => (contextOrNull, modules) => {
|
|
|
194
193
|
},
|
|
195
194
|
provide: {
|
|
196
195
|
'typescript/typescript': () => ts,
|
|
196
|
+
'typescript/sys': () => sys,
|
|
197
197
|
'typescript/sourceFile': document => {
|
|
198
198
|
if ((0, shared_1.isTsDocument)(document)) {
|
|
199
199
|
const sourceFile = getSemanticServiceSourceFile(document.uri);
|
package/out/protocol.const.js
CHANGED
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.EventName = exports.DisplayPartKind = exports.KindModifiers = exports.DiagnosticCategory = exports.Kind = void 0;
|
|
8
8
|
class Kind {
|
|
9
9
|
}
|
|
10
|
-
exports.Kind = Kind;
|
|
11
10
|
Kind.alias = 'alias';
|
|
12
11
|
Kind.callSignature = 'call';
|
|
13
12
|
Kind.class = 'class';
|
|
@@ -38,15 +37,15 @@ Kind.warning = 'warning';
|
|
|
38
37
|
Kind.string = 'string';
|
|
39
38
|
Kind.parameter = 'parameter';
|
|
40
39
|
Kind.typeParameter = 'type parameter';
|
|
40
|
+
exports.Kind = Kind;
|
|
41
41
|
class DiagnosticCategory {
|
|
42
42
|
}
|
|
43
|
-
exports.DiagnosticCategory = DiagnosticCategory;
|
|
44
43
|
DiagnosticCategory.error = 'error';
|
|
45
44
|
DiagnosticCategory.warning = 'warning';
|
|
46
45
|
DiagnosticCategory.suggestion = 'suggestion';
|
|
46
|
+
exports.DiagnosticCategory = DiagnosticCategory;
|
|
47
47
|
class KindModifiers {
|
|
48
48
|
}
|
|
49
|
-
exports.KindModifiers = KindModifiers;
|
|
50
49
|
KindModifiers.optional = 'optional';
|
|
51
50
|
KindModifiers.deprecated = 'deprecated';
|
|
52
51
|
KindModifiers.color = 'color';
|
|
@@ -64,15 +63,16 @@ KindModifiers.fileExtensionKindModifiers = [
|
|
|
64
63
|
KindModifiers.jsxFile,
|
|
65
64
|
KindModifiers.jsonFile,
|
|
66
65
|
];
|
|
66
|
+
exports.KindModifiers = KindModifiers;
|
|
67
67
|
class DisplayPartKind {
|
|
68
68
|
}
|
|
69
|
-
exports.DisplayPartKind = DisplayPartKind;
|
|
70
69
|
DisplayPartKind.functionName = 'functionName';
|
|
71
70
|
DisplayPartKind.methodName = 'methodName';
|
|
72
71
|
DisplayPartKind.parameterName = 'parameterName';
|
|
73
72
|
DisplayPartKind.propertyName = 'propertyName';
|
|
74
73
|
DisplayPartKind.punctuation = 'punctuation';
|
|
75
74
|
DisplayPartKind.text = 'text';
|
|
75
|
+
exports.DisplayPartKind = DisplayPartKind;
|
|
76
76
|
var EventName;
|
|
77
77
|
(function (EventName) {
|
|
78
78
|
EventName["syntaxDiag"] = "syntaxDiag";
|
|
@@ -88,5 +88,5 @@ var EventName;
|
|
|
88
88
|
EventName["surveyReady"] = "surveyReady";
|
|
89
89
|
EventName["projectLoadingStart"] = "projectLoadingStart";
|
|
90
90
|
EventName["projectLoadingFinish"] = "projectLoadingFinish";
|
|
91
|
-
})(EventName
|
|
91
|
+
})(EventName = exports.EventName || (exports.EventName = {}));
|
|
92
92
|
//# sourceMappingURL=protocol.const.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
2
2
|
export declare namespace SymbolKind {
|
|
3
|
-
function fromProtocolScriptElementKind(kind: ts.ScriptElementKind): 2 | 5 |
|
|
3
|
+
function fromProtocolScriptElementKind(kind: ts.ScriptElementKind): 2 | 5 | 10 | 22 | 11 | 6 | 7 | 13 | 12 | 9 | 26 | 15;
|
|
4
4
|
}
|
|
@@ -59,5 +59,5 @@ var SymbolKind;
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
SymbolKind.fromProtocolScriptElementKind = fromProtocolScriptElementKind;
|
|
62
|
-
})(SymbolKind
|
|
62
|
+
})(SymbolKind = exports.SymbolKind || (exports.SymbolKind = {}));
|
|
63
63
|
//# sourceMappingURL=typeConverters.js.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.6",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/semver": "^7.3.13",
|
|
17
|
-
"@volar/typescript": "1.7.
|
|
17
|
+
"@volar/typescript": "1.7.1"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"semver": "^7.3.8",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@volar/typescript": "*"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a4ee5d50ec7d4c37c7b24e019ee0ee2d701bb8bb"
|
|
30
30
|
}
|