typescript 5.6.0-dev.20240612 → 5.6.0-dev.20240613

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 +84 -73
  2. package/lib/typescript.js +157 -152
  3. package/package.json +2 -2
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.6";
21
- var version = `${versionMajorMinor}.0-dev.20240612`;
21
+ var version = `${versionMajorMinor}.0-dev.20240613`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6875,6 +6875,7 @@ var Diagnostics = {
6875
6875
  Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."),
6876
6876
  Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),
6877
6877
  Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),
6878
+ Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b: diag(5111, 1 /* Error */, "Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111", "Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'."),
6878
6879
  Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
6879
6880
  Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
6880
6881
  Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
@@ -18336,9 +18337,9 @@ function rangeOfTypeParameters(sourceFile, typeParameters) {
18336
18337
  return { pos, end };
18337
18338
  }
18338
18339
  function skipTypeChecking(sourceFile, options, host) {
18339
- return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnsotics(sourceFile, options);
18340
+ return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
18340
18341
  }
18341
- function canIncludeBindAndCheckDiagnsotics(sourceFile, options) {
18342
+ function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
18342
18343
  if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
18343
18344
  if (sourceFile.scriptKind === 3 /* TS */ || sourceFile.scriptKind === 4 /* TSX */ || sourceFile.scriptKind === 5 /* External */) return true;
18344
18345
  const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;
@@ -19189,7 +19190,7 @@ function createNameResolver({
19189
19190
  }
19190
19191
  break;
19191
19192
  }
19192
- if (isSelfReferenceLocation(location)) {
19193
+ if (isSelfReferenceLocation(location, lastLocation)) {
19193
19194
  lastSelfReferenceLocation = location;
19194
19195
  }
19195
19196
  lastLocation = location;
@@ -19290,8 +19291,10 @@ function createNameResolver({
19290
19291
  }
19291
19292
  return !getImmediatelyInvokedFunctionExpression(location);
19292
19293
  }
19293
- function isSelfReferenceLocation(node) {
19294
+ function isSelfReferenceLocation(node, lastLocation) {
19294
19295
  switch (node.kind) {
19296
+ case 169 /* Parameter */:
19297
+ return !!lastLocation && lastLocation === node.name;
19295
19298
  case 262 /* FunctionDeclaration */:
19296
19299
  case 263 /* ClassDeclaration */:
19297
19300
  case 264 /* InterfaceDeclaration */:
@@ -82458,23 +82461,22 @@ function createTypeChecker(host) {
82458
82461
  hasAbstractModifier(member),
82459
82462
  isStatic(member),
82460
82463
  memberIsParameterProperty,
82461
- symbolName(declaredProp),
82464
+ declaredProp,
82462
82465
  reportErrors2 ? member : void 0
82463
82466
  );
82464
82467
  }
82465
- function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) {
82468
+ function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {
82466
82469
  const isJs = isInJSFile(node);
82467
82470
  const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);
82468
82471
  if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
82469
- const memberEscapedName = escapeLeadingUnderscores(memberName);
82470
82472
  const thisType = memberIsStatic ? staticType : typeWithThis;
82471
82473
  const baseType = memberIsStatic ? baseStaticType : baseWithThis;
82472
- const prop = getPropertyOfType(thisType, memberEscapedName);
82473
- const baseProp = getPropertyOfType(baseType, memberEscapedName);
82474
+ const prop = getPropertyOfType(thisType, member.escapedName);
82475
+ const baseProp = getPropertyOfType(baseType, member.escapedName);
82474
82476
  const baseClassName = typeToString(baseWithThis);
82475
82477
  if (prop && !baseProp && memberHasOverrideModifier) {
82476
82478
  if (errorNode) {
82477
- const suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType);
82479
+ const suggestion = getSuggestedSymbolForNonexistentClassMember(symbolName(member), baseType);
82478
82480
  suggestion ? error(
82479
82481
  errorNode,
82480
82482
  isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,
@@ -82591,7 +82593,7 @@ function createTypeChecker(host) {
82591
82593
  isStatic(member),
82592
82594
  /*memberIsParameterProperty*/
82593
82595
  false,
82594
- symbolName(memberSymbol)
82596
+ memberSymbol
82595
82597
  );
82596
82598
  }
82597
82599
  function getTargetSymbol(s) {
@@ -85200,7 +85202,7 @@ function createTypeChecker(host) {
85200
85202
  return !!(getNodeCheckFlags(node) & flag);
85201
85203
  }
85202
85204
  function calculateNodeCheckFlagWorker(node, flag) {
85203
- if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnsotics(getSourceFileOfNode(node), compilerOptions)) {
85205
+ if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnostics(getSourceFileOfNode(node), compilerOptions)) {
85204
85206
  return;
85205
85207
  }
85206
85208
  const links = getNodeLinks(node);
@@ -112930,7 +112932,7 @@ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, forceDt
112930
112932
  }
112931
112933
  function getTsBuildInfoEmitOutputFilePath(options) {
112932
112934
  const configFile = options.configFilePath;
112933
- if (!isIncrementalCompilation(options)) return void 0;
112935
+ if (!canEmitTsBuildInfo(options)) return void 0;
112934
112936
  if (options.tsBuildInfoFile) return options.tsBuildInfoFile;
112935
112937
  const outPath = options.outFile;
112936
112938
  let buildInfoExtensionLess;
@@ -112948,6 +112950,9 @@ function getTsBuildInfoEmitOutputFilePath(options) {
112948
112950
  }
112949
112951
  return buildInfoExtensionLess + ".tsbuildinfo" /* TsBuildInfo */;
112950
112952
  }
112953
+ function canEmitTsBuildInfo(options) {
112954
+ return isIncrementalCompilation(options) || !!options.tscBuild;
112955
+ }
112951
112956
  function getOutputPathsForBundle(options, forceDtsPaths) {
112952
112957
  const outPath = options.outFile;
112953
112958
  const jsFilePath = options.emitDeclarationOnly ? void 0 : outPath;
@@ -113173,7 +113178,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
113173
113178
  }
113174
113179
  (isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(
113175
113180
  (sourceFile) => {
113176
- if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);
113181
+ if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);
113177
113182
  }
113178
113183
  );
113179
113184
  const transform = transformNodes(
@@ -113226,7 +113231,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
113226
113231
  const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
113227
113232
  const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
113228
113233
  filesForEmit.forEach((sourceFile) => {
113229
- if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) {
113234
+ if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) {
113230
113235
  collectLinkedAliases(sourceFile);
113231
113236
  }
113232
113237
  });
@@ -118984,7 +118989,13 @@ function getConfigFileParsingDiagnostics(configFileParseResult) {
118984
118989
  return configFileParseResult.options.configFile ? [...configFileParseResult.options.configFile.parseDiagnostics, ...configFileParseResult.errors] : configFileParseResult.errors;
118985
118990
  }
118986
118991
  function getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options) {
118987
- return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0;
118992
+ switch (getEmitModuleResolutionKind(options)) {
118993
+ case 3 /* Node16 */:
118994
+ case 99 /* NodeNext */:
118995
+ return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0;
118996
+ default:
118997
+ return void 0;
118998
+ }
118988
118999
  function lookupFromPackageJson() {
118989
119000
  const state = getTemporaryModuleResolutionState(packageJsonInfoCache, host, options);
118990
119001
  const packageJsonLocations = [];
@@ -121401,8 +121412,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121401
121412
  }
121402
121413
  const outputFile = options.outFile;
121403
121414
  if (options.tsBuildInfoFile) {
121404
- if (!isIncrementalCompilation(options)) {
121405
- createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "tsBuildInfoFile", "incremental", "composite");
121415
+ if (!canEmitTsBuildInfo(options)) {
121416
+ createDiagnosticForOptionName(Diagnostics.Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b, "tsBuildInfoFile");
121406
121417
  }
121407
121418
  } else if (options.incremental && !outputFile && !options.configFilePath) {
121408
121419
  programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
@@ -122855,7 +122866,7 @@ function createBuilderProgramState(newProgram, oldState) {
122855
122866
  canCopyEmitDiagnostics = false;
122856
122867
  }
122857
122868
  } else {
122858
- state.buildInfoEmitPending = true;
122869
+ state.buildInfoEmitPending = isIncrementalCompilation(compilerOptions);
122859
122870
  }
122860
122871
  const referencedMap = state.referencedMap;
122861
122872
  const oldReferencedMap = useOldState ? oldState.referencedMap : void 0;
@@ -123345,6 +123356,7 @@ function getBuildInfo2(state) {
123345
123356
  const fileNames = [];
123346
123357
  const fileNameToFileId = /* @__PURE__ */ new Map();
123347
123358
  const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName)));
123359
+ if (!isIncrementalCompilation(state.compilerOptions)) return { version };
123348
123360
  const root = [];
123349
123361
  if (state.compilerOptions.outFile) {
123350
123362
  const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
@@ -123352,7 +123364,7 @@ function getBuildInfo2(state) {
123352
123364
  tryAddRoot(key, fileId);
123353
123365
  return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
123354
123366
  });
123355
- return {
123367
+ const buildInfo2 = {
123356
123368
  fileNames,
123357
123369
  fileInfos: fileInfos2,
123358
123370
  root,
@@ -123373,6 +123385,7 @@ function getBuildInfo2(state) {
123373
123385
  // Actual value
123374
123386
  version
123375
123387
  };
123388
+ return buildInfo2;
123376
123389
  }
123377
123390
  let fileIdsList;
123378
123391
  let fileNamesToFileIdListId;
@@ -123451,7 +123464,7 @@ function getBuildInfo2(state) {
123451
123464
  }
123452
123465
  }
123453
123466
  }
123454
- return {
123467
+ const buildInfo = {
123455
123468
  fileNames,
123456
123469
  fileIdsList,
123457
123470
  fileInfos,
@@ -123467,6 +123480,7 @@ function getBuildInfo2(state) {
123467
123480
  latestChangedDtsFile,
123468
123481
  version
123469
123482
  };
123483
+ return buildInfo;
123470
123484
  function relativeToBuildInfoEnsuringAbsolutePath(path) {
123471
123485
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
123472
123486
  }
@@ -126672,7 +126686,6 @@ function resolveConfigFileProjectName(project) {
126672
126686
 
126673
126687
  // src/compiler/tsbuildPublic.ts
126674
126688
  var minimumDate = /* @__PURE__ */ new Date(-864e13);
126675
- var maximumDate = /* @__PURE__ */ new Date(864e13);
126676
126689
  function getOrCreateValueFromConfigFileMap(configFileMap, resolved, createT) {
126677
126690
  const existingValue = configFileMap.get(resolved);
126678
126691
  let newValue;
@@ -126727,6 +126740,7 @@ function getCompilerOptionsOfBuildOptions(buildOptions) {
126727
126740
  commonOptionsWithBuild.forEach((option) => {
126728
126741
  if (hasProperty(buildOptions, option.name)) result[option.name] = buildOptions[option.name];
126729
126742
  });
126743
+ result.tscBuild = true;
126730
126744
  return result;
126731
126745
  }
126732
126746
  function createSolutionBuilder(host, rootNames, defaultOptions) {
@@ -127689,62 +127703,57 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
127689
127703
  if (force) return { type: 16 /* ForceBuild */ };
127690
127704
  const { host } = state;
127691
127705
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
127692
- let oldestOutputFileName;
127693
- let oldestOutputFileTime = maximumDate;
127694
- let buildInfoTime;
127695
- let incrementalBuildInfo;
127696
- let buildInfoVersionMap;
127697
- if (buildInfoPath) {
127698
- const buildInfoCacheEntry2 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
127699
- buildInfoTime = (buildInfoCacheEntry2 == null ? void 0 : buildInfoCacheEntry2.modifiedTime) || getModifiedTime(host, buildInfoPath);
127700
- if (buildInfoTime === missingFileModifiedTime) {
127701
- if (!buildInfoCacheEntry2) {
127702
- state.buildInfoCache.set(resolvedPath, {
127703
- path: toPath2(state, buildInfoPath),
127704
- buildInfo: false,
127705
- modifiedTime: buildInfoTime
127706
- });
127707
- }
127708
- return {
127709
- type: 3 /* OutputMissing */,
127710
- missingOutputFileName: buildInfoPath
127711
- };
127706
+ const isIncremental = isIncrementalCompilation(project.options);
127707
+ let buildInfoCacheEntry = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
127708
+ const buildInfoTime = (buildInfoCacheEntry == null ? void 0 : buildInfoCacheEntry.modifiedTime) || getModifiedTime(host, buildInfoPath);
127709
+ if (buildInfoTime === missingFileModifiedTime) {
127710
+ if (!buildInfoCacheEntry) {
127711
+ state.buildInfoCache.set(resolvedPath, {
127712
+ path: toPath2(state, buildInfoPath),
127713
+ buildInfo: false,
127714
+ modifiedTime: buildInfoTime
127715
+ });
127712
127716
  }
127713
- const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime);
127714
- if (!buildInfo) {
127717
+ return {
127718
+ type: 3 /* OutputMissing */,
127719
+ missingOutputFileName: buildInfoPath
127720
+ };
127721
+ }
127722
+ const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime);
127723
+ if (!buildInfo) {
127724
+ return {
127725
+ type: 4 /* ErrorReadingFile */,
127726
+ fileName: buildInfoPath
127727
+ };
127728
+ }
127729
+ const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0;
127730
+ if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version) {
127731
+ return {
127732
+ type: 13 /* TsVersionOutputOfDate */,
127733
+ version: buildInfo.version
127734
+ };
127735
+ }
127736
+ if (incrementalBuildInfo) {
127737
+ if (((_a = incrementalBuildInfo.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? ((_b = incrementalBuildInfo.affectedFilesPendingEmit) == null ? void 0 : _b.length) || ((_c = incrementalBuildInfo.emitDiagnosticsPerFile) == null ? void 0 : _c.length) || incrementalBuildInfo.pendingEmit !== void 0 : (_d = incrementalBuildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _d.length)) {
127715
127738
  return {
127716
- type: 4 /* ErrorReadingFile */,
127717
- fileName: buildInfoPath
127739
+ type: 7 /* OutOfDateBuildInfo */,
127740
+ buildInfoFile: buildInfoPath
127718
127741
  };
127719
127742
  }
127720
- if (isIncrementalBuildInfo(buildInfo) && buildInfo.version !== version) {
127743
+ if (!project.options.noEmit && getPendingEmitKind(project.options, incrementalBuildInfo.options || {})) {
127721
127744
  return {
127722
- type: 13 /* TsVersionOutputOfDate */,
127723
- version: buildInfo.version
127745
+ type: 8 /* OutOfDateOptions */,
127746
+ buildInfoFile: buildInfoPath
127724
127747
  };
127725
127748
  }
127726
- if (isIncrementalBuildInfo(buildInfo)) {
127727
- if (((_a = buildInfo.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? ((_b = buildInfo.affectedFilesPendingEmit) == null ? void 0 : _b.length) || ((_c = buildInfo.emitDiagnosticsPerFile) == null ? void 0 : _c.length) || buildInfo.pendingEmit !== void 0 : (_d = buildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _d.length)) {
127728
- return {
127729
- type: 7 /* OutOfDateBuildInfo */,
127730
- buildInfoFile: buildInfoPath
127731
- };
127732
- }
127733
- if (!project.options.noEmit && getPendingEmitKind(project.options, buildInfo.options || {})) {
127734
- return {
127735
- type: 8 /* OutOfDateOptions */,
127736
- buildInfoFile: buildInfoPath
127737
- };
127738
- }
127739
- incrementalBuildInfo = buildInfo;
127740
- }
127741
- oldestOutputFileTime = buildInfoTime;
127742
- oldestOutputFileName = buildInfoPath;
127743
127749
  }
127750
+ let oldestOutputFileTime = buildInfoTime;
127751
+ let oldestOutputFileName = buildInfoPath;
127744
127752
  let newestInputFileName = void 0;
127745
127753
  let newestInputFileTime = minimumDate;
127746
127754
  let pseudoInputUpToDate = false;
127747
127755
  const seenRoots = /* @__PURE__ */ new Set();
127756
+ let buildInfoVersionMap;
127748
127757
  for (const inputFile of project.fileNames) {
127749
127758
  const inputTime = getModifiedTime2(state, inputFile);
127750
127759
  if (inputTime === missingFileModifiedTime) {
@@ -127754,7 +127763,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
127754
127763
  };
127755
127764
  }
127756
127765
  const inputPath = incrementalBuildInfo ? toPath2(state, inputFile) : void 0;
127757
- if (buildInfoTime && buildInfoTime < inputTime) {
127766
+ if (buildInfoTime < inputTime) {
127758
127767
  let version2;
127759
127768
  let currentVersion;
127760
127769
  if (incrementalBuildInfo) {
@@ -127794,10 +127803,11 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
127794
127803
  };
127795
127804
  }
127796
127805
  }
127797
- if (!buildInfoPath) {
127806
+ if (!isIncremental) {
127798
127807
  const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
127799
127808
  const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
127800
127809
  for (const output of outputs) {
127810
+ if (output === buildInfoPath) continue;
127801
127811
  const path = toPath2(state, output);
127802
127812
  let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path);
127803
127813
  if (!outputTime) {
@@ -127823,14 +127833,13 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
127823
127833
  }
127824
127834
  }
127825
127835
  }
127826
- const buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath);
127827
127836
  let pseudoUpToDate = false;
127828
127837
  if (referenceStatuses) {
127829
127838
  for (const { ref, refStatus, resolvedConfig, resolvedRefPath } of referenceStatuses) {
127830
127839
  if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
127831
127840
  continue;
127832
127841
  }
127833
- if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, resolvedRefPath)) {
127842
+ if (hasSameBuildInfo(state, buildInfoCacheEntry ?? (buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath)), resolvedRefPath)) {
127834
127843
  return {
127835
127844
  type: 6 /* OutOfDateWithUpstream */,
127836
127845
  outOfDateOutputFileName: buildInfoPath,
@@ -127890,7 +127899,8 @@ function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage,
127890
127899
  if (proj.options.noEmit) return;
127891
127900
  let now;
127892
127901
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(proj.options);
127893
- if (buildInfoPath) {
127902
+ const isIncremental = isIncrementalCompilation(proj.options);
127903
+ if (buildInfoPath && isIncremental) {
127894
127904
  if (!(skipOutputs == null ? void 0 : skipOutputs.has(toPath2(state, buildInfoPath)))) {
127895
127905
  if (!!state.options.verbose) reportStatus(state, verboseMessage, proj.options.configFilePath);
127896
127906
  state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
@@ -127913,7 +127923,8 @@ function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage,
127913
127923
  reportStatus(state, verboseMessage, proj.options.configFilePath);
127914
127924
  }
127915
127925
  host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
127916
- if (outputTimeStampMap) {
127926
+ if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
127927
+ else if (outputTimeStampMap) {
127917
127928
  outputTimeStampMap.set(path, now);
127918
127929
  modifiedOutputs.add(path);
127919
127930
  }
package/lib/typescript.js CHANGED
@@ -248,6 +248,7 @@ __export(typescript_exports, {
248
248
  buildOverload: () => buildOverload,
249
249
  bundlerModuleNameResolver: () => bundlerModuleNameResolver,
250
250
  canBeConvertedToAsync: () => canBeConvertedToAsync,
251
+ canEmitTsBuildInfo: () => canEmitTsBuildInfo,
251
252
  canHaveDecorators: () => canHaveDecorators,
252
253
  canHaveExportModifier: () => canHaveExportModifier,
253
254
  canHaveFlowNode: () => canHaveFlowNode,
@@ -260,7 +261,7 @@ __export(typescript_exports, {
260
261
  canHaveModifiers: () => canHaveModifiers,
261
262
  canHaveModuleSpecifier: () => canHaveModuleSpecifier,
262
263
  canHaveSymbol: () => canHaveSymbol,
263
- canIncludeBindAndCheckDiagnsotics: () => canIncludeBindAndCheckDiagnsotics,
264
+ canIncludeBindAndCheckDiagnostics: () => canIncludeBindAndCheckDiagnostics,
264
265
  canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,
265
266
  canProduceDiagnostics: () => canProduceDiagnostics,
266
267
  canUsePropertyAccess: () => canUsePropertyAccess,
@@ -925,7 +926,6 @@ __export(typescript_exports, {
925
926
  getNameOfScriptTarget: () => getNameOfScriptTarget,
926
927
  getNameOrArgument: () => getNameOrArgument,
927
928
  getNameTable: () => getNameTable,
928
- getNamesForExportedSymbol: () => getNamesForExportedSymbol,
929
929
  getNamespaceDeclarationNode: () => getNamespaceDeclarationNode,
930
930
  getNewLineCharacter: () => getNewLineCharacter,
931
931
  getNewLineKind: () => getNewLineKind,
@@ -2375,7 +2375,7 @@ module.exports = __toCommonJS(typescript_exports);
2375
2375
 
2376
2376
  // src/compiler/corePublic.ts
2377
2377
  var versionMajorMinor = "5.6";
2378
- var version = `${versionMajorMinor}.0-dev.20240612`;
2378
+ var version = `${versionMajorMinor}.0-dev.20240613`;
2379
2379
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2380
2380
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2381
2381
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6930,22 +6930,22 @@ var ScriptKind = /* @__PURE__ */ ((ScriptKind7) => {
6930
6930
  ScriptKind7[ScriptKind7["Deferred"] = 7] = "Deferred";
6931
6931
  return ScriptKind7;
6932
6932
  })(ScriptKind || {});
6933
- var ScriptTarget = /* @__PURE__ */ ((ScriptTarget11) => {
6934
- ScriptTarget11[ScriptTarget11["ES3"] = 0] = "ES3";
6935
- ScriptTarget11[ScriptTarget11["ES5"] = 1] = "ES5";
6936
- ScriptTarget11[ScriptTarget11["ES2015"] = 2] = "ES2015";
6937
- ScriptTarget11[ScriptTarget11["ES2016"] = 3] = "ES2016";
6938
- ScriptTarget11[ScriptTarget11["ES2017"] = 4] = "ES2017";
6939
- ScriptTarget11[ScriptTarget11["ES2018"] = 5] = "ES2018";
6940
- ScriptTarget11[ScriptTarget11["ES2019"] = 6] = "ES2019";
6941
- ScriptTarget11[ScriptTarget11["ES2020"] = 7] = "ES2020";
6942
- ScriptTarget11[ScriptTarget11["ES2021"] = 8] = "ES2021";
6943
- ScriptTarget11[ScriptTarget11["ES2022"] = 9] = "ES2022";
6944
- ScriptTarget11[ScriptTarget11["ES2023"] = 10] = "ES2023";
6945
- ScriptTarget11[ScriptTarget11["ESNext"] = 99] = "ESNext";
6946
- ScriptTarget11[ScriptTarget11["JSON"] = 100] = "JSON";
6947
- ScriptTarget11[ScriptTarget11["Latest"] = 99 /* ESNext */] = "Latest";
6948
- return ScriptTarget11;
6933
+ var ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => {
6934
+ ScriptTarget12[ScriptTarget12["ES3"] = 0] = "ES3";
6935
+ ScriptTarget12[ScriptTarget12["ES5"] = 1] = "ES5";
6936
+ ScriptTarget12[ScriptTarget12["ES2015"] = 2] = "ES2015";
6937
+ ScriptTarget12[ScriptTarget12["ES2016"] = 3] = "ES2016";
6938
+ ScriptTarget12[ScriptTarget12["ES2017"] = 4] = "ES2017";
6939
+ ScriptTarget12[ScriptTarget12["ES2018"] = 5] = "ES2018";
6940
+ ScriptTarget12[ScriptTarget12["ES2019"] = 6] = "ES2019";
6941
+ ScriptTarget12[ScriptTarget12["ES2020"] = 7] = "ES2020";
6942
+ ScriptTarget12[ScriptTarget12["ES2021"] = 8] = "ES2021";
6943
+ ScriptTarget12[ScriptTarget12["ES2022"] = 9] = "ES2022";
6944
+ ScriptTarget12[ScriptTarget12["ES2023"] = 10] = "ES2023";
6945
+ ScriptTarget12[ScriptTarget12["ESNext"] = 99] = "ESNext";
6946
+ ScriptTarget12[ScriptTarget12["JSON"] = 100] = "JSON";
6947
+ ScriptTarget12[ScriptTarget12["Latest"] = 99 /* ESNext */] = "Latest";
6948
+ return ScriptTarget12;
6949
6949
  })(ScriptTarget || {});
6950
6950
  var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => {
6951
6951
  LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard";
@@ -10462,6 +10462,7 @@ var Diagnostics = {
10462
10462
  Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."),
10463
10463
  Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),
10464
10464
  Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),
10465
+ Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b: diag(5111, 1 /* Error */, "Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if__5111", "Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'."),
10465
10466
  Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
10466
10467
  Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
10467
10468
  Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
@@ -22554,9 +22555,9 @@ function rangeOfTypeParameters(sourceFile, typeParameters) {
22554
22555
  return { pos, end };
22555
22556
  }
22556
22557
  function skipTypeChecking(sourceFile, options, host) {
22557
- return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnsotics(sourceFile, options);
22558
+ return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
22558
22559
  }
22559
- function canIncludeBindAndCheckDiagnsotics(sourceFile, options) {
22560
+ function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
22560
22561
  if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
22561
22562
  if (sourceFile.scriptKind === 3 /* TS */ || sourceFile.scriptKind === 4 /* TSX */ || sourceFile.scriptKind === 5 /* External */) return true;
22562
22563
  const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;
@@ -23436,7 +23437,7 @@ function createNameResolver({
23436
23437
  }
23437
23438
  break;
23438
23439
  }
23439
- if (isSelfReferenceLocation(location)) {
23440
+ if (isSelfReferenceLocation(location, lastLocation)) {
23440
23441
  lastSelfReferenceLocation = location;
23441
23442
  }
23442
23443
  lastLocation = location;
@@ -23537,8 +23538,10 @@ function createNameResolver({
23537
23538
  }
23538
23539
  return !getImmediatelyInvokedFunctionExpression(location);
23539
23540
  }
23540
- function isSelfReferenceLocation(node) {
23541
+ function isSelfReferenceLocation(node, lastLocation) {
23541
23542
  switch (node.kind) {
23543
+ case 169 /* Parameter */:
23544
+ return !!lastLocation && lastLocation === node.name;
23542
23545
  case 262 /* FunctionDeclaration */:
23543
23546
  case 263 /* ClassDeclaration */:
23544
23547
  case 264 /* InterfaceDeclaration */:
@@ -87231,23 +87234,22 @@ function createTypeChecker(host) {
87231
87234
  hasAbstractModifier(member),
87232
87235
  isStatic(member),
87233
87236
  memberIsParameterProperty,
87234
- symbolName(declaredProp),
87237
+ declaredProp,
87235
87238
  reportErrors2 ? member : void 0
87236
87239
  );
87237
87240
  }
87238
- function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) {
87241
+ function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {
87239
87242
  const isJs = isInJSFile(node);
87240
87243
  const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);
87241
87244
  if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
87242
- const memberEscapedName = escapeLeadingUnderscores(memberName);
87243
87245
  const thisType = memberIsStatic ? staticType : typeWithThis;
87244
87246
  const baseType = memberIsStatic ? baseStaticType : baseWithThis;
87245
- const prop = getPropertyOfType(thisType, memberEscapedName);
87246
- const baseProp = getPropertyOfType(baseType, memberEscapedName);
87247
+ const prop = getPropertyOfType(thisType, member.escapedName);
87248
+ const baseProp = getPropertyOfType(baseType, member.escapedName);
87247
87249
  const baseClassName = typeToString(baseWithThis);
87248
87250
  if (prop && !baseProp && memberHasOverrideModifier) {
87249
87251
  if (errorNode) {
87250
- const suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType);
87252
+ const suggestion = getSuggestedSymbolForNonexistentClassMember(symbolName(member), baseType);
87251
87253
  suggestion ? error2(
87252
87254
  errorNode,
87253
87255
  isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,
@@ -87364,7 +87366,7 @@ function createTypeChecker(host) {
87364
87366
  isStatic(member),
87365
87367
  /*memberIsParameterProperty*/
87366
87368
  false,
87367
- symbolName(memberSymbol)
87369
+ memberSymbol
87368
87370
  );
87369
87371
  }
87370
87372
  function getTargetSymbol(s) {
@@ -89973,7 +89975,7 @@ function createTypeChecker(host) {
89973
89975
  return !!(getNodeCheckFlags(node) & flag);
89974
89976
  }
89975
89977
  function calculateNodeCheckFlagWorker(node, flag) {
89976
- if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnsotics(getSourceFileOfNode(node), compilerOptions)) {
89978
+ if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnostics(getSourceFileOfNode(node), compilerOptions)) {
89977
89979
  return;
89978
89980
  }
89979
89981
  const links = getNodeLinks(node);
@@ -117885,7 +117887,7 @@ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, forceDt
117885
117887
  }
117886
117888
  function getTsBuildInfoEmitOutputFilePath(options) {
117887
117889
  const configFile = options.configFilePath;
117888
- if (!isIncrementalCompilation(options)) return void 0;
117890
+ if (!canEmitTsBuildInfo(options)) return void 0;
117889
117891
  if (options.tsBuildInfoFile) return options.tsBuildInfoFile;
117890
117892
  const outPath = options.outFile;
117891
117893
  let buildInfoExtensionLess;
@@ -117903,6 +117905,9 @@ function getTsBuildInfoEmitOutputFilePath(options) {
117903
117905
  }
117904
117906
  return buildInfoExtensionLess + ".tsbuildinfo" /* TsBuildInfo */;
117905
117907
  }
117908
+ function canEmitTsBuildInfo(options) {
117909
+ return isIncrementalCompilation(options) || !!options.tscBuild;
117910
+ }
117906
117911
  function getOutputPathsForBundle(options, forceDtsPaths) {
117907
117912
  const outPath = options.outFile;
117908
117913
  const jsFilePath = options.emitDeclarationOnly ? void 0 : outPath;
@@ -118139,7 +118144,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
118139
118144
  }
118140
118145
  (isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(
118141
118146
  (sourceFile) => {
118142
- if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);
118147
+ if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);
118143
118148
  }
118144
118149
  );
118145
118150
  const transform2 = transformNodes(
@@ -118192,7 +118197,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
118192
118197
  const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
118193
118198
  const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
118194
118199
  filesForEmit.forEach((sourceFile) => {
118195
- if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) {
118200
+ if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) {
118196
118201
  collectLinkedAliases(sourceFile);
118197
118202
  }
118198
118203
  });
@@ -123996,7 +124001,13 @@ function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, optio
123996
124001
  return typeof result === "object" ? result.impliedNodeFormat : result;
123997
124002
  }
123998
124003
  function getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options) {
123999
- return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0;
124004
+ switch (getEmitModuleResolutionKind(options)) {
124005
+ case 3 /* Node16 */:
124006
+ case 99 /* NodeNext */:
124007
+ return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0;
124008
+ default:
124009
+ return void 0;
124010
+ }
124000
124011
  function lookupFromPackageJson() {
124001
124012
  const state = getTemporaryModuleResolutionState(packageJsonInfoCache, host, options);
124002
124013
  const packageJsonLocations = [];
@@ -126413,8 +126424,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126413
126424
  }
126414
126425
  const outputFile = options.outFile;
126415
126426
  if (options.tsBuildInfoFile) {
126416
- if (!isIncrementalCompilation(options)) {
126417
- createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "tsBuildInfoFile", "incremental", "composite");
126427
+ if (!canEmitTsBuildInfo(options)) {
126428
+ createDiagnosticForOptionName(Diagnostics.Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b, "tsBuildInfoFile");
126418
126429
  }
126419
126430
  } else if (options.incremental && !outputFile && !options.configFilePath) {
126420
126431
  programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
@@ -127893,7 +127904,7 @@ function createBuilderProgramState(newProgram, oldState) {
127893
127904
  canCopyEmitDiagnostics = false;
127894
127905
  }
127895
127906
  } else {
127896
- state.buildInfoEmitPending = true;
127907
+ state.buildInfoEmitPending = isIncrementalCompilation(compilerOptions);
127897
127908
  }
127898
127909
  const referencedMap = state.referencedMap;
127899
127910
  const oldReferencedMap = useOldState ? oldState.referencedMap : void 0;
@@ -128383,6 +128394,7 @@ function getBuildInfo2(state) {
128383
128394
  const fileNames = [];
128384
128395
  const fileNameToFileId = /* @__PURE__ */ new Map();
128385
128396
  const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName)));
128397
+ if (!isIncrementalCompilation(state.compilerOptions)) return { version };
128386
128398
  const root = [];
128387
128399
  if (state.compilerOptions.outFile) {
128388
128400
  const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
@@ -128390,7 +128402,7 @@ function getBuildInfo2(state) {
128390
128402
  tryAddRoot(key, fileId);
128391
128403
  return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
128392
128404
  });
128393
- return {
128405
+ const buildInfo2 = {
128394
128406
  fileNames,
128395
128407
  fileInfos: fileInfos2,
128396
128408
  root,
@@ -128411,6 +128423,7 @@ function getBuildInfo2(state) {
128411
128423
  // Actual value
128412
128424
  version
128413
128425
  };
128426
+ return buildInfo2;
128414
128427
  }
128415
128428
  let fileIdsList;
128416
128429
  let fileNamesToFileIdListId;
@@ -128489,7 +128502,7 @@ function getBuildInfo2(state) {
128489
128502
  }
128490
128503
  }
128491
128504
  }
128492
- return {
128505
+ const buildInfo = {
128493
128506
  fileNames,
128494
128507
  fileIdsList,
128495
128508
  fileInfos,
@@ -128505,6 +128518,7 @@ function getBuildInfo2(state) {
128505
128518
  latestChangedDtsFile,
128506
128519
  version
128507
128520
  };
128521
+ return buildInfo;
128508
128522
  function relativeToBuildInfoEnsuringAbsolutePath(path) {
128509
128523
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
128510
128524
  }
@@ -131790,7 +131804,6 @@ function resolveConfigFileProjectName(project) {
131790
131804
 
131791
131805
  // src/compiler/tsbuildPublic.ts
131792
131806
  var minimumDate = /* @__PURE__ */ new Date(-864e13);
131793
- var maximumDate = /* @__PURE__ */ new Date(864e13);
131794
131807
  function getOrCreateValueFromConfigFileMap(configFileMap, resolved, createT) {
131795
131808
  const existingValue = configFileMap.get(resolved);
131796
131809
  let newValue;
@@ -131845,6 +131858,7 @@ function getCompilerOptionsOfBuildOptions(buildOptions) {
131845
131858
  commonOptionsWithBuild.forEach((option) => {
131846
131859
  if (hasProperty(buildOptions, option.name)) result[option.name] = buildOptions[option.name];
131847
131860
  });
131861
+ result.tscBuild = true;
131848
131862
  return result;
131849
131863
  }
131850
131864
  function createSolutionBuilder(host, rootNames, defaultOptions) {
@@ -132812,62 +132826,57 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
132812
132826
  if (force) return { type: 16 /* ForceBuild */ };
132813
132827
  const { host } = state;
132814
132828
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
132815
- let oldestOutputFileName;
132816
- let oldestOutputFileTime = maximumDate;
132817
- let buildInfoTime;
132818
- let incrementalBuildInfo;
132819
- let buildInfoVersionMap;
132820
- if (buildInfoPath) {
132821
- const buildInfoCacheEntry2 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
132822
- buildInfoTime = (buildInfoCacheEntry2 == null ? void 0 : buildInfoCacheEntry2.modifiedTime) || getModifiedTime(host, buildInfoPath);
132823
- if (buildInfoTime === missingFileModifiedTime) {
132824
- if (!buildInfoCacheEntry2) {
132825
- state.buildInfoCache.set(resolvedPath, {
132826
- path: toPath2(state, buildInfoPath),
132827
- buildInfo: false,
132828
- modifiedTime: buildInfoTime
132829
- });
132830
- }
132831
- return {
132832
- type: 3 /* OutputMissing */,
132833
- missingOutputFileName: buildInfoPath
132834
- };
132829
+ const isIncremental = isIncrementalCompilation(project.options);
132830
+ let buildInfoCacheEntry = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
132831
+ const buildInfoTime = (buildInfoCacheEntry == null ? void 0 : buildInfoCacheEntry.modifiedTime) || getModifiedTime(host, buildInfoPath);
132832
+ if (buildInfoTime === missingFileModifiedTime) {
132833
+ if (!buildInfoCacheEntry) {
132834
+ state.buildInfoCache.set(resolvedPath, {
132835
+ path: toPath2(state, buildInfoPath),
132836
+ buildInfo: false,
132837
+ modifiedTime: buildInfoTime
132838
+ });
132835
132839
  }
132836
- const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime);
132837
- if (!buildInfo) {
132840
+ return {
132841
+ type: 3 /* OutputMissing */,
132842
+ missingOutputFileName: buildInfoPath
132843
+ };
132844
+ }
132845
+ const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime);
132846
+ if (!buildInfo) {
132847
+ return {
132848
+ type: 4 /* ErrorReadingFile */,
132849
+ fileName: buildInfoPath
132850
+ };
132851
+ }
132852
+ const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0;
132853
+ if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version) {
132854
+ return {
132855
+ type: 13 /* TsVersionOutputOfDate */,
132856
+ version: buildInfo.version
132857
+ };
132858
+ }
132859
+ if (incrementalBuildInfo) {
132860
+ if (((_a = incrementalBuildInfo.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? ((_b = incrementalBuildInfo.affectedFilesPendingEmit) == null ? void 0 : _b.length) || ((_c = incrementalBuildInfo.emitDiagnosticsPerFile) == null ? void 0 : _c.length) || incrementalBuildInfo.pendingEmit !== void 0 : (_d = incrementalBuildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _d.length)) {
132838
132861
  return {
132839
- type: 4 /* ErrorReadingFile */,
132840
- fileName: buildInfoPath
132862
+ type: 7 /* OutOfDateBuildInfo */,
132863
+ buildInfoFile: buildInfoPath
132841
132864
  };
132842
132865
  }
132843
- if (isIncrementalBuildInfo(buildInfo) && buildInfo.version !== version) {
132866
+ if (!project.options.noEmit && getPendingEmitKind(project.options, incrementalBuildInfo.options || {})) {
132844
132867
  return {
132845
- type: 13 /* TsVersionOutputOfDate */,
132846
- version: buildInfo.version
132868
+ type: 8 /* OutOfDateOptions */,
132869
+ buildInfoFile: buildInfoPath
132847
132870
  };
132848
132871
  }
132849
- if (isIncrementalBuildInfo(buildInfo)) {
132850
- if (((_a = buildInfo.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? ((_b = buildInfo.affectedFilesPendingEmit) == null ? void 0 : _b.length) || ((_c = buildInfo.emitDiagnosticsPerFile) == null ? void 0 : _c.length) || buildInfo.pendingEmit !== void 0 : (_d = buildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _d.length)) {
132851
- return {
132852
- type: 7 /* OutOfDateBuildInfo */,
132853
- buildInfoFile: buildInfoPath
132854
- };
132855
- }
132856
- if (!project.options.noEmit && getPendingEmitKind(project.options, buildInfo.options || {})) {
132857
- return {
132858
- type: 8 /* OutOfDateOptions */,
132859
- buildInfoFile: buildInfoPath
132860
- };
132861
- }
132862
- incrementalBuildInfo = buildInfo;
132863
- }
132864
- oldestOutputFileTime = buildInfoTime;
132865
- oldestOutputFileName = buildInfoPath;
132866
132872
  }
132873
+ let oldestOutputFileTime = buildInfoTime;
132874
+ let oldestOutputFileName = buildInfoPath;
132867
132875
  let newestInputFileName = void 0;
132868
132876
  let newestInputFileTime = minimumDate;
132869
132877
  let pseudoInputUpToDate = false;
132870
132878
  const seenRoots = /* @__PURE__ */ new Set();
132879
+ let buildInfoVersionMap;
132871
132880
  for (const inputFile of project.fileNames) {
132872
132881
  const inputTime = getModifiedTime2(state, inputFile);
132873
132882
  if (inputTime === missingFileModifiedTime) {
@@ -132877,7 +132886,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
132877
132886
  };
132878
132887
  }
132879
132888
  const inputPath = incrementalBuildInfo ? toPath2(state, inputFile) : void 0;
132880
- if (buildInfoTime && buildInfoTime < inputTime) {
132889
+ if (buildInfoTime < inputTime) {
132881
132890
  let version2;
132882
132891
  let currentVersion;
132883
132892
  if (incrementalBuildInfo) {
@@ -132917,10 +132926,11 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
132917
132926
  };
132918
132927
  }
132919
132928
  }
132920
- if (!buildInfoPath) {
132929
+ if (!isIncremental) {
132921
132930
  const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
132922
132931
  const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
132923
132932
  for (const output of outputs) {
132933
+ if (output === buildInfoPath) continue;
132924
132934
  const path = toPath2(state, output);
132925
132935
  let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path);
132926
132936
  if (!outputTime) {
@@ -132946,14 +132956,13 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
132946
132956
  }
132947
132957
  }
132948
132958
  }
132949
- const buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath);
132950
132959
  let pseudoUpToDate = false;
132951
132960
  if (referenceStatuses) {
132952
132961
  for (const { ref, refStatus, resolvedConfig, resolvedRefPath } of referenceStatuses) {
132953
132962
  if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
132954
132963
  continue;
132955
132964
  }
132956
- if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, resolvedRefPath)) {
132965
+ if (hasSameBuildInfo(state, buildInfoCacheEntry ?? (buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath)), resolvedRefPath)) {
132957
132966
  return {
132958
132967
  type: 6 /* OutOfDateWithUpstream */,
132959
132968
  outOfDateOutputFileName: buildInfoPath,
@@ -133013,7 +133022,8 @@ function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage,
133013
133022
  if (proj.options.noEmit) return;
133014
133023
  let now;
133015
133024
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(proj.options);
133016
- if (buildInfoPath) {
133025
+ const isIncremental = isIncrementalCompilation(proj.options);
133026
+ if (buildInfoPath && isIncremental) {
133017
133027
  if (!(skipOutputs == null ? void 0 : skipOutputs.has(toPath2(state, buildInfoPath)))) {
133018
133028
  if (!!state.options.verbose) reportStatus(state, verboseMessage, proj.options.configFilePath);
133019
133029
  state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
@@ -133036,7 +133046,8 @@ function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage,
133036
133046
  reportStatus(state, verboseMessage, proj.options.configFilePath);
133037
133047
  }
133038
133048
  host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
133039
- if (outputTimeStampMap) {
133049
+ if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
133050
+ else if (outputTimeStampMap) {
133040
133051
  outputTimeStampMap.set(path, now);
133041
133052
  modifiedOutputs.add(path);
133042
133053
  }
@@ -138354,36 +138365,12 @@ function mapOneOrMany(valueOrArray, f, resultSelector = identity) {
138354
138365
  function firstOrOnly(valueOrArray) {
138355
138366
  return isArray(valueOrArray) ? first(valueOrArray) : valueOrArray;
138356
138367
  }
138357
- function getNamesForExportedSymbol(symbol, scriptTarget) {
138358
- if (needsNameFromDeclaration(symbol)) {
138359
- const fromDeclaration = getDefaultLikeExportNameFromDeclaration(symbol);
138360
- if (fromDeclaration) return fromDeclaration;
138361
- const fileNameCase = moduleSymbolToValidIdentifier(
138362
- getSymbolParentOrFail(symbol),
138363
- scriptTarget,
138364
- /*forceCapitalize*/
138365
- false
138366
- );
138367
- const capitalized = moduleSymbolToValidIdentifier(
138368
- getSymbolParentOrFail(symbol),
138369
- scriptTarget,
138370
- /*forceCapitalize*/
138371
- true
138372
- );
138373
- if (fileNameCase === capitalized) return fileNameCase;
138374
- return [fileNameCase, capitalized];
138375
- }
138376
- return symbol.name;
138377
- }
138378
138368
  function getNameForExportedSymbol(symbol, scriptTarget, preferCapitalized) {
138379
- if (needsNameFromDeclaration(symbol)) {
138369
+ if (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */) {
138380
138370
  return getDefaultLikeExportNameFromDeclaration(symbol) || moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, !!preferCapitalized);
138381
138371
  }
138382
138372
  return symbol.name;
138383
138373
  }
138384
- function needsNameFromDeclaration(symbol) {
138385
- return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */);
138386
- }
138387
138374
  function getDefaultLikeExportNameFromDeclaration(symbol) {
138388
138375
  return firstDefined(symbol.declarations, (d) => {
138389
138376
  var _a, _b, _c;
@@ -138674,6 +138661,7 @@ function createCacheableExportInfoMap(host) {
138674
138661
  const namedSymbol = isDefault && getLocalSymbolForExportDefault(symbol) || symbol;
138675
138662
  const names = exportKind === 0 /* Named */ || isExternalModuleSymbol(namedSymbol) ? unescapeLeadingUnderscores(symbolTableKey) : getNamesForExportedSymbol(
138676
138663
  namedSymbol,
138664
+ checker,
138677
138665
  /*scriptTarget*/
138678
138666
  void 0
138679
138667
  );
@@ -138998,7 +138986,15 @@ function getDefaultLikeExportInfo(moduleSymbol, checker) {
138998
138986
  function isImportableSymbol(symbol, checker) {
138999
138987
  return !checker.isUndefinedSymbol(symbol) && !checker.isUnknownSymbol(symbol) && !isKnownSymbol(symbol) && !isPrivateIdentifierSymbol(symbol);
139000
138988
  }
139001
- function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, preferCapitalizedNames, cb) {
138989
+ function getNamesForExportedSymbol(defaultExport, checker, scriptTarget) {
138990
+ let names;
138991
+ forEachNameOfDefaultExport(defaultExport, checker, scriptTarget, (name, capitalizedName) => {
138992
+ names = capitalizedName ? [name, capitalizedName] : name;
138993
+ return true;
138994
+ });
138995
+ return Debug.checkDefined(names);
138996
+ }
138997
+ function forEachNameOfDefaultExport(defaultExport, checker, scriptTarget, cb) {
139002
138998
  let chain;
139003
138999
  let current = defaultExport;
139004
139000
  while (current) {
@@ -139016,7 +139012,20 @@ function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, pre
139016
139012
  }
139017
139013
  for (const symbol of chain ?? emptyArray) {
139018
139014
  if (symbol.parent && isExternalModuleSymbol(symbol.parent)) {
139019
- const final = cb(moduleSymbolToValidIdentifier(symbol.parent, getEmitScriptTarget(compilerOptions), preferCapitalizedNames));
139015
+ const final = cb(
139016
+ moduleSymbolToValidIdentifier(
139017
+ symbol.parent,
139018
+ scriptTarget,
139019
+ /*forceCapitalize*/
139020
+ false
139021
+ ),
139022
+ moduleSymbolToValidIdentifier(
139023
+ symbol.parent,
139024
+ scriptTarget,
139025
+ /*forceCapitalize*/
139026
+ true
139027
+ )
139028
+ );
139020
139029
  if (final) return final;
139021
139030
  }
139022
139031
  }
@@ -155192,14 +155201,7 @@ function getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUs
155192
155201
  const exportEquals = checker.resolveExternalModuleSymbol(exportInfo2.moduleSymbol);
155193
155202
  let namespacePrefix;
155194
155203
  if (exportEquals !== exportInfo2.moduleSymbol) {
155195
- namespacePrefix = forEachNameOfDefaultExport(
155196
- exportEquals,
155197
- checker,
155198
- compilerOptions,
155199
- /*preferCapitalizedNames*/
155200
- false,
155201
- identity
155202
- );
155204
+ namespacePrefix = forEachNameOfDefaultExport(exportEquals, checker, getEmitScriptTarget(compilerOptions), identity);
155203
155205
  }
155204
155206
  namespacePrefix || (namespacePrefix = moduleSymbolToValidIdentifier(
155205
155207
  exportInfo2.moduleSymbol,
@@ -155495,7 +155497,7 @@ function getExportInfos(symbolName2, isJsxTagName, currentTokenMeaning, cancella
155495
155497
  cancellationToken.throwIfCancellationRequested();
155496
155498
  const compilerOptions = program2.getCompilerOptions();
155497
155499
  const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker);
155498
- if (defaultInfo && symbolFlagsHaveMeaning(checker.getSymbolFlags(defaultInfo.symbol), currentTokenMeaning) && forEachNameOfDefaultExport(defaultInfo.symbol, checker, compilerOptions, isJsxTagName, (name) => name === symbolName2)) {
155500
+ if (defaultInfo && symbolFlagsHaveMeaning(checker.getSymbolFlags(defaultInfo.symbol), currentTokenMeaning) && forEachNameOfDefaultExport(defaultInfo.symbol, checker, getEmitScriptTarget(compilerOptions), (name, capitalizedName) => (isJsxTagName ? capitalizedName ?? name : name) === symbolName2)) {
155499
155501
  addSymbol(moduleSymbol, sourceFile, defaultInfo.symbol, defaultInfo.exportKind, program2, isFromPackageJson);
155500
155502
  }
155501
155503
  const exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol);
@@ -178748,6 +178750,7 @@ __export(ts_exports2, {
178748
178750
  buildOverload: () => buildOverload,
178749
178751
  bundlerModuleNameResolver: () => bundlerModuleNameResolver,
178750
178752
  canBeConvertedToAsync: () => canBeConvertedToAsync,
178753
+ canEmitTsBuildInfo: () => canEmitTsBuildInfo,
178751
178754
  canHaveDecorators: () => canHaveDecorators,
178752
178755
  canHaveExportModifier: () => canHaveExportModifier,
178753
178756
  canHaveFlowNode: () => canHaveFlowNode,
@@ -178760,7 +178763,7 @@ __export(ts_exports2, {
178760
178763
  canHaveModifiers: () => canHaveModifiers,
178761
178764
  canHaveModuleSpecifier: () => canHaveModuleSpecifier,
178762
178765
  canHaveSymbol: () => canHaveSymbol,
178763
- canIncludeBindAndCheckDiagnsotics: () => canIncludeBindAndCheckDiagnsotics,
178766
+ canIncludeBindAndCheckDiagnostics: () => canIncludeBindAndCheckDiagnostics,
178764
178767
  canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,
178765
178768
  canProduceDiagnostics: () => canProduceDiagnostics,
178766
178769
  canUsePropertyAccess: () => canUsePropertyAccess,
@@ -179425,7 +179428,6 @@ __export(ts_exports2, {
179425
179428
  getNameOfScriptTarget: () => getNameOfScriptTarget,
179426
179429
  getNameOrArgument: () => getNameOrArgument,
179427
179430
  getNameTable: () => getNameTable,
179428
- getNamesForExportedSymbol: () => getNamesForExportedSymbol,
179429
179431
  getNamespaceDeclarationNode: () => getNamespaceDeclarationNode,
179430
179432
  getNewLineCharacter: () => getNewLineCharacter,
179431
179433
  getNewLineKind: () => getNewLineKind,
@@ -181680,7 +181682,7 @@ __export(ts_server_protocol_exports, {
181680
181682
  NewLineKind: () => NewLineKind2,
181681
181683
  OrganizeImportsMode: () => OrganizeImportsMode,
181682
181684
  PollingWatchKind: () => PollingWatchKind2,
181683
- ScriptTarget: () => ScriptTarget10,
181685
+ ScriptTarget: () => ScriptTarget11,
181684
181686
  SemicolonPreference: () => SemicolonPreference,
181685
181687
  WatchDirectoryKind: () => WatchDirectoryKind2,
181686
181688
  WatchFileKind: () => WatchFileKind2
@@ -181871,24 +181873,24 @@ var NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => {
181871
181873
  NewLineKind3["Lf"] = "Lf";
181872
181874
  return NewLineKind3;
181873
181875
  })(NewLineKind2 || {});
181874
- var ScriptTarget10 = /* @__PURE__ */ ((ScriptTarget11) => {
181875
- ScriptTarget11["ES3"] = "es3";
181876
- ScriptTarget11["ES5"] = "es5";
181877
- ScriptTarget11["ES6"] = "es6";
181878
- ScriptTarget11["ES2015"] = "es2015";
181879
- ScriptTarget11["ES2016"] = "es2016";
181880
- ScriptTarget11["ES2017"] = "es2017";
181881
- ScriptTarget11["ES2018"] = "es2018";
181882
- ScriptTarget11["ES2019"] = "es2019";
181883
- ScriptTarget11["ES2020"] = "es2020";
181884
- ScriptTarget11["ES2021"] = "es2021";
181885
- ScriptTarget11["ES2022"] = "es2022";
181886
- ScriptTarget11["ES2023"] = "es2023";
181887
- ScriptTarget11["ESNext"] = "esnext";
181888
- ScriptTarget11["JSON"] = "json";
181889
- ScriptTarget11["Latest"] = "esnext" /* ESNext */;
181890
- return ScriptTarget11;
181891
- })(ScriptTarget10 || {});
181876
+ var ScriptTarget11 = /* @__PURE__ */ ((ScriptTarget12) => {
181877
+ ScriptTarget12["ES3"] = "es3";
181878
+ ScriptTarget12["ES5"] = "es5";
181879
+ ScriptTarget12["ES6"] = "es6";
181880
+ ScriptTarget12["ES2015"] = "es2015";
181881
+ ScriptTarget12["ES2016"] = "es2016";
181882
+ ScriptTarget12["ES2017"] = "es2017";
181883
+ ScriptTarget12["ES2018"] = "es2018";
181884
+ ScriptTarget12["ES2019"] = "es2019";
181885
+ ScriptTarget12["ES2020"] = "es2020";
181886
+ ScriptTarget12["ES2021"] = "es2021";
181887
+ ScriptTarget12["ES2022"] = "es2022";
181888
+ ScriptTarget12["ES2023"] = "es2023";
181889
+ ScriptTarget12["ESNext"] = "esnext";
181890
+ ScriptTarget12["JSON"] = "json";
181891
+ ScriptTarget12["Latest"] = "esnext" /* ESNext */;
181892
+ return ScriptTarget12;
181893
+ })(ScriptTarget11 || {});
181892
181894
  {
181893
181895
  }
181894
181896
 
@@ -184152,8 +184154,11 @@ var Project3 = class _Project {
184152
184154
  const originalText = Debug.checkDefined(rootSourceFile.getText());
184153
184155
  (_b = this.getScriptInfo(rootFile)) == null ? void 0 : _b.editContent(0, originalText.length, updatedText);
184154
184156
  this.updateGraph();
184155
- cb(this.program, originalProgram, (_c = this.program) == null ? void 0 : _c.getSourceFile(rootFile));
184156
- (_d = this.getScriptInfo(rootFile)) == null ? void 0 : _d.editContent(0, this.program.getSourceFile(rootFile).getText().length, originalText);
184157
+ try {
184158
+ cb(this.program, originalProgram, (_c = this.program) == null ? void 0 : _c.getSourceFile(rootFile));
184159
+ } finally {
184160
+ (_d = this.getScriptInfo(rootFile)) == null ? void 0 : _d.editContent(0, this.program.getSourceFile(rootFile).getText().length, originalText);
184161
+ }
184157
184162
  }
184158
184163
  /** @internal */
184159
184164
  getCompilerOptionsForNoDtsResolutionProject() {
@@ -193184,6 +193189,7 @@ if (typeof console !== "undefined") {
193184
193189
  buildOverload,
193185
193190
  bundlerModuleNameResolver,
193186
193191
  canBeConvertedToAsync,
193192
+ canEmitTsBuildInfo,
193187
193193
  canHaveDecorators,
193188
193194
  canHaveExportModifier,
193189
193195
  canHaveFlowNode,
@@ -193196,7 +193202,7 @@ if (typeof console !== "undefined") {
193196
193202
  canHaveModifiers,
193197
193203
  canHaveModuleSpecifier,
193198
193204
  canHaveSymbol,
193199
- canIncludeBindAndCheckDiagnsotics,
193205
+ canIncludeBindAndCheckDiagnostics,
193200
193206
  canJsonReportNoInputFiles,
193201
193207
  canProduceDiagnostics,
193202
193208
  canUsePropertyAccess,
@@ -193861,7 +193867,6 @@ if (typeof console !== "undefined") {
193861
193867
  getNameOfScriptTarget,
193862
193868
  getNameOrArgument,
193863
193869
  getNameTable,
193864
- getNamesForExportedSymbol,
193865
193870
  getNamespaceDeclarationNode,
193866
193871
  getNewLineCharacter,
193867
193872
  getNewLineKind,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.6.0-dev.20240612",
5
+ "version": "5.6.0-dev.20240613",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -112,5 +112,5 @@
112
112
  "node": "20.1.0",
113
113
  "npm": "8.19.4"
114
114
  },
115
- "gitHead": "d8086f14b6b97c0df34a0cc2f56d4b5926a0c299"
115
+ "gitHead": "6f06eb1b27a6495b209e8be79036f3b2ea92cd0b"
116
116
  }