Skip to content

Commit

Permalink
Update LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Jun 19, 2024
1 parent f3b21a2 commit ce2e60e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -141458,8 +141458,9 @@ interface Symbol {
readonly [Symbol.toStringTag]: string;
}`;
var barebonesLibName = "lib.d.ts";
var barebonesLibSourceFile = createSourceFile(barebonesLibName, barebonesLibContent, { languageVersion: 99 /* Latest */ });
var barebonesLibSourceFile;
function transpileWorker(input, transpileOptions, declaration) {
barebonesLibSourceFile ?? (barebonesLibSourceFile = createSourceFile(barebonesLibName, barebonesLibContent, { languageVersion: 99 /* Latest */ }));
const diagnostics = [];
const options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {};
const defaultOptions = getDefaultCompilerOptions2();
Expand Down Expand Up @@ -143929,7 +143930,7 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
const unusedImportsFromOldFile = /* @__PURE__ */ new Set();
for (const statement of toMove) {
forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => {
if (!symbol.declarations) {
if (!symbol.declarations || isGlobalType(checker, symbol)) {
return;
}
if (existingTargetLocals.has(skipAlias(symbol, checker))) {
Expand Down Expand Up @@ -143979,6 +143980,16 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0;
}
}
function isGlobalType(checker, symbol) {
return !!checker.resolveName(
symbol.name,
/*location*/
void 0,
788968 /* Type */,
/*excludeGlobals*/
false
);
}
function makeUniqueFilename(proposedFilename, extension, inDirectory, host) {
let newFilename = proposedFilename;
for (let i = 1; ; i++) {
Expand Down

0 comments on commit ce2e60e

Please sign in to comment.