@tsrx/language-server 0.3.129 → 0.3.131
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/dist/language-server.js
CHANGED
|
@@ -1865,21 +1865,6 @@ const resolveConfig = (config) => {
|
|
|
1865
1865
|
/** @type {CompilerOptions} */
|
|
1866
1866
|
const options = { ...config.options ?? {} };
|
|
1867
1867
|
if (options.target === void 0) options.target = typescript.default.ScriptTarget.ESNext;
|
|
1868
|
-
/** @param {string} libName */
|
|
1869
|
-
const normalizeLibName = (libName) => {
|
|
1870
|
-
if (typeof libName !== "string" || libName.length === 0) return;
|
|
1871
|
-
const trimmed = libName.trim();
|
|
1872
|
-
if (trimmed.startsWith("lib.")) return trimmed.toLowerCase();
|
|
1873
|
-
return `lib.${trimmed.toLowerCase().replace(/\s+/g, "").replace(/_/g, ".")}\.d.ts`;
|
|
1874
|
-
};
|
|
1875
|
-
const normalizedLibs = new Set((options.lib ?? []).map(normalizeLibName).filter((lib) => typeof lib === "string"));
|
|
1876
|
-
if (normalizedLibs.size === 0) {
|
|
1877
|
-
const defaultLibFileName = typescript.default.createCompilerHost(options).getDefaultLibFileName(options).toLowerCase();
|
|
1878
|
-
normalizedLibs.add(defaultLibFileName);
|
|
1879
|
-
normalizedLibs.add("lib.dom.d.ts");
|
|
1880
|
-
normalizedLibs.add("lib.dom.iterable.d.ts");
|
|
1881
|
-
}
|
|
1882
|
-
options.lib = [...normalizedLibs];
|
|
1883
1868
|
if (!options.types) {
|
|
1884
1869
|
const host = typescript.default.createCompilerHost(options);
|
|
1885
1870
|
const typeRoots = typescript.default.getEffectiveTypeRoots(options, host);
|
|
@@ -23485,4 +23470,4 @@ Object.defineProperty(exports, 'createTsrxLanguageServer', {
|
|
|
23485
23470
|
return createTsrxLanguageServer;
|
|
23486
23471
|
}
|
|
23487
23472
|
});
|
|
23488
|
-
//# sourceMappingURL=server-
|
|
23473
|
+
//# sourceMappingURL=server-BZ2bdQ1a.js.map
|