@volar/language-server 2.0.3 → 2.1.0
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/browser.d.ts +4 -3
- package/browser.js +25 -68
- package/lib/project/inferredCompilerOptions.js +5 -7
- package/lib/project/simpleProject.d.ts +1 -1
- package/lib/project/simpleProject.js +2 -3
- package/lib/project/simpleProjectProvider.d.ts +4 -5
- package/lib/project/simpleProjectProvider.js +46 -42
- package/lib/project/typescriptProject.d.ts +1 -1
- package/lib/project/typescriptProject.js +9 -14
- package/lib/project/typescriptProjectProvider.d.ts +2 -1
- package/lib/project/typescriptProjectProvider.js +163 -172
- package/lib/register/registerEditorFeatures.d.ts +2 -2
- package/lib/register/registerEditorFeatures.js +6 -5
- package/lib/register/registerLanguageFeatures.d.ts +2 -3
- package/lib/register/registerLanguageFeatures.js +4 -29
- package/lib/server.d.ts +5 -12
- package/lib/server.js +63 -71
- package/lib/serverCapabilities.d.ts +3 -0
- package/lib/serverCapabilities.js +91 -0
- package/lib/types.d.ts +2 -34
- package/lib/uri.d.ts +2 -0
- package/lib/uri.js +28 -0
- package/node.d.ts +4 -5
- package/node.js +35 -53
- package/package.json +6 -6
- package/lib/workspaceFolderManager.d.ts +0 -13
- package/lib/workspaceFolderManager.js +0 -39
package/browser.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export declare function createServer(connection: vscode.Connection): {
|
|
|
12
12
|
shutdown: () => void;
|
|
13
13
|
readonly projects: import("./index").ServerProjectProvider;
|
|
14
14
|
readonly env: import("./index").ServerRuntimeEnvironment;
|
|
15
|
-
readonly modules: {
|
|
16
|
-
typescript: typeof import("typescript") | undefined;
|
|
17
|
-
};
|
|
18
15
|
};
|
|
16
|
+
export declare function loadTsdkByUrl(tsdkUrl: string, locale: string | undefined): Promise<{
|
|
17
|
+
typescript: typeof import("typescript");
|
|
18
|
+
diagnosticMessages: import("typescript").MapLike<string> | undefined;
|
|
19
|
+
}>;
|
package/browser.js
CHANGED
|
@@ -14,10 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createServer = exports.createConnection = void 0;
|
|
17
|
+
exports.loadTsdkByUrl = exports.createServer = exports.createConnection = void 0;
|
|
18
18
|
const language_service_1 = require("@volar/language-service");
|
|
19
19
|
const vscode = require("vscode-languageserver/browser");
|
|
20
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
21
20
|
const http_1 = require("./lib/schemaRequestHandlers/http");
|
|
22
21
|
const server_1 = require("./lib/server");
|
|
23
22
|
const protocol_1 = require("./protocol");
|
|
@@ -34,49 +33,8 @@ function createConnection() {
|
|
|
34
33
|
exports.createConnection = createConnection;
|
|
35
34
|
function createServer(connection) {
|
|
36
35
|
return (0, server_1.createServerBase)(connection, () => ({
|
|
37
|
-
uriToFileName,
|
|
38
|
-
fileNameToUri,
|
|
39
|
-
console: connection.console,
|
|
40
|
-
timer: {
|
|
41
|
-
setImmediate(callback, ...args) {
|
|
42
|
-
const handle = setTimeout(callback, 0, ...args);
|
|
43
|
-
return { dispose: () => clearTimeout(handle) };
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
async loadTypeScript(options) {
|
|
47
|
-
const tsdkUrl = options.typescript && 'tsdkUrl' in options.typescript
|
|
48
|
-
? options.typescript.tsdkUrl
|
|
49
|
-
: undefined;
|
|
50
|
-
if (!tsdkUrl) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const _module = globalThis.module;
|
|
54
|
-
globalThis.module = { exports: {} };
|
|
55
|
-
await import(`${tsdkUrl}/typescript.js`);
|
|
56
|
-
const ts = globalThis.module.exports;
|
|
57
|
-
globalThis.module = _module;
|
|
58
|
-
return ts;
|
|
59
|
-
},
|
|
60
|
-
async loadTypeScriptLocalized(options, locale) {
|
|
61
|
-
const tsdkUrl = options.typescript && 'tsdkUrl' in options.typescript
|
|
62
|
-
? options.typescript.tsdkUrl
|
|
63
|
-
: undefined;
|
|
64
|
-
if (!tsdkUrl) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
try {
|
|
68
|
-
const json = await (0, http_1.default)(`${tsdkUrl}/${locale}/diagnosticMessages.generated.json`);
|
|
69
|
-
if (json) {
|
|
70
|
-
return JSON.parse(json);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch { }
|
|
74
|
-
},
|
|
75
36
|
fs: {
|
|
76
37
|
async stat(uri) {
|
|
77
|
-
if (uri.startsWith('__invalid__:')) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
38
|
if (uri.startsWith('http://') || uri.startsWith('https://')) { // perf
|
|
81
39
|
const text = await this.readFile(uri);
|
|
82
40
|
if (text !== undefined) {
|
|
@@ -92,18 +50,12 @@ function createServer(connection) {
|
|
|
92
50
|
return await connection.sendRequest(protocol_1.FsStatRequest.type, uri);
|
|
93
51
|
},
|
|
94
52
|
async readFile(uri) {
|
|
95
|
-
if (uri.startsWith('__invalid__:')) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
53
|
if (uri.startsWith('http://') || uri.startsWith('https://')) { // perf
|
|
99
54
|
return await (0, http_1.default)(uri);
|
|
100
55
|
}
|
|
101
56
|
return await connection.sendRequest(protocol_1.FsReadFileRequest.type, uri) ?? undefined;
|
|
102
57
|
},
|
|
103
58
|
async readDirectory(uri) {
|
|
104
|
-
if (uri.startsWith('__invalid__:')) {
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
59
|
if (uri.startsWith('http://') || uri.startsWith('https://')) { // perf
|
|
108
60
|
return [];
|
|
109
61
|
}
|
|
@@ -113,26 +65,31 @@ function createServer(connection) {
|
|
|
113
65
|
}));
|
|
114
66
|
}
|
|
115
67
|
exports.createServer = createServer;
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
68
|
+
async function loadTsdkByUrl(tsdkUrl, locale) {
|
|
69
|
+
return {
|
|
70
|
+
typescript: await loadLib(),
|
|
71
|
+
diagnosticMessages: await loadLocalizedDiagnosticMessages(),
|
|
72
|
+
};
|
|
73
|
+
async function loadLib() {
|
|
74
|
+
const originalModule = globalThis.module;
|
|
75
|
+
try {
|
|
76
|
+
globalThis.module = { exports: {} };
|
|
77
|
+
await import(`${tsdkUrl}/typescript.js`);
|
|
78
|
+
return globalThis.module.exports;
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
globalThis.module = originalModule;
|
|
82
|
+
}
|
|
120
83
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}).toString();
|
|
84
|
+
async function loadLocalizedDiagnosticMessages() {
|
|
85
|
+
try {
|
|
86
|
+
const json = await (0, http_1.default)(`${tsdkUrl}/${locale}/diagnosticMessages.generated.json`);
|
|
87
|
+
if (json) {
|
|
88
|
+
return JSON.parse(json);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch { }
|
|
130
92
|
}
|
|
131
|
-
const firstParts = parts[1].split('@');
|
|
132
|
-
return vscode_uri_1.URI.from({
|
|
133
|
-
scheme: firstParts[0],
|
|
134
|
-
authority: firstParts.length > 1 ? firstParts[1] : undefined,
|
|
135
|
-
path: '/' + parts.slice(2).join('/'),
|
|
136
|
-
}).toString();
|
|
137
93
|
}
|
|
94
|
+
exports.loadTsdkByUrl = loadTsdkByUrl;
|
|
138
95
|
//# sourceMappingURL=browser.js.map
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInferredCompilerOptions = void 0;
|
|
4
4
|
async function getInferredCompilerOptions(configurationHost) {
|
|
5
|
-
|
|
5
|
+
const [implicitProjectConfig_1 = {}, implicitProjectConfig_2 = {},] = await Promise.all([
|
|
6
6
|
configurationHost?.getConfiguration?.('js/ts.implicitProjectConfig'),
|
|
7
7
|
configurationHost?.getConfiguration?.('javascript.implicitProjectConfig'),
|
|
8
8
|
]);
|
|
9
|
-
implicitProjectConfig_1 = implicitProjectConfig_1 ?? {};
|
|
10
|
-
implicitProjectConfig_2 = implicitProjectConfig_2 ?? {};
|
|
11
9
|
const checkJs = readCheckJs();
|
|
12
10
|
const experimentalDecorators = readExperimentalDecorators();
|
|
13
11
|
const strictNullChecks = readImplicitStrictNullChecks();
|
|
@@ -18,7 +16,7 @@ async function getInferredCompilerOptions(configurationHost) {
|
|
|
18
16
|
allowSyntheticDefaultImports: true,
|
|
19
17
|
allowNonTsExtensions: true,
|
|
20
18
|
resolveJsonModule: true,
|
|
21
|
-
jsx: 1
|
|
19
|
+
jsx: 1,
|
|
22
20
|
};
|
|
23
21
|
return options;
|
|
24
22
|
function readCheckJs() {
|
|
@@ -39,9 +37,9 @@ async function getInferredCompilerOptions(configurationHost) {
|
|
|
39
37
|
}
|
|
40
38
|
function inferredProjectCompilerOptions(projectType) {
|
|
41
39
|
const projectConfig = {
|
|
42
|
-
module: 1
|
|
43
|
-
target: 7
|
|
44
|
-
jsx: 1
|
|
40
|
+
module: 1,
|
|
41
|
+
target: 7,
|
|
42
|
+
jsx: 1,
|
|
45
43
|
};
|
|
46
44
|
if (checkJs) {
|
|
47
45
|
projectConfig.checkJs = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ServiceEnvironment, ServicePlugin } from '@volar/language-service';
|
|
2
2
|
import type { ServerContext, ServerOptions } from '../server';
|
|
3
3
|
import type { ServerProject } from '../types';
|
|
4
|
-
export declare function createSimpleServerProject(context: ServerContext, serviceEnv: ServiceEnvironment,
|
|
4
|
+
export declare function createSimpleServerProject(context: ServerContext, serviceEnv: ServiceEnvironment, servicePlugins: ServicePlugin[], getLanguagePlugins: ServerOptions['getLanguagePlugins']): Promise<ServerProject>;
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createSimpleServerProject = void 0;
|
|
4
4
|
const language_service_1 = require("@volar/language-service");
|
|
5
|
-
async function createSimpleServerProject(context, serviceEnv,
|
|
5
|
+
async function createSimpleServerProject(context, serviceEnv, servicePlugins, getLanguagePlugins) {
|
|
6
6
|
let languageService;
|
|
7
|
-
const languagePlugins = await
|
|
7
|
+
const languagePlugins = await getLanguagePlugins(serviceEnv, {});
|
|
8
8
|
return {
|
|
9
|
-
serviceEnv,
|
|
10
9
|
getLanguageService,
|
|
11
10
|
getLanguageServiceDontCreate: () => languageService,
|
|
12
11
|
dispose() {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ServiceEnvironment } from '@volar/language-service';
|
|
2
|
-
import { URI } from 'vscode-uri';
|
|
3
2
|
import type { ServerProjectProviderFactory } from '../types';
|
|
4
|
-
import type { WorkspaceFolderManager } from '../workspaceFolderManager';
|
|
5
3
|
import type { ServerContext } from '../server';
|
|
6
|
-
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
4
|
+
import type { UriMap } from '../utils/uriMap';
|
|
5
|
+
export declare function createSimpleProjectProviderFactory(): ServerProjectProviderFactory;
|
|
6
|
+
export declare function createServiceEnvironment(context: ServerContext, workspaceFolder: string): ServiceEnvironment;
|
|
7
|
+
export declare function getWorkspaceFolder(uri: string, workspaceFolders: UriMap<boolean>): string;
|
|
@@ -1,66 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWorkspaceFolder = exports.createServiceEnvironment = exports.
|
|
3
|
+
exports.getWorkspaceFolder = exports.createServiceEnvironment = exports.createSimpleProjectProviderFactory = void 0;
|
|
4
4
|
const vscode_uri_1 = require("vscode-uri");
|
|
5
|
-
const isFileInDir_1 = require("../utils/isFileInDir");
|
|
6
5
|
const simpleProject_1 = require("./simpleProject");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
6
|
+
const uri_1 = require("../uri");
|
|
7
|
+
function createSimpleProjectProviderFactory() {
|
|
8
|
+
return (context, servicePlugins, getLanguagePlugins) => {
|
|
9
|
+
const projects = new Map();
|
|
10
|
+
return {
|
|
11
|
+
getProject(uri) {
|
|
12
|
+
const workspaceFolder = getWorkspaceFolder(uri, context.workspaceFolders);
|
|
13
|
+
let projectPromise = projects.get(workspaceFolder);
|
|
14
|
+
if (!projectPromise) {
|
|
15
|
+
const serviceEnv = createServiceEnvironment(context, workspaceFolder);
|
|
16
|
+
projectPromise = (0, simpleProject_1.createSimpleServerProject)(context, serviceEnv, servicePlugins, getLanguagePlugins);
|
|
17
|
+
projects.set(workspaceFolder, projectPromise);
|
|
18
|
+
}
|
|
19
|
+
return projectPromise;
|
|
20
|
+
},
|
|
21
|
+
async getProjects() {
|
|
22
|
+
return await Promise.all([...projects.values()]);
|
|
23
|
+
},
|
|
24
|
+
reloadProjects() {
|
|
25
|
+
for (const project of projects.values()) {
|
|
26
|
+
project.then(project => project.dispose());
|
|
27
|
+
}
|
|
28
|
+
projects.clear();
|
|
29
|
+
context.reloadDiagnostics();
|
|
30
|
+
},
|
|
31
|
+
};
|
|
30
32
|
};
|
|
31
|
-
}
|
|
32
|
-
exports.
|
|
33
|
+
}
|
|
34
|
+
exports.createSimpleProjectProviderFactory = createSimpleProjectProviderFactory;
|
|
33
35
|
function createServiceEnvironment(context, workspaceFolder) {
|
|
34
36
|
const env = {
|
|
35
|
-
workspaceFolder
|
|
37
|
+
workspaceFolder,
|
|
36
38
|
fs: context.runtimeEnv.fs,
|
|
37
|
-
console: context.runtimeEnv.console,
|
|
38
39
|
locale: context.initializeParams.locale,
|
|
39
40
|
clientCapabilities: context.initializeParams.capabilities,
|
|
40
41
|
getConfiguration: context.configurationHost?.getConfiguration,
|
|
41
42
|
onDidChangeConfiguration: context.configurationHost?.onDidChangeConfiguration,
|
|
42
43
|
onDidChangeWatchedFiles: context.onDidChangeWatchedFiles,
|
|
43
44
|
typescript: {
|
|
44
|
-
fileNameToUri:
|
|
45
|
-
uriToFileName:
|
|
45
|
+
fileNameToUri: uri_1.fileNameToUri,
|
|
46
|
+
uriToFileName: uri_1.uriToFileName,
|
|
46
47
|
},
|
|
47
48
|
};
|
|
48
49
|
return env;
|
|
49
50
|
}
|
|
50
51
|
exports.createServiceEnvironment = createServiceEnvironment;
|
|
51
|
-
function getWorkspaceFolder(uri,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
function getWorkspaceFolder(uri, workspaceFolders) {
|
|
53
|
+
let parsed = vscode_uri_1.URI.parse(uri);
|
|
54
|
+
while (true) {
|
|
55
|
+
if (workspaceFolders.uriHas(parsed.toString())) {
|
|
56
|
+
return parsed.toString();
|
|
57
|
+
}
|
|
58
|
+
const next = vscode_uri_1.URI.parse(uri).with({ path: parsed.path.substring(0, parsed.path.lastIndexOf('/')) });
|
|
59
|
+
if (next.path === parsed.path) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
parsed = next;
|
|
59
63
|
}
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
for (const folder of workspaceFolders.uriKeys()) {
|
|
65
|
+
return folder;
|
|
62
66
|
}
|
|
63
|
-
return
|
|
67
|
+
return vscode_uri_1.URI.parse(uri).with({ path: '/' }).toString();
|
|
64
68
|
}
|
|
65
69
|
exports.getWorkspaceFolder = getWorkspaceFolder;
|
|
66
70
|
//# sourceMappingURL=simpleProjectProvider.js.map
|
|
@@ -8,4 +8,4 @@ export interface TypeScriptServerProject extends ServerProject {
|
|
|
8
8
|
tryAddFile(fileName: string): void;
|
|
9
9
|
getParsedCommandLine(): ts.ParsedCommandLine;
|
|
10
10
|
}
|
|
11
|
-
export declare function createTypeScriptServerProject(tsconfig: string | ts.CompilerOptions, context: ServerContext, serviceEnv: ServiceEnvironment,
|
|
11
|
+
export declare function createTypeScriptServerProject(ts: typeof import('typescript'), tsLocalized: ts.MapLike<string> | undefined, tsconfig: string | ts.CompilerOptions, context: ServerContext, serviceEnv: ServiceEnvironment, servicePlugins: ServicePlugin[], getLanguagePlugins: ServerOptions['getLanguagePlugins']): Promise<TypeScriptServerProject>;
|
|
@@ -6,40 +6,36 @@ const typescript_1 = require("@volar/typescript");
|
|
|
6
6
|
const path = require("path-browserify");
|
|
7
7
|
const vscode = require("vscode-languageserver");
|
|
8
8
|
const uriMap_1 = require("../utils/uriMap");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
throw '!context.ts';
|
|
12
|
-
}
|
|
9
|
+
const uri_1 = require("../uri");
|
|
10
|
+
async function createTypeScriptServerProject(ts, tsLocalized, tsconfig, context, serviceEnv, servicePlugins, getLanguagePlugins) {
|
|
13
11
|
let parsedCommandLine;
|
|
14
12
|
let projectVersion = 0;
|
|
15
13
|
let languageService;
|
|
16
|
-
const
|
|
17
|
-
const ts = context.ts;
|
|
14
|
+
const sys = (0, typescript_1.createSys)(ts, serviceEnv, (0, uri_1.uriToFileName)(serviceEnv.workspaceFolder));
|
|
18
15
|
const host = {
|
|
19
|
-
getCurrentDirectory: () => uriToFileName(serviceEnv.workspaceFolder),
|
|
16
|
+
getCurrentDirectory: () => (0, uri_1.uriToFileName)(serviceEnv.workspaceFolder),
|
|
20
17
|
getProjectVersion: () => projectVersion.toString(),
|
|
21
18
|
getScriptFileNames: () => rootFiles,
|
|
22
19
|
getScriptSnapshot: fileName => {
|
|
23
20
|
askedFiles.pathSet(fileName, true);
|
|
24
|
-
const doc = context.documents.get(fileNameToUri(fileName));
|
|
21
|
+
const doc = context.documents.get((0, uri_1.fileNameToUri)(fileName));
|
|
25
22
|
if (doc) {
|
|
26
23
|
return doc.getSnapshot();
|
|
27
24
|
}
|
|
28
25
|
},
|
|
29
26
|
getCompilationSettings: () => parsedCommandLine.options,
|
|
30
|
-
getLocalizedDiagnosticMessages:
|
|
27
|
+
getLocalizedDiagnosticMessages: tsLocalized ? () => tsLocalized : undefined,
|
|
31
28
|
getProjectReferences: () => parsedCommandLine.projectReferences,
|
|
32
29
|
getLanguageId: uri => context.documents.get(uri)?.languageId ?? (0, language_service_1.resolveCommonLanguageId)(uri),
|
|
33
30
|
};
|
|
34
|
-
const
|
|
35
|
-
const languagePlugins = await serverOptions.getLanguagePlugins(serviceEnv, {
|
|
31
|
+
const languagePlugins = await getLanguagePlugins(serviceEnv, {
|
|
36
32
|
typescript: {
|
|
37
33
|
configFileName: typeof tsconfig === 'string' ? tsconfig : undefined,
|
|
38
34
|
host,
|
|
39
35
|
sys,
|
|
40
36
|
},
|
|
41
37
|
});
|
|
42
|
-
const askedFiles = (0, uriMap_1.createUriMap)(fileNameToUri);
|
|
38
|
+
const askedFiles = (0, uriMap_1.createUriMap)(uri_1.fileNameToUri);
|
|
43
39
|
const docChangeWatcher = context.documents.onDidChangeContent(() => {
|
|
44
40
|
projectVersion++;
|
|
45
41
|
});
|
|
@@ -49,7 +45,6 @@ async function createTypeScriptServerProject(tsconfig, context, serviceEnv, serv
|
|
|
49
45
|
let rootFiles = await getRootFiles(languagePlugins);
|
|
50
46
|
return {
|
|
51
47
|
askedFiles,
|
|
52
|
-
serviceEnv,
|
|
53
48
|
getLanguageService,
|
|
54
49
|
getLanguageServiceDontCreate: () => languageService,
|
|
55
50
|
tryAddFile(fileName) {
|
|
@@ -62,7 +57,7 @@ async function createTypeScriptServerProject(tsconfig, context, serviceEnv, serv
|
|
|
62
57
|
getParsedCommandLine: () => parsedCommandLine,
|
|
63
58
|
};
|
|
64
59
|
async function getRootFiles(languagePlugins) {
|
|
65
|
-
parsedCommandLine = await createParsedCommandLine(ts, sys, uriToFileName(serviceEnv.workspaceFolder), tsconfig, languagePlugins.map(plugin => plugin.typescript?.extraFileExtensions ?? []).flat());
|
|
60
|
+
parsedCommandLine = await createParsedCommandLine(ts, sys, (0, uri_1.uriToFileName)(serviceEnv.workspaceFolder), tsconfig, languagePlugins.map(plugin => plugin.typescript?.extraFileExtensions ?? []).flat());
|
|
66
61
|
return parsedCommandLine.fileNames;
|
|
67
62
|
}
|
|
68
63
|
function getLanguageService() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as ts from 'typescript';
|
|
1
2
|
import type { ServerProjectProviderFactory } from '../types';
|
|
2
|
-
export declare
|
|
3
|
+
export declare function createTypeScriptProjectProviderFactory(ts: typeof import('typescript'), tsLocalized: ts.MapLike<string> | undefined): ServerProjectProviderFactory;
|
|
3
4
|
export declare function sortTSConfigs(file: string, a: string, b: string): number;
|