Skip to content

Commit ce2e60e

Browse files
Update LKG
1 parent f3b21a2 commit ce2e60e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lib/typescript.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -141458,8 +141458,9 @@ interface Symbol {
141458141458
readonly [Symbol.toStringTag]: string;
141459141459
}`;
141460141460
var barebonesLibName = "lib.d.ts";
141461-
var barebonesLibSourceFile = createSourceFile(barebonesLibName, barebonesLibContent, { languageVersion: 99 /* Latest */ });
141461+
var barebonesLibSourceFile;
141462141462
function transpileWorker(input, transpileOptions, declaration) {
141463+
barebonesLibSourceFile ?? (barebonesLibSourceFile = createSourceFile(barebonesLibName, barebonesLibContent, { languageVersion: 99 /* Latest */ }));
141463141464
const diagnostics = [];
141464141465
const options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {};
141465141466
const defaultOptions = getDefaultCompilerOptions2();
@@ -143929,7 +143930,7 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
143929143930
const unusedImportsFromOldFile = /* @__PURE__ */ new Set();
143930143931
for (const statement of toMove) {
143931143932
forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => {
143932-
if (!symbol.declarations) {
143933+
if (!symbol.declarations || isGlobalType(checker, symbol)) {
143933143934
return;
143934143935
}
143935143936
if (existingTargetLocals.has(skipAlias(symbol, checker))) {
@@ -143979,6 +143980,16 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
143979143980
return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0;
143980143981
}
143981143982
}
143983+
function isGlobalType(checker, symbol) {
143984+
return !!checker.resolveName(
143985+
symbol.name,
143986+
/*location*/
143987+
void 0,
143988+
788968 /* Type */,
143989+
/*excludeGlobals*/
143990+
false
143991+
);
143992+
}
143982143993
function makeUniqueFilename(proposedFilename, extension, inDirectory, host) {
143983143994
let newFilename = proposedFilename;
143984143995
for (let i = 1; ; i++) {

0 commit comments

Comments
 (0)