typescript 5.6.0-dev.20240628 → 5.6.0-dev.20240630

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.
Files changed (3) hide show
  1. package/lib/tsc.js +207 -94
  2. package/lib/typescript.js +219 -103
  3. package/package.json +2 -2
package/lib/typescript.js CHANGED
@@ -928,7 +928,7 @@ __export(typescript_exports, {
928
928
  getPathUpdater: () => getPathUpdater,
929
929
  getPathsBasePath: () => getPathsBasePath,
930
930
  getPatternFromSpec: () => getPatternFromSpec,
931
- getPendingEmitKind: () => getPendingEmitKind,
931
+ getPendingEmitKindWithSeen: () => getPendingEmitKindWithSeen,
932
932
  getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter,
933
933
  getPossibleGenericSignatures: () => getPossibleGenericSignatures,
934
934
  getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension,
@@ -2250,7 +2250,7 @@ module.exports = __toCommonJS(typescript_exports);
2250
2250
 
2251
2251
  // src/compiler/corePublic.ts
2252
2252
  var versionMajorMinor = "5.6";
2253
- var version = `${versionMajorMinor}.0-dev.20240628`;
2253
+ var version = `${versionMajorMinor}.0-dev.20240630`;
2254
2254
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2255
2255
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2256
2256
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -19938,11 +19938,11 @@ function getOwnEmitOutputFilePath(fileName, host, extension) {
19938
19938
  return emitOutputFilePathWithoutExtension + extension;
19939
19939
  }
19940
19940
  function getDeclarationEmitOutputFilePath(fileName, host) {
19941
- return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f));
19941
+ return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host);
19942
19942
  }
19943
- function getDeclarationEmitOutputFilePathWorker(fileName, options, currentDirectory, commonSourceDirectory, getCanonicalFileName) {
19943
+ function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
19944
19944
  const outputDir = options.declarationDir || options.outDir;
19945
- const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) : fileName;
19945
+ const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
19946
19946
  const declarationExtension = getDeclarationEmitExtensionForPath(path);
19947
19947
  return removeFileExtension(path) + declarationExtension;
19948
19948
  }
@@ -115668,17 +115668,16 @@ function createGetIsolatedDeclarationErrors(resolver) {
115668
115668
  function getDeclarationDiagnostics(host, resolver, file) {
115669
115669
  const compilerOptions = host.getCompilerOptions();
115670
115670
  const files = filter(getSourceFilesToEmit(host, file), isSourceFileNotJson);
115671
- const result = transformNodes(
115671
+ return contains(files, file) ? transformNodes(
115672
115672
  resolver,
115673
115673
  host,
115674
115674
  factory,
115675
115675
  compilerOptions,
115676
- file ? contains(files, file) ? [file] : emptyArray : files,
115676
+ [file],
115677
115677
  [transformDeclarations],
115678
115678
  /*allowDtsFiles*/
115679
115679
  false
115680
- );
115681
- return result.diagnostics;
115680
+ ).diagnostics : void 0;
115682
115681
  }
115683
115682
  var declarationEmitNodeBuilderFlags = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 1 /* AllowUnresolvedNames */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */;
115684
115683
  function transformDeclarations(context) {
@@ -124035,8 +124034,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124035
124034
  let filesWithReferencesProcessed;
124036
124035
  let fileReasonsToChain;
124037
124036
  let reasonToRelatedInfo;
124038
- const cachedBindAndCheckDiagnosticsForFile = {};
124039
- const cachedDeclarationDiagnosticsForFile = {};
124037
+ let cachedBindAndCheckDiagnosticsForFile;
124038
+ let cachedDeclarationDiagnosticsForFile;
124040
124039
  let fileProcessingDiagnostics;
124041
124040
  let automaticTypeDirectiveNames;
124042
124041
  let automaticTypeDirectiveResolutions;
@@ -125116,8 +125115,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125116
125115
  );
125117
125116
  }
125118
125117
  function getCachedSemanticDiagnostics(sourceFile) {
125119
- var _a2;
125120
- return sourceFile ? (_a2 = cachedBindAndCheckDiagnosticsForFile.perFile) == null ? void 0 : _a2.get(sourceFile.path) : cachedBindAndCheckDiagnosticsForFile.allDiagnostics;
125118
+ return cachedBindAndCheckDiagnosticsForFile == null ? void 0 : cachedBindAndCheckDiagnosticsForFile.get(sourceFile.path);
125121
125119
  }
125122
125120
  function getBindAndCheckDiagnostics(sourceFile, cancellationToken) {
125123
125121
  return getBindAndCheckDiagnosticsForFile(
@@ -125139,12 +125137,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125139
125137
  return getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, programDiagnosticsInFile).diagnostics;
125140
125138
  }
125141
125139
  function getDeclarationDiagnostics2(sourceFile, cancellationToken) {
125142
- const options2 = program.getCompilerOptions();
125143
- if (!sourceFile || options2.outFile) {
125144
- return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
125145
- } else {
125146
- return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
125147
- }
125140
+ return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);
125148
125141
  }
125149
125142
  function getSyntacticDiagnosticsForFile(sourceFile) {
125150
125143
  if (isSourceFileJS(sourceFile)) {
@@ -125175,7 +125168,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125175
125168
  if (nodesToCheck) {
125176
125169
  return getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken, nodesToCheck);
125177
125170
  }
125178
- return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFile, getBindAndCheckDiagnosticsForFileNoCache);
125171
+ let result = cachedBindAndCheckDiagnosticsForFile == null ? void 0 : cachedBindAndCheckDiagnosticsForFile.get(sourceFile.path);
125172
+ if (!result) {
125173
+ (cachedBindAndCheckDiagnosticsForFile ?? (cachedBindAndCheckDiagnosticsForFile = /* @__PURE__ */ new Map())).set(
125174
+ sourceFile.path,
125175
+ result = getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken)
125176
+ );
125177
+ }
125178
+ return result;
125179
125179
  }
125180
125180
  function getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken, nodesToCheck) {
125181
125181
  return runWithCancellationToken(() => {
@@ -125463,7 +125463,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125463
125463
  });
125464
125464
  }
125465
125465
  function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {
125466
- return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache);
125466
+ let result = cachedDeclarationDiagnosticsForFile == null ? void 0 : cachedDeclarationDiagnosticsForFile.get(sourceFile.path);
125467
+ if (!result) {
125468
+ (cachedDeclarationDiagnosticsForFile ?? (cachedDeclarationDiagnosticsForFile = /* @__PURE__ */ new Map())).set(
125469
+ sourceFile.path,
125470
+ result = getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken)
125471
+ );
125472
+ }
125473
+ return result;
125467
125474
  }
125468
125475
  function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {
125469
125476
  return runWithCancellationToken(() => {
@@ -125471,22 +125478,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125471
125478
  return getDeclarationDiagnostics(getEmitHost(noop), resolver, sourceFile) || emptyArray;
125472
125479
  });
125473
125480
  }
125474
- function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics2) {
125475
- var _a2;
125476
- const cachedResult = sourceFile ? (_a2 = cache.perFile) == null ? void 0 : _a2.get(sourceFile.path) : cache.allDiagnostics;
125477
- if (cachedResult) {
125478
- return cachedResult;
125479
- }
125480
- const result = getDiagnostics2(sourceFile, cancellationToken);
125481
- if (sourceFile) {
125482
- (cache.perFile || (cache.perFile = /* @__PURE__ */ new Map())).set(sourceFile.path, result);
125483
- } else {
125484
- cache.allDiagnostics = result;
125485
- }
125486
- return result;
125487
- }
125488
125481
  function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
125489
- return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
125482
+ return sourceFile.isDeclarationFile ? emptyArray : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
125490
125483
  }
125491
125484
  function getOptionsDiagnostics() {
125492
125485
  return sortAndDeduplicateDiagnostics(concatenate(
@@ -126434,7 +126427,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126434
126427
  if (options.outDir || // there is --outDir specified
126435
126428
  options.rootDir || // there is --rootDir specified
126436
126429
  options.sourceRoot || // there is --sourceRoot specified
126437
- options.mapRoot) {
126430
+ options.mapRoot || // there is --mapRoot specified
126431
+ getEmitDeclarations(options) && options.declarationDir) {
126438
126432
  const dir = getCommonSourceDirectory2();
126439
126433
  if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) {
126440
126434
  createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
@@ -126447,14 +126441,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126447
126441
  if (!getEmitDeclarations(options)) {
126448
126442
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "emitDeclarationOnly", "declaration", "composite");
126449
126443
  }
126450
- if (options.noEmit) {
126451
- createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "emitDeclarationOnly", "noEmit");
126452
- }
126453
- }
126454
- if (options.noCheck) {
126455
- if (options.noEmit) {
126456
- createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit");
126457
- }
126458
126444
  }
126459
126445
  if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
126460
126446
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators");
@@ -127191,7 +127177,6 @@ var emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: void 0
127191
127177
  function handleNoEmitOptions(program, sourceFile, writeFile2, cancellationToken) {
127192
127178
  const options = program.getCompilerOptions();
127193
127179
  if (options.noEmit) {
127194
- program.getSemanticDiagnostics(sourceFile, cancellationToken);
127195
127180
  return sourceFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile2, cancellationToken);
127196
127181
  }
127197
127182
  if (!options.noEmitOnError) return void 0;
@@ -127676,11 +127661,14 @@ var BuilderFileEmit = /* @__PURE__ */ ((BuilderFileEmit2) => {
127676
127661
  BuilderFileEmit2[BuilderFileEmit2["Js"] = 1] = "Js";
127677
127662
  BuilderFileEmit2[BuilderFileEmit2["JsMap"] = 2] = "JsMap";
127678
127663
  BuilderFileEmit2[BuilderFileEmit2["JsInlineMap"] = 4] = "JsInlineMap";
127679
- BuilderFileEmit2[BuilderFileEmit2["Dts"] = 8] = "Dts";
127680
- BuilderFileEmit2[BuilderFileEmit2["DtsMap"] = 16] = "DtsMap";
127664
+ BuilderFileEmit2[BuilderFileEmit2["DtsErrors"] = 8] = "DtsErrors";
127665
+ BuilderFileEmit2[BuilderFileEmit2["DtsEmit"] = 16] = "DtsEmit";
127666
+ BuilderFileEmit2[BuilderFileEmit2["DtsMap"] = 32] = "DtsMap";
127667
+ BuilderFileEmit2[BuilderFileEmit2["Dts"] = 24] = "Dts";
127681
127668
  BuilderFileEmit2[BuilderFileEmit2["AllJs"] = 7] = "AllJs";
127682
- BuilderFileEmit2[BuilderFileEmit2["AllDts"] = 24] = "AllDts";
127683
- BuilderFileEmit2[BuilderFileEmit2["All"] = 31] = "All";
127669
+ BuilderFileEmit2[BuilderFileEmit2["AllDtsEmit"] = 48] = "AllDtsEmit";
127670
+ BuilderFileEmit2[BuilderFileEmit2["AllDts"] = 56] = "AllDts";
127671
+ BuilderFileEmit2[BuilderFileEmit2["All"] = 63] = "All";
127684
127672
  return BuilderFileEmit2;
127685
127673
  })(BuilderFileEmit || {});
127686
127674
  function isBuilderProgramStateWithDefinedProgram(state) {
@@ -127694,9 +127682,9 @@ function getBuilderFileEmit(options) {
127694
127682
  let result = 1 /* Js */;
127695
127683
  if (options.sourceMap) result = result | 2 /* JsMap */;
127696
127684
  if (options.inlineSourceMap) result = result | 4 /* JsInlineMap */;
127697
- if (getEmitDeclarations(options)) result = result | 8 /* Dts */;
127698
- if (options.declarationMap) result = result | 16 /* DtsMap */;
127699
- if (options.emitDeclarationOnly) result = result & 24 /* AllDts */;
127685
+ if (getEmitDeclarations(options)) result = result | 24 /* Dts */;
127686
+ if (options.declarationMap) result = result | 32 /* DtsMap */;
127687
+ if (options.emitDeclarationOnly) result = result & 56 /* AllDts */;
127700
127688
  return result;
127701
127689
  }
127702
127690
  function getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) {
@@ -127707,7 +127695,8 @@ function getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) {
127707
127695
  const diff = oldEmitKind ^ emitKind;
127708
127696
  let result = 0 /* None */;
127709
127697
  if (diff & 7 /* AllJs */) result = emitKind & 7 /* AllJs */;
127710
- if (diff & 24 /* AllDts */) result = result | emitKind & 24 /* AllDts */;
127698
+ if (diff & 8 /* DtsErrors */) result = result | emitKind & 8 /* DtsErrors */;
127699
+ if (diff & 48 /* AllDtsEmit */) result = result | emitKind & 48 /* AllDtsEmit */;
127711
127700
  return result;
127712
127701
  }
127713
127702
  function hasSameKeys(map1, map2) {
@@ -127961,25 +127950,34 @@ function getNextAffectedFile(state, cancellationToken, host) {
127961
127950
  if (!state.seenAffectedFiles) state.seenAffectedFiles = /* @__PURE__ */ new Set();
127962
127951
  }
127963
127952
  }
127964
- function clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles) {
127953
+ function clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {
127965
127954
  var _a, _b;
127966
127955
  if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size) && !state.programEmitPending) return;
127967
- if (!emitOnlyDtsFiles) {
127956
+ if (!emitOnlyDtsFiles && !isForDtsErrors) {
127968
127957
  state.affectedFilesPendingEmit = void 0;
127969
127958
  state.programEmitPending = void 0;
127970
127959
  }
127971
127960
  (_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path) => {
127972
- const pending = emitKind & 7 /* AllJs */;
127961
+ const pending = !isForDtsErrors ? emitKind & 7 /* AllJs */ : emitKind & (7 /* AllJs */ | 48 /* AllDtsEmit */);
127973
127962
  if (!pending) state.affectedFilesPendingEmit.delete(path);
127974
127963
  else state.affectedFilesPendingEmit.set(path, pending);
127975
127964
  });
127976
127965
  if (state.programEmitPending) {
127977
- const pending = state.programEmitPending & 7 /* AllJs */;
127966
+ const pending = !isForDtsErrors ? state.programEmitPending & 7 /* AllJs */ : state.programEmitPending & (7 /* AllJs */ | 48 /* AllDtsEmit */);
127978
127967
  if (!pending) state.programEmitPending = void 0;
127979
127968
  else state.programEmitPending = pending;
127980
127969
  }
127981
127970
  }
127982
- function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) {
127971
+ function getPendingEmitKindWithSeen(optionsOrEmitKind, seenOldOptionsOrEmitKind, emitOnlyDtsFiles, isForDtsErrors) {
127972
+ let pendingKind = getPendingEmitKind(optionsOrEmitKind, seenOldOptionsOrEmitKind);
127973
+ if (emitOnlyDtsFiles) pendingKind = pendingKind & 56 /* AllDts */;
127974
+ if (isForDtsErrors) pendingKind = pendingKind & 8 /* DtsErrors */;
127975
+ return pendingKind;
127976
+ }
127977
+ function getBuilderFileEmitAllDts(isForDtsErrors) {
127978
+ return !isForDtsErrors ? 56 /* AllDts */ : 8 /* DtsErrors */;
127979
+ }
127980
+ function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {
127983
127981
  var _a;
127984
127982
  if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return void 0;
127985
127983
  return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path) => {
@@ -127990,12 +127988,16 @@ function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) {
127990
127988
  return void 0;
127991
127989
  }
127992
127990
  const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath);
127993
- let pendingKind = getPendingEmitKind(emitKind, seenKind);
127994
- if (emitOnlyDtsFiles) pendingKind = pendingKind & 24 /* AllDts */;
127991
+ const pendingKind = getPendingEmitKindWithSeen(
127992
+ emitKind,
127993
+ seenKind,
127994
+ emitOnlyDtsFiles,
127995
+ isForDtsErrors
127996
+ );
127995
127997
  if (pendingKind) return { affectedFile, emitKind: pendingKind };
127996
127998
  });
127997
127999
  }
127998
- function getNextPendingEmitDiagnosticsFile(state) {
128000
+ function getNextPendingEmitDiagnosticsFile(state, isForDtsErrors) {
127999
128001
  var _a;
128000
128002
  if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) return void 0;
128001
128003
  return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path) => {
@@ -128006,7 +128008,7 @@ function getNextPendingEmitDiagnosticsFile(state) {
128006
128008
  return void 0;
128007
128009
  }
128008
128010
  const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0 /* None */;
128009
- if (!(seenKind & 24 /* AllDts */)) return { affectedFile, diagnostics, seenKind };
128011
+ if (!(seenKind & getBuilderFileEmitAllDts(isForDtsErrors))) return { affectedFile, diagnostics, seenKind };
128010
128012
  });
128011
128013
  }
128012
128014
  function removeDiagnosticsOfLibraryFiles(state) {
@@ -128061,7 +128063,7 @@ function handleDtsMayChangeOf(state, path, invalidateJsFiles, cancellationToken,
128061
128063
  addToAffectedFilesPendingEmit(
128062
128064
  state,
128063
128065
  path,
128064
- state.compilerOptions.declarationMap ? 24 /* AllDts */ : 8 /* Dts */
128066
+ state.compilerOptions.declarationMap ? 56 /* AllDts */ : 24 /* Dts */
128065
128067
  );
128066
128068
  }
128067
128069
  }
@@ -128261,8 +128263,9 @@ function getBuildInfo2(state) {
128261
128263
  root,
128262
128264
  resolvedRoot: toResolvedRoot(),
128263
128265
  options: toIncrementalBuildInfoCompilerOptions(state.compilerOptions),
128264
- semanticDiagnosticsPerFile: toIncrementalBuildInfoDiagnostics(),
128266
+ semanticDiagnosticsPerFile: !state.changedFilesSet.size ? toIncrementalBuildInfoDiagnostics() : void 0,
128265
128267
  emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(),
128268
+ changeFileSet: toChangeFileSet(),
128266
128269
  outSignature: state.outSignature,
128267
128270
  latestChangedDtsFile,
128268
128271
  pendingEmit: !state.programEmitPending ? void 0 : (
@@ -128346,7 +128349,7 @@ function getBuildInfo2(state) {
128346
128349
  affectedFilesPendingEmit,
128347
128350
  pendingEmit === fullEmitForOptions ? fileId : (
128348
128351
  // Pending full emit per options
128349
- pendingEmit === 8 /* Dts */ ? [fileId] : (
128352
+ pendingEmit === 24 /* Dts */ ? [fileId] : (
128350
128353
  // Pending on Dts only
128351
128354
  [fileId, pendingEmit]
128352
128355
  )
@@ -128366,6 +128369,7 @@ function getBuildInfo2(state) {
128366
128369
  referencedMap,
128367
128370
  semanticDiagnosticsPerFile,
128368
128371
  emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(),
128372
+ changeFileSet: toChangeFileSet(),
128369
128373
  affectedFilesPendingEmit,
128370
128374
  emitSignatures,
128371
128375
  latestChangedDtsFile,
@@ -128454,7 +128458,7 @@ function getBuildInfo2(state) {
128454
128458
  state.fileInfos.forEach((_value, key) => {
128455
128459
  const value = state.semanticDiagnosticsPerFile.get(key);
128456
128460
  if (!value) {
128457
- result = append(result, toFileId(key));
128461
+ if (!state.changedFilesSet.has(key)) result = append(result, toFileId(key));
128458
128462
  } else if (value.length) {
128459
128463
  result = append(result, [
128460
128464
  toFileId(key),
@@ -128521,6 +128525,15 @@ function getBuildInfo2(state) {
128521
128525
  return result;
128522
128526
  }) || array;
128523
128527
  }
128528
+ function toChangeFileSet() {
128529
+ let changeFileSet;
128530
+ if (state.changedFilesSet.size) {
128531
+ for (const path of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
128532
+ changeFileSet = append(changeFileSet, toFileId(path));
128533
+ }
128534
+ }
128535
+ return changeFileSet;
128536
+ }
128524
128537
  }
128525
128538
  var BuilderProgramKind = /* @__PURE__ */ ((BuilderProgramKind2) => {
128526
128539
  BuilderProgramKind2[BuilderProgramKind2["SemanticDiagnosticsBuilderProgram"] = 0] = "SemanticDiagnosticsBuilderProgram";
@@ -128604,6 +128617,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128604
128617
  sourceFile
128605
128618
  );
128606
128619
  builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
128620
+ builderProgram.getDeclarationDiagnostics = getDeclarationDiagnostics2;
128607
128621
  builderProgram.emit = emit;
128608
128622
  builderProgram.releaseProgram = () => releaseCache(state);
128609
128623
  if (kind === 0 /* SemanticDiagnosticsBuilderProgram */) {
@@ -128628,21 +128642,31 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128628
128642
  }
128629
128643
  return emitSkippedWithNoDiagnostics;
128630
128644
  }
128631
- function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
128645
+ function emitNextAffectedFileOrDtsErrors(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, isForDtsErrors) {
128632
128646
  var _a, _b, _c, _d;
128633
128647
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
128634
128648
  let affected = getNextAffectedFile(state, cancellationToken, host);
128635
128649
  const programEmitKind = getBuilderFileEmit(state.compilerOptions);
128636
- let emitKind = emitOnlyDtsFiles ? programEmitKind & 24 /* AllDts */ : programEmitKind;
128650
+ let emitKind = !isForDtsErrors ? emitOnlyDtsFiles ? programEmitKind & 56 /* AllDts */ : programEmitKind : 8 /* DtsErrors */;
128637
128651
  if (!affected) {
128638
128652
  if (!state.compilerOptions.outFile) {
128639
- const pendingAffectedFile = getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles);
128653
+ const pendingAffectedFile = getNextAffectedFilePendingEmit(
128654
+ state,
128655
+ emitOnlyDtsFiles,
128656
+ isForDtsErrors
128657
+ );
128640
128658
  if (pendingAffectedFile) {
128641
128659
  ({ affectedFile: affected, emitKind } = pendingAffectedFile);
128642
128660
  } else {
128643
- const pendingForDiagnostics = getNextPendingEmitDiagnosticsFile(state);
128661
+ const pendingForDiagnostics = getNextPendingEmitDiagnosticsFile(
128662
+ state,
128663
+ isForDtsErrors
128664
+ );
128644
128665
  if (pendingForDiagnostics) {
128645
- (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(pendingForDiagnostics.affectedFile.resolvedPath, pendingForDiagnostics.seenKind | 24 /* AllDts */);
128666
+ (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(
128667
+ pendingForDiagnostics.affectedFile.resolvedPath,
128668
+ pendingForDiagnostics.seenKind | getBuilderFileEmitAllDts(isForDtsErrors)
128669
+ );
128646
128670
  return {
128647
128671
  result: { emitSkipped: true, diagnostics: pendingForDiagnostics.diagnostics },
128648
128672
  affected: pendingForDiagnostics.affectedFile
@@ -128651,14 +128675,18 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128651
128675
  }
128652
128676
  } else {
128653
128677
  if (state.programEmitPending) {
128654
- emitKind = state.programEmitPending;
128655
- if (emitOnlyDtsFiles) emitKind = emitKind & 24 /* AllDts */;
128678
+ emitKind = getPendingEmitKindWithSeen(
128679
+ state.programEmitPending,
128680
+ state.seenProgramEmit,
128681
+ emitOnlyDtsFiles,
128682
+ isForDtsErrors
128683
+ );
128656
128684
  if (emitKind) affected = state.program;
128657
128685
  }
128658
128686
  if (!affected && ((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) {
128659
128687
  const seenKind = state.seenProgramEmit || 0 /* None */;
128660
- if (!(seenKind & 24 /* AllDts */)) {
128661
- state.seenProgramEmit = 24 /* AllDts */ | seenKind;
128688
+ if (!(seenKind & getBuilderFileEmitAllDts(isForDtsErrors))) {
128689
+ state.seenProgramEmit = getBuilderFileEmitAllDts(isForDtsErrors) | seenKind;
128662
128690
  const diagnostics = [];
128663
128691
  state.emitDiagnosticsPerFile.forEach((d) => addRange(diagnostics, d));
128664
128692
  return {
@@ -128669,7 +128697,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128669
128697
  }
128670
128698
  }
128671
128699
  if (!affected) {
128672
- if (!getBuildInfoEmitPending(state)) return void 0;
128700
+ if (isForDtsErrors || !getBuildInfoEmitPending(state)) return void 0;
128673
128701
  const affected2 = state.program;
128674
128702
  const result2 = affected2.emitBuildInfo(
128675
128703
  writeFile2 || maybeBind(host, host.writeFile),
@@ -128681,8 +128709,8 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128681
128709
  }
128682
128710
  let emitOnly;
128683
128711
  if (emitKind & 7 /* AllJs */) emitOnly = 0 /* Js */;
128684
- if (emitKind & 24 /* AllDts */) emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0;
128685
- const result = state.program.emit(
128712
+ if (emitKind & 56 /* AllDts */) emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0;
128713
+ const result = !isForDtsErrors ? state.program.emit(
128686
128714
  affected === state.program ? void 0 : affected,
128687
128715
  getWriteFileCallback(writeFile2, customTransformers),
128688
128716
  cancellationToken,
@@ -128692,7 +128720,13 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128692
128720
  void 0,
128693
128721
  /*skipBuildInfo*/
128694
128722
  true
128695
- );
128723
+ ) : {
128724
+ emitSkipped: true,
128725
+ diagnostics: state.program.getDeclarationDiagnostics(
128726
+ affected === state.program ? void 0 : affected,
128727
+ cancellationToken
128728
+ )
128729
+ };
128696
128730
  if (affected !== state.program) {
128697
128731
  const affectedSourceFile = affected;
128698
128732
  state.seenAffectedFiles.add(affectedSourceFile.resolvedPath);
@@ -128709,18 +128743,31 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128709
128743
  state.changedFilesSet.clear();
128710
128744
  state.programEmitPending = state.changedFilesSet.size ? getPendingEmitKind(programEmitKind, emitKind) : state.programEmitPending ? getPendingEmitKind(state.programEmitPending, emitKind) : void 0;
128711
128745
  state.seenProgramEmit = emitKind | (state.seenProgramEmit || 0 /* None */);
128712
- let emitDiagnosticsPerFile;
128713
- result.diagnostics.forEach((d) => {
128714
- if (!d.file) return;
128715
- let diagnostics = emitDiagnosticsPerFile == null ? void 0 : emitDiagnosticsPerFile.get(d.file.resolvedPath);
128716
- if (!diagnostics) (emitDiagnosticsPerFile ?? (emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(d.file.resolvedPath, diagnostics = []);
128717
- diagnostics.push(d);
128718
- });
128719
- if (emitDiagnosticsPerFile) state.emitDiagnosticsPerFile = emitDiagnosticsPerFile;
128746
+ setEmitDiagnosticsPerFile(result.diagnostics);
128720
128747
  state.buildInfoEmitPending = true;
128721
128748
  }
128722
128749
  return { result, affected };
128723
128750
  }
128751
+ function setEmitDiagnosticsPerFile(diagnostics) {
128752
+ let emitDiagnosticsPerFile;
128753
+ diagnostics.forEach((d) => {
128754
+ if (!d.file) return;
128755
+ let diagnostics2 = emitDiagnosticsPerFile == null ? void 0 : emitDiagnosticsPerFile.get(d.file.resolvedPath);
128756
+ if (!diagnostics2) (emitDiagnosticsPerFile ?? (emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(d.file.resolvedPath, diagnostics2 = []);
128757
+ diagnostics2.push(d);
128758
+ });
128759
+ if (emitDiagnosticsPerFile) state.emitDiagnosticsPerFile = emitDiagnosticsPerFile;
128760
+ }
128761
+ function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
128762
+ return emitNextAffectedFileOrDtsErrors(
128763
+ writeFile2,
128764
+ cancellationToken,
128765
+ emitOnlyDtsFiles,
128766
+ customTransformers,
128767
+ /*isForDtsErrors*/
128768
+ false
128769
+ );
128770
+ }
128724
128771
  function getWriteFileCallback(writeFile2, customTransformers) {
128725
128772
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
128726
128773
  if (!getEmitDeclarations(state.compilerOptions)) return writeFile2 || maybeBind(host, host.writeFile);
@@ -128820,16 +128867,69 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
128820
128867
  sourceMaps
128821
128868
  };
128822
128869
  } else {
128823
- clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles);
128870
+ clearAffectedFilesPendingEmit(
128871
+ state,
128872
+ emitOnlyDtsFiles,
128873
+ /*isForDtsErrors*/
128874
+ false
128875
+ );
128824
128876
  }
128825
128877
  }
128826
- return state.program.emit(
128878
+ const emitResult = state.program.emit(
128827
128879
  targetSourceFile,
128828
128880
  getWriteFileCallback(writeFile2, customTransformers),
128829
128881
  cancellationToken,
128830
128882
  emitOnlyDtsFiles,
128831
128883
  customTransformers
128832
128884
  );
128885
+ handleNonEmitBuilderWithEmitOrDtsErrors(
128886
+ targetSourceFile,
128887
+ emitOnlyDtsFiles,
128888
+ /*isForDtsErrors*/
128889
+ false,
128890
+ emitResult.diagnostics
128891
+ );
128892
+ return emitResult;
128893
+ }
128894
+ function handleNonEmitBuilderWithEmitOrDtsErrors(targetSourceFile, emitOnlyDtsFiles, isForDtsErrors, diagnostics) {
128895
+ if (!targetSourceFile && kind !== 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {
128896
+ clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, isForDtsErrors);
128897
+ setEmitDiagnosticsPerFile(diagnostics);
128898
+ }
128899
+ }
128900
+ function getDeclarationDiagnostics2(sourceFile, cancellationToken) {
128901
+ var _a;
128902
+ Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
128903
+ if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {
128904
+ assertSourceFileOkWithoutNextAffectedCall(state, sourceFile);
128905
+ let affectedEmitResult;
128906
+ let diagnostics;
128907
+ while (affectedEmitResult = emitNextAffectedFileOrDtsErrors(
128908
+ /*writeFile*/
128909
+ void 0,
128910
+ cancellationToken,
128911
+ /*emitOnlyDtsFiles*/
128912
+ void 0,
128913
+ /*customTransformers*/
128914
+ void 0,
128915
+ /*isForDtsErrors*/
128916
+ true
128917
+ )) {
128918
+ if (!sourceFile) diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics);
128919
+ }
128920
+ return (!sourceFile ? diagnostics : (_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.get(sourceFile.resolvedPath)) || emptyArray;
128921
+ } else {
128922
+ const result = state.program.getDeclarationDiagnostics(sourceFile, cancellationToken);
128923
+ handleNonEmitBuilderWithEmitOrDtsErrors(
128924
+ sourceFile,
128925
+ /*emitOnlyDtsFiles*/
128926
+ void 0,
128927
+ /*isForDtsErrors*/
128928
+ true,
128929
+ result
128930
+ );
128931
+ return result;
128932
+ }
128833
128933
  }
128834
128934
  function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
128835
128935
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
@@ -128907,7 +129007,7 @@ function toBuilderStateFileInfoForMultiEmit(fileInfo) {
128907
129007
  return isString(fileInfo) ? { version: fileInfo, signature: fileInfo, affectsGlobalScope: void 0, impliedFormat: void 0 } : isString(fileInfo.signature) ? fileInfo : { version: fileInfo.version, signature: fileInfo.signature === false ? void 0 : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
128908
129008
  }
128909
129009
  function toBuilderFileEmit(value, fullEmitForOptions) {
128910
- return isNumber(value) ? fullEmitForOptions : value[1] || 8 /* Dts */;
129010
+ return isNumber(value) ? fullEmitForOptions : value[1] || 24 /* Dts */;
128911
129011
  }
128912
129012
  function toProgramEmitPending(value, options) {
128913
129013
  return !value ? getBuilderFileEmit(options || {}) : value;
@@ -128921,6 +129021,7 @@ function createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath,
128921
129021
  let filePathsSetList;
128922
129022
  const latestChangedDtsFile = buildInfo.latestChangedDtsFile ? toAbsolutePath(buildInfo.latestChangedDtsFile) : void 0;
128923
129023
  const fileInfos = /* @__PURE__ */ new Map();
129024
+ const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));
128924
129025
  if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
128925
129026
  buildInfo.fileInfos.forEach((fileInfo, index) => {
128926
129027
  const path = toFilePath(index + 1);
@@ -128932,6 +129033,7 @@ function createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath,
128932
129033
  semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(buildInfo.semanticDiagnosticsPerFile),
128933
129034
  emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile),
128934
129035
  hasReusableDiagnostic: true,
129036
+ changedFilesSet,
128935
129037
  latestChangedDtsFile,
128936
129038
  outSignature: buildInfo.outSignature,
128937
129039
  programEmitPending: buildInfo.pendingEmit === void 0 ? void 0 : toProgramEmitPending(buildInfo.pendingEmit, buildInfo.options),
@@ -128968,6 +129070,7 @@ function createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath,
128968
129070
  semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(buildInfo.semanticDiagnosticsPerFile),
128969
129071
  emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile),
128970
129072
  hasReusableDiagnostic: true,
129073
+ changedFilesSet,
128971
129074
  affectedFilesPendingEmit: buildInfo.affectedFilesPendingEmit && arrayToMap(buildInfo.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)),
128972
129075
  latestChangedDtsFile,
128973
129076
  emitSignatures: (emitSignatures == null ? void 0 : emitSignatures.size) ? emitSignatures : void 0,
@@ -129020,7 +129123,7 @@ function createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath,
129020
129123
  const semanticDiagnostics = new Map(
129021
129124
  mapDefinedIterator(
129022
129125
  fileInfos.keys(),
129023
- (key) => [key, emptyArray]
129126
+ (key) => !changedFilesSet.has(key) ? [key, emptyArray] : void 0
129024
129127
  )
129025
129128
  );
129026
129129
  diagnostics == null ? void 0 : diagnostics.forEach((value) => {
@@ -130616,7 +130719,7 @@ function toFileName(file, fileNameConvertor) {
130616
130719
  return fileNameConvertor ? fileNameConvertor(fileName) : fileName;
130617
130720
  }
130618
130721
  function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
130619
- const isListFilesOnly = !!program.getCompilerOptions().listFilesOnly;
130722
+ const options = program.getCompilerOptions();
130620
130723
  const allDiagnostics = program.getConfigFileParsingDiagnostics().slice();
130621
130724
  const configFileParsingDiagnosticsLength = allDiagnostics.length;
130622
130725
  addRange(allDiagnostics, program.getSyntacticDiagnostics(
@@ -130626,7 +130729,7 @@ function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummar
130626
130729
  ));
130627
130730
  if (allDiagnostics.length === configFileParsingDiagnosticsLength) {
130628
130731
  addRange(allDiagnostics, program.getOptionsDiagnostics(cancellationToken));
130629
- if (!isListFilesOnly) {
130732
+ if (!options.listFilesOnly) {
130630
130733
  addRange(allDiagnostics, program.getGlobalDiagnostics(cancellationToken));
130631
130734
  if (allDiagnostics.length === configFileParsingDiagnosticsLength) {
130632
130735
  addRange(allDiagnostics, program.getSemanticDiagnostics(
@@ -130635,9 +130738,16 @@ function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummar
130635
130738
  cancellationToken
130636
130739
  ));
130637
130740
  }
130741
+ if (options.noEmit && getEmitDeclarations(options) && allDiagnostics.length === configFileParsingDiagnosticsLength) {
130742
+ addRange(allDiagnostics, program.getDeclarationDiagnostics(
130743
+ /*sourceFile*/
130744
+ void 0,
130745
+ cancellationToken
130746
+ ));
130747
+ }
130638
130748
  }
130639
130749
  }
130640
- const emitResult = isListFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(
130750
+ const emitResult = options.listFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(
130641
130751
  /*targetSourceFile*/
130642
130752
  void 0,
130643
130753
  writeFile2,
@@ -132506,7 +132616,7 @@ function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime,
132506
132616
  }
132507
132617
  }
132508
132618
  function getUpToDateStatusWorker(state, project, resolvedPath) {
132509
- var _a, _b, _c;
132619
+ var _a, _b, _c, _d, _e;
132510
132620
  if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
132511
132621
  return {
132512
132622
  type: 15 /* ContainerOnly */
@@ -132568,19 +132678,25 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
132568
132678
  };
132569
132679
  }
132570
132680
  if (incrementalBuildInfo) {
132571
- if (!project.options.noCheck && (((_a = incrementalBuildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _a.length) || !project.options.noEmit && getEmitDeclarations(project.options) && ((_b = incrementalBuildInfo.emitDiagnosticsPerFile) == null ? void 0 : _b.length))) {
132681
+ if (!project.options.noCheck && (((_a = incrementalBuildInfo.changeFileSet) == null ? void 0 : _a.length) || ((_b = incrementalBuildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _b.length) || getEmitDeclarations(project.options) && ((_c = incrementalBuildInfo.emitDiagnosticsPerFile) == null ? void 0 : _c.length))) {
132572
132682
  return {
132573
132683
  type: 8 /* OutOfDateBuildInfoWithErrors */,
132574
132684
  buildInfoFile: buildInfoPath
132575
132685
  };
132576
132686
  }
132577
- if (!project.options.noEmit && (((_c = incrementalBuildInfo.affectedFilesPendingEmit) == null ? void 0 : _c.length) || incrementalBuildInfo.pendingEmit !== void 0)) {
132687
+ if (!project.options.noEmit && (((_d = incrementalBuildInfo.changeFileSet) == null ? void 0 : _d.length) || ((_e = incrementalBuildInfo.affectedFilesPendingEmit) == null ? void 0 : _e.length) || incrementalBuildInfo.pendingEmit !== void 0)) {
132578
132688
  return {
132579
132689
  type: 7 /* OutOfDateBuildInfoWithPendingEmit */,
132580
132690
  buildInfoFile: buildInfoPath
132581
132691
  };
132582
132692
  }
132583
- if (!project.options.noEmit && getPendingEmitKind(project.options, incrementalBuildInfo.options || {})) {
132693
+ if ((!project.options.noEmit || project.options.noEmit && getEmitDeclarations(project.options)) && getPendingEmitKindWithSeen(
132694
+ project.options,
132695
+ incrementalBuildInfo.options || {},
132696
+ /*emitOnlyDtsFiles*/
132697
+ void 0,
132698
+ !!project.options.noEmit
132699
+ )) {
132584
132700
  return {
132585
132701
  type: 9 /* OutOfDateOptions */,
132586
132702
  buildInfoFile: buildInfoPath
@@ -141162,7 +141278,7 @@ function getSourceMapper(host) {
141162
141278
  }
141163
141279
  const options = program.getCompilerOptions();
141164
141280
  const outPath = options.outFile;
141165
- const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), currentDirectory, program.getCommonSourceDirectory(), getCanonicalFileName);
141281
+ const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), program);
141166
141282
  if (declarationPath === void 0) return void 0;
141167
141283
  const newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info);
141168
141284
  return newLoc === info ? void 0 : newLoc;
@@ -179210,7 +179326,7 @@ __export(ts_exports2, {
179210
179326
  getPathUpdater: () => getPathUpdater,
179211
179327
  getPathsBasePath: () => getPathsBasePath,
179212
179328
  getPatternFromSpec: () => getPatternFromSpec,
179213
- getPendingEmitKind: () => getPendingEmitKind,
179329
+ getPendingEmitKindWithSeen: () => getPendingEmitKindWithSeen,
179214
179330
  getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter,
179215
179331
  getPossibleGenericSignatures: () => getPossibleGenericSignatures,
179216
179332
  getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension,
@@ -183176,7 +183292,7 @@ var Project2 = class _Project {
183176
183292
  this.generatedFilesMap.forEach((watcher, source) => {
183177
183293
  const sourceFile = this.program.getSourceFileByPath(source);
183178
183294
  if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher(
183179
- getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.currentDirectory, this.program.getCommonSourceDirectory(), this.getCanonicalFileName),
183295
+ getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.program),
183180
183296
  watcher
183181
183297
  )) {
183182
183298
  closeFileWatcherOf(watcher);
@@ -193566,7 +193682,7 @@ if (typeof console !== "undefined") {
193566
193682
  getPathUpdater,
193567
193683
  getPathsBasePath,
193568
193684
  getPatternFromSpec,
193569
- getPendingEmitKind,
193685
+ getPendingEmitKindWithSeen,
193570
193686
  getPositionOfLineAndCharacter,
193571
193687
  getPossibleGenericSignatures,
193572
193688
  getPossibleOriginalInputExtensionForExtension,