@typescript-deploys/pr-build 5.0.0-pr-51387-49 → 5.0.0-pr-51157-8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/typescript.js CHANGED
@@ -76,6 +76,7 @@ var ts = (() => {
76
76
  ElementFlags: () => ElementFlags,
77
77
  EmitFlags: () => EmitFlags,
78
78
  EmitHint: () => EmitHint,
79
+ EmitOnly: () => EmitOnly,
79
80
  EndOfLineState: () => EndOfLineState,
80
81
  EnumKind: () => EnumKind,
81
82
  ExitStatus: () => ExitStatus,
@@ -367,6 +368,7 @@ var ts = (() => {
367
368
  createBindingHelper: () => createBindingHelper,
368
369
  createBlock: () => createBlock,
369
370
  createBreak: () => createBreak,
371
+ createBuildInfo: () => createBuildInfo,
370
372
  createBuilderProgram: () => createBuilderProgram,
371
373
  createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo,
372
374
  createBuilderStatusReporter: () => createBuilderStatusReporter,
@@ -846,6 +848,7 @@ var ts = (() => {
846
848
  getBuildInfoText: () => getBuildInfoText,
847
849
  getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder,
848
850
  getBuilderCreationParameters: () => getBuilderCreationParameters,
851
+ getBuilderFileEmit: () => getBuilderFileEmit,
849
852
  getCheckFlags: () => getCheckFlags,
850
853
  getClassExtendsHeritageElement: () => getClassExtendsHeritageElement,
851
854
  getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol,
@@ -1112,6 +1115,7 @@ var ts = (() => {
1112
1115
  getPathUpdater: () => getPathUpdater,
1113
1116
  getPathsBasePath: () => getPathsBasePath,
1114
1117
  getPatternFromSpec: () => getPatternFromSpec,
1118
+ getPendingEmitKind: () => getPendingEmitKind,
1115
1119
  getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter,
1116
1120
  getPossibleGenericSignatures: () => getPossibleGenericSignatures,
1117
1121
  getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension,
@@ -1142,9 +1146,12 @@ var ts = (() => {
1142
1146
  getRenameLocation: () => getRenameLocation,
1143
1147
  getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
1144
1148
  getResolutionDiagnostic: () => getResolutionDiagnostic,
1149
+ getResolutionMode: () => getResolutionMode,
1145
1150
  getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause,
1151
+ getResolutionName: () => getResolutionName,
1146
1152
  getResolvedExternalModuleName: () => getResolvedExternalModuleName,
1147
1153
  getResolvedModule: () => getResolvedModule,
1154
+ getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective,
1148
1155
  getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement,
1149
1156
  getRestParameterElementType: () => getRestParameterElementType,
1150
1157
  getRightMostAssignedExpression: () => getRightMostAssignedExpression,
@@ -1169,6 +1176,7 @@ var ts = (() => {
1169
1176
  getSourceFileOfNode: () => getSourceFileOfNode,
1170
1177
  getSourceFilePathInNewDir: () => getSourceFilePathInNewDir,
1171
1178
  getSourceFilePathInNewDirWorker: () => getSourceFilePathInNewDirWorker,
1179
+ getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText,
1172
1180
  getSourceFilesToEmit: () => getSourceFilesToEmit,
1173
1181
  getSourceMapRange: () => getSourceMapRange,
1174
1182
  getSourceMapper: () => getSourceMapper,
@@ -1741,6 +1749,7 @@ var ts = (() => {
1741
1749
  isOmittedExpression: () => isOmittedExpression,
1742
1750
  isOptionalChain: () => isOptionalChain,
1743
1751
  isOptionalChainRoot: () => isOptionalChainRoot,
1752
+ isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag,
1744
1753
  isOptionalTypeNode: () => isOptionalTypeNode,
1745
1754
  isOuterExpression: () => isOuterExpression,
1746
1755
  isOutermostOptionalChain: () => isOutermostOptionalChain,
@@ -2225,6 +2234,8 @@ var ts = (() => {
2225
2234
  sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics,
2226
2235
  sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions,
2227
2236
  sourceFileMayBeEmitted: () => sourceFileMayBeEmitted,
2237
+ sourceMapCommentRegExp: () => sourceMapCommentRegExp,
2238
+ sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart,
2228
2239
  spacePart: () => spacePart,
2229
2240
  spanMap: () => spanMap,
2230
2241
  spreadArrayHelper: () => spreadArrayHelper,
@@ -2286,11 +2297,12 @@ var ts = (() => {
2286
2297
  timestamp: () => timestamp,
2287
2298
  toArray: () => toArray,
2288
2299
  toBuilderFileEmit: () => toBuilderFileEmit,
2289
- toBuilderStateFileInfo: () => toBuilderStateFileInfo,
2300
+ toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit,
2290
2301
  toEditorSettings: () => toEditorSettings,
2291
2302
  toFileNameLowerCase: () => toFileNameLowerCase,
2292
2303
  toLowerCase: () => toLowerCase,
2293
2304
  toPath: () => toPath,
2305
+ toProgramEmitPending: () => toProgramEmitPending,
2294
2306
  tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword,
2295
2307
  tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan,
2296
2308
  tokenToString: () => tokenToString,
@@ -2527,6 +2539,7 @@ var ts = (() => {
2527
2539
  walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions,
2528
2540
  walkUpParenthesizedTypes: () => walkUpParenthesizedTypes,
2529
2541
  walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,
2542
+ whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,
2530
2543
  writeCommentRange: () => writeCommentRange,
2531
2544
  writeFile: () => writeFile,
2532
2545
  writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
@@ -2538,7 +2551,7 @@ var ts = (() => {
2538
2551
 
2539
2552
  // src/compiler/corePublic.ts
2540
2553
  var versionMajorMinor = "5.0";
2541
- var version = `${versionMajorMinor}.0-insiders.20221107`;
2554
+ var version = `${versionMajorMinor}.0-insiders.20221108`;
2542
2555
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2543
2556
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2544
2557
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6603,6 +6616,11 @@ ${lanes.join("\n")}
6603
6616
  FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingFileExplainingDiagnostic"] = 1] = "FilePreprocessingFileExplainingDiagnostic";
6604
6617
  return FilePreprocessingDiagnosticsKind2;
6605
6618
  })(FilePreprocessingDiagnosticsKind || {});
6619
+ var EmitOnly = /* @__PURE__ */ ((EmitOnly4) => {
6620
+ EmitOnly4[EmitOnly4["Js"] = 0] = "Js";
6621
+ EmitOnly4[EmitOnly4["Dts"] = 1] = "Dts";
6622
+ return EmitOnly4;
6623
+ })(EmitOnly || {});
6606
6624
  var StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => {
6607
6625
  StructureIsReused2[StructureIsReused2["Not"] = 0] = "Not";
6608
6626
  StructureIsReused2[StructureIsReused2["SafeModules"] = 1] = "SafeModules";
@@ -10759,6 +10777,7 @@ ${lanes.join("\n")}
10759
10777
  Matched_0_condition_1: diag(6403, 3 /* Message */, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."),
10760
10778
  Using_0_subpath_1_with_target_2: diag(6404, 3 /* Message */, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."),
10761
10779
  Saw_non_matching_condition_0: diag(6405, 3 /* Message */, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."),
10780
+ Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, 3 /* Message */, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),
10762
10781
  The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
10763
10782
  The_expected_type_comes_from_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
10764
10783
  The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
@@ -14717,11 +14736,15 @@ ${lanes.join("\n")}
14717
14736
  }
14718
14737
  sourceFile.resolvedModules.set(moduleNameText, mode, resolvedModule);
14719
14738
  }
14720
- function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
14739
+ function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective, mode) {
14721
14740
  if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
14722
14741
  sourceFile.resolvedTypeReferenceDirectiveNames = createModeAwareCache();
14723
14742
  }
14724
- sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, void 0, resolvedTypeReferenceDirective);
14743
+ sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, mode, resolvedTypeReferenceDirective);
14744
+ }
14745
+ function getResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, mode) {
14746
+ var _a2;
14747
+ return (_a2 = sourceFile == null ? void 0 : sourceFile.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _a2.get(typeReferenceDirectiveName, mode);
14725
14748
  }
14726
14749
  function projectReferenceIsEqualTo(oldRef, newRef) {
14727
14750
  return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular;
@@ -14741,13 +14764,13 @@ ${lanes.join("\n")}
14741
14764
  function typeDirectiveIsEqualTo(oldResolution, newResolution) {
14742
14765
  return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.primary === newResolution.primary && oldResolution.originalPath === newResolution.originalPath;
14743
14766
  }
14744
- function hasChangesInResolutions(names, newResolutions, oldResolutions, oldSourceFile, comparer) {
14767
+ function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer) {
14745
14768
  Debug.assert(names.length === newResolutions.length);
14746
14769
  for (let i = 0; i < names.length; i++) {
14747
14770
  const newResolution = newResolutions[i];
14748
14771
  const entry = names[i];
14749
- const name = !isString(entry) ? entry.fileName.toLowerCase() : entry;
14750
- const mode = !isString(entry) ? getModeForFileReference(entry, oldSourceFile == null ? void 0 : oldSourceFile.impliedNodeFormat) : oldSourceFile && getModeForResolutionAtIndex(oldSourceFile, i);
14772
+ const name = getResolutionName(entry);
14773
+ const mode = getResolutionMode(entry, newSourceFile);
14751
14774
  const oldResolution = oldResolutions && oldResolutions.get(name, mode);
14752
14775
  const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution;
14753
14776
  if (changed) {
@@ -20021,6 +20044,13 @@ ${lanes.join("\n")}
20021
20044
  function canHaveExportModifier(node) {
20022
20045
  return isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isTypeDeclaration(node) || isModuleDeclaration(node) && !isExternalModuleAugmentation(node) && !isGlobalScopeAugmentation(node);
20023
20046
  }
20047
+ function isOptionalJSDocPropertyLikeTag(node) {
20048
+ if (!isJSDocPropertyLikeTag(node)) {
20049
+ return false;
20050
+ }
20051
+ const { isBracketed, typeExpression } = node;
20052
+ return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */;
20053
+ }
20024
20054
 
20025
20055
  // src/compiler/factory/baseNodeFactory.ts
20026
20056
  function createBaseNodeFactory() {
@@ -34577,12 +34607,60 @@ ${lanes.join("\n")}
34577
34607
  transpileOptionValue: void 0,
34578
34608
  defaultValueDescription: Diagnostics.false_unless_composite_is_set
34579
34609
  },
34610
+ {
34611
+ name: "declaration",
34612
+ shortName: "d",
34613
+ type: "boolean",
34614
+ affectsBuildInfo: true,
34615
+ showInSimplifiedHelpView: true,
34616
+ category: Diagnostics.Emit,
34617
+ transpileOptionValue: void 0,
34618
+ description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,
34619
+ defaultValueDescription: Diagnostics.false_unless_composite_is_set
34620
+ },
34621
+ {
34622
+ name: "declarationMap",
34623
+ type: "boolean",
34624
+ affectsBuildInfo: true,
34625
+ showInSimplifiedHelpView: true,
34626
+ category: Diagnostics.Emit,
34627
+ transpileOptionValue: void 0,
34628
+ defaultValueDescription: false,
34629
+ description: Diagnostics.Create_sourcemaps_for_d_ts_files
34630
+ },
34631
+ {
34632
+ name: "emitDeclarationOnly",
34633
+ type: "boolean",
34634
+ affectsBuildInfo: true,
34635
+ showInSimplifiedHelpView: true,
34636
+ category: Diagnostics.Emit,
34637
+ description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
34638
+ transpileOptionValue: void 0,
34639
+ defaultValueDescription: false
34640
+ },
34641
+ {
34642
+ name: "sourceMap",
34643
+ type: "boolean",
34644
+ affectsBuildInfo: true,
34645
+ showInSimplifiedHelpView: true,
34646
+ category: Diagnostics.Emit,
34647
+ defaultValueDescription: false,
34648
+ description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files
34649
+ },
34650
+ {
34651
+ name: "inlineSourceMap",
34652
+ type: "boolean",
34653
+ affectsBuildInfo: true,
34654
+ category: Diagnostics.Emit,
34655
+ description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
34656
+ defaultValueDescription: false
34657
+ },
34580
34658
  {
34581
34659
  name: "assumeChangesOnlyAffectDirectDependencies",
34582
34660
  type: "boolean",
34583
34661
  affectsSemanticDiagnostics: true,
34584
34662
  affectsEmit: true,
34585
- affectsMultiFileEmitBuildInfo: true,
34663
+ affectsBuildInfo: true,
34586
34664
  category: Diagnostics.Watch_and_Build_Modes,
34587
34665
  description: Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
34588
34666
  defaultValueDescription: false
@@ -34616,7 +34694,7 @@ ${lanes.join("\n")}
34616
34694
  affectsSourceFile: true,
34617
34695
  affectsModuleResolution: true,
34618
34696
  affectsEmit: true,
34619
- affectsMultiFileEmitBuildInfo: true,
34697
+ affectsBuildInfo: true,
34620
34698
  paramType: Diagnostics.VERSION,
34621
34699
  showInSimplifiedHelpView: true,
34622
34700
  category: Diagnostics.Language_and_Environment,
@@ -34642,7 +34720,7 @@ ${lanes.join("\n")}
34642
34720
  })),
34643
34721
  affectsModuleResolution: true,
34644
34722
  affectsEmit: true,
34645
- affectsMultiFileEmitBuildInfo: true,
34723
+ affectsBuildInfo: true,
34646
34724
  paramType: Diagnostics.KIND,
34647
34725
  showInSimplifiedHelpView: true,
34648
34726
  category: Diagnostics.Modules,
@@ -34749,7 +34827,7 @@ ${lanes.join("\n")}
34749
34827
  type: jsxOptionMap,
34750
34828
  affectsSourceFile: true,
34751
34829
  affectsEmit: true,
34752
- affectsMultiFileEmitBuildInfo: true,
34830
+ affectsBuildInfo: true,
34753
34831
  affectsModuleResolution: true,
34754
34832
  paramType: Diagnostics.KIND,
34755
34833
  showInSimplifiedHelpView: true,
@@ -34757,57 +34835,12 @@ ${lanes.join("\n")}
34757
34835
  description: Diagnostics.Specify_what_JSX_code_is_generated,
34758
34836
  defaultValueDescription: void 0
34759
34837
  },
34760
- {
34761
- name: "declaration",
34762
- shortName: "d",
34763
- type: "boolean",
34764
- affectsEmit: true,
34765
- affectsMultiFileEmitBuildInfo: true,
34766
- showInSimplifiedHelpView: true,
34767
- category: Diagnostics.Emit,
34768
- transpileOptionValue: void 0,
34769
- description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,
34770
- defaultValueDescription: Diagnostics.false_unless_composite_is_set
34771
- },
34772
- {
34773
- name: "declarationMap",
34774
- type: "boolean",
34775
- affectsEmit: true,
34776
- affectsMultiFileEmitBuildInfo: true,
34777
- showInSimplifiedHelpView: true,
34778
- category: Diagnostics.Emit,
34779
- transpileOptionValue: void 0,
34780
- defaultValueDescription: false,
34781
- description: Diagnostics.Create_sourcemaps_for_d_ts_files
34782
- },
34783
- {
34784
- name: "emitDeclarationOnly",
34785
- type: "boolean",
34786
- affectsEmit: true,
34787
- affectsMultiFileEmitBuildInfo: true,
34788
- showInSimplifiedHelpView: true,
34789
- category: Diagnostics.Emit,
34790
- description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
34791
- transpileOptionValue: void 0,
34792
- defaultValueDescription: false
34793
- },
34794
- {
34795
- name: "sourceMap",
34796
- type: "boolean",
34797
- affectsEmit: true,
34798
- affectsMultiFileEmitBuildInfo: true,
34799
- showInSimplifiedHelpView: true,
34800
- category: Diagnostics.Emit,
34801
- defaultValueDescription: false,
34802
- description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files
34803
- },
34804
34838
  {
34805
34839
  name: "outFile",
34806
34840
  type: "string",
34807
34841
  affectsEmit: true,
34808
- affectsMultiFileEmitBuildInfo: true,
34842
+ affectsBuildInfo: true,
34809
34843
  affectsDeclarationPath: true,
34810
- affectsBundleEmitBuildInfo: true,
34811
34844
  isFilePath: true,
34812
34845
  paramType: Diagnostics.FILE,
34813
34846
  showInSimplifiedHelpView: true,
@@ -34819,7 +34852,7 @@ ${lanes.join("\n")}
34819
34852
  name: "outDir",
34820
34853
  type: "string",
34821
34854
  affectsEmit: true,
34822
- affectsMultiFileEmitBuildInfo: true,
34855
+ affectsBuildInfo: true,
34823
34856
  affectsDeclarationPath: true,
34824
34857
  isFilePath: true,
34825
34858
  paramType: Diagnostics.DIRECTORY,
@@ -34831,7 +34864,7 @@ ${lanes.join("\n")}
34831
34864
  name: "rootDir",
34832
34865
  type: "string",
34833
34866
  affectsEmit: true,
34834
- affectsMultiFileEmitBuildInfo: true,
34867
+ affectsBuildInfo: true,
34835
34868
  affectsDeclarationPath: true,
34836
34869
  isFilePath: true,
34837
34870
  paramType: Diagnostics.LOCATION,
@@ -34842,9 +34875,7 @@ ${lanes.join("\n")}
34842
34875
  {
34843
34876
  name: "composite",
34844
34877
  type: "boolean",
34845
- affectsEmit: true,
34846
- affectsMultiFileEmitBuildInfo: true,
34847
- affectsBundleEmitBuildInfo: true,
34878
+ affectsBuildInfo: true,
34848
34879
  isTSConfigOnly: true,
34849
34880
  category: Diagnostics.Projects,
34850
34881
  transpileOptionValue: void 0,
@@ -34855,8 +34886,7 @@ ${lanes.join("\n")}
34855
34886
  name: "tsBuildInfoFile",
34856
34887
  type: "string",
34857
34888
  affectsEmit: true,
34858
- affectsMultiFileEmitBuildInfo: true,
34859
- affectsBundleEmitBuildInfo: true,
34889
+ affectsBuildInfo: true,
34860
34890
  isFilePath: true,
34861
34891
  paramType: Diagnostics.FILE,
34862
34892
  category: Diagnostics.Projects,
@@ -34868,7 +34898,7 @@ ${lanes.join("\n")}
34868
34898
  name: "removeComments",
34869
34899
  type: "boolean",
34870
34900
  affectsEmit: true,
34871
- affectsMultiFileEmitBuildInfo: true,
34901
+ affectsBuildInfo: true,
34872
34902
  showInSimplifiedHelpView: true,
34873
34903
  category: Diagnostics.Emit,
34874
34904
  defaultValueDescription: false,
@@ -34887,7 +34917,7 @@ ${lanes.join("\n")}
34887
34917
  name: "importHelpers",
34888
34918
  type: "boolean",
34889
34919
  affectsEmit: true,
34890
- affectsMultiFileEmitBuildInfo: true,
34920
+ affectsBuildInfo: true,
34891
34921
  category: Diagnostics.Emit,
34892
34922
  description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
34893
34923
  defaultValueDescription: false
@@ -34901,7 +34931,7 @@ ${lanes.join("\n")}
34901
34931
  })),
34902
34932
  affectsEmit: true,
34903
34933
  affectsSemanticDiagnostics: true,
34904
- affectsMultiFileEmitBuildInfo: true,
34934
+ affectsBuildInfo: true,
34905
34935
  category: Diagnostics.Emit,
34906
34936
  description: Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
34907
34937
  defaultValueDescription: 0 /* Remove */
@@ -34910,7 +34940,7 @@ ${lanes.join("\n")}
34910
34940
  name: "downlevelIteration",
34911
34941
  type: "boolean",
34912
34942
  affectsEmit: true,
34913
- affectsMultiFileEmitBuildInfo: true,
34943
+ affectsBuildInfo: true,
34914
34944
  category: Diagnostics.Emit,
34915
34945
  description: Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
34916
34946
  defaultValueDescription: false
@@ -34926,7 +34956,7 @@ ${lanes.join("\n")}
34926
34956
  {
34927
34957
  name: "strict",
34928
34958
  type: "boolean",
34929
- affectsMultiFileEmitBuildInfo: true,
34959
+ affectsBuildInfo: true,
34930
34960
  showInSimplifiedHelpView: true,
34931
34961
  category: Diagnostics.Type_Checking,
34932
34962
  description: Diagnostics.Enable_all_strict_type_checking_options,
@@ -34936,7 +34966,7 @@ ${lanes.join("\n")}
34936
34966
  name: "noImplicitAny",
34937
34967
  type: "boolean",
34938
34968
  affectsSemanticDiagnostics: true,
34939
- affectsMultiFileEmitBuildInfo: true,
34969
+ affectsBuildInfo: true,
34940
34970
  strictFlag: true,
34941
34971
  category: Diagnostics.Type_Checking,
34942
34972
  description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
@@ -34946,7 +34976,7 @@ ${lanes.join("\n")}
34946
34976
  name: "strictNullChecks",
34947
34977
  type: "boolean",
34948
34978
  affectsSemanticDiagnostics: true,
34949
- affectsMultiFileEmitBuildInfo: true,
34979
+ affectsBuildInfo: true,
34950
34980
  strictFlag: true,
34951
34981
  category: Diagnostics.Type_Checking,
34952
34982
  description: Diagnostics.When_type_checking_take_into_account_null_and_undefined,
@@ -34956,7 +34986,7 @@ ${lanes.join("\n")}
34956
34986
  name: "strictFunctionTypes",
34957
34987
  type: "boolean",
34958
34988
  affectsSemanticDiagnostics: true,
34959
- affectsMultiFileEmitBuildInfo: true,
34989
+ affectsBuildInfo: true,
34960
34990
  strictFlag: true,
34961
34991
  category: Diagnostics.Type_Checking,
34962
34992
  description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
@@ -34966,7 +34996,7 @@ ${lanes.join("\n")}
34966
34996
  name: "strictBindCallApply",
34967
34997
  type: "boolean",
34968
34998
  affectsSemanticDiagnostics: true,
34969
- affectsMultiFileEmitBuildInfo: true,
34999
+ affectsBuildInfo: true,
34970
35000
  strictFlag: true,
34971
35001
  category: Diagnostics.Type_Checking,
34972
35002
  description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
@@ -34976,7 +35006,7 @@ ${lanes.join("\n")}
34976
35006
  name: "strictPropertyInitialization",
34977
35007
  type: "boolean",
34978
35008
  affectsSemanticDiagnostics: true,
34979
- affectsMultiFileEmitBuildInfo: true,
35009
+ affectsBuildInfo: true,
34980
35010
  strictFlag: true,
34981
35011
  category: Diagnostics.Type_Checking,
34982
35012
  description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
@@ -34986,7 +35016,7 @@ ${lanes.join("\n")}
34986
35016
  name: "noImplicitThis",
34987
35017
  type: "boolean",
34988
35018
  affectsSemanticDiagnostics: true,
34989
- affectsMultiFileEmitBuildInfo: true,
35019
+ affectsBuildInfo: true,
34990
35020
  strictFlag: true,
34991
35021
  category: Diagnostics.Type_Checking,
34992
35022
  description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
@@ -34996,7 +35026,7 @@ ${lanes.join("\n")}
34996
35026
  name: "useUnknownInCatchVariables",
34997
35027
  type: "boolean",
34998
35028
  affectsSemanticDiagnostics: true,
34999
- affectsMultiFileEmitBuildInfo: true,
35029
+ affectsBuildInfo: true,
35000
35030
  strictFlag: true,
35001
35031
  category: Diagnostics.Type_Checking,
35002
35032
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
@@ -35007,7 +35037,7 @@ ${lanes.join("\n")}
35007
35037
  type: "boolean",
35008
35038
  affectsSourceFile: true,
35009
35039
  affectsEmit: true,
35010
- affectsMultiFileEmitBuildInfo: true,
35040
+ affectsBuildInfo: true,
35011
35041
  strictFlag: true,
35012
35042
  category: Diagnostics.Type_Checking,
35013
35043
  description: Diagnostics.Ensure_use_strict_is_always_emitted,
@@ -35017,7 +35047,7 @@ ${lanes.join("\n")}
35017
35047
  name: "noUnusedLocals",
35018
35048
  type: "boolean",
35019
35049
  affectsSemanticDiagnostics: true,
35020
- affectsMultiFileEmitBuildInfo: true,
35050
+ affectsBuildInfo: true,
35021
35051
  category: Diagnostics.Type_Checking,
35022
35052
  description: Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
35023
35053
  defaultValueDescription: false
@@ -35026,7 +35056,7 @@ ${lanes.join("\n")}
35026
35056
  name: "noUnusedParameters",
35027
35057
  type: "boolean",
35028
35058
  affectsSemanticDiagnostics: true,
35029
- affectsMultiFileEmitBuildInfo: true,
35059
+ affectsBuildInfo: true,
35030
35060
  category: Diagnostics.Type_Checking,
35031
35061
  description: Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
35032
35062
  defaultValueDescription: false
@@ -35035,7 +35065,7 @@ ${lanes.join("\n")}
35035
35065
  name: "exactOptionalPropertyTypes",
35036
35066
  type: "boolean",
35037
35067
  affectsSemanticDiagnostics: true,
35038
- affectsMultiFileEmitBuildInfo: true,
35068
+ affectsBuildInfo: true,
35039
35069
  category: Diagnostics.Type_Checking,
35040
35070
  description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
35041
35071
  defaultValueDescription: false
@@ -35044,7 +35074,7 @@ ${lanes.join("\n")}
35044
35074
  name: "noImplicitReturns",
35045
35075
  type: "boolean",
35046
35076
  affectsSemanticDiagnostics: true,
35047
- affectsMultiFileEmitBuildInfo: true,
35077
+ affectsBuildInfo: true,
35048
35078
  category: Diagnostics.Type_Checking,
35049
35079
  description: Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
35050
35080
  defaultValueDescription: false
@@ -35054,7 +35084,7 @@ ${lanes.join("\n")}
35054
35084
  type: "boolean",
35055
35085
  affectsBindDiagnostics: true,
35056
35086
  affectsSemanticDiagnostics: true,
35057
- affectsMultiFileEmitBuildInfo: true,
35087
+ affectsBuildInfo: true,
35058
35088
  category: Diagnostics.Type_Checking,
35059
35089
  description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
35060
35090
  defaultValueDescription: false
@@ -35063,7 +35093,7 @@ ${lanes.join("\n")}
35063
35093
  name: "noUncheckedIndexedAccess",
35064
35094
  type: "boolean",
35065
35095
  affectsSemanticDiagnostics: true,
35066
- affectsMultiFileEmitBuildInfo: true,
35096
+ affectsBuildInfo: true,
35067
35097
  category: Diagnostics.Type_Checking,
35068
35098
  description: Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
35069
35099
  defaultValueDescription: false
@@ -35072,7 +35102,7 @@ ${lanes.join("\n")}
35072
35102
  name: "noImplicitOverride",
35073
35103
  type: "boolean",
35074
35104
  affectsSemanticDiagnostics: true,
35075
- affectsMultiFileEmitBuildInfo: true,
35105
+ affectsBuildInfo: true,
35076
35106
  category: Diagnostics.Type_Checking,
35077
35107
  description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
35078
35108
  defaultValueDescription: false
@@ -35081,7 +35111,7 @@ ${lanes.join("\n")}
35081
35111
  name: "noPropertyAccessFromIndexSignature",
35082
35112
  type: "boolean",
35083
35113
  affectsSemanticDiagnostics: true,
35084
- affectsMultiFileEmitBuildInfo: true,
35114
+ affectsBuildInfo: true,
35085
35115
  showInSimplifiedHelpView: false,
35086
35116
  category: Diagnostics.Type_Checking,
35087
35117
  description: Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
@@ -35162,7 +35192,7 @@ ${lanes.join("\n")}
35162
35192
  name: "allowSyntheticDefaultImports",
35163
35193
  type: "boolean",
35164
35194
  affectsSemanticDiagnostics: true,
35165
- affectsMultiFileEmitBuildInfo: true,
35195
+ affectsBuildInfo: true,
35166
35196
  category: Diagnostics.Interop_Constraints,
35167
35197
  description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
35168
35198
  defaultValueDescription: Diagnostics.module_system_or_esModuleInterop
@@ -35172,7 +35202,7 @@ ${lanes.join("\n")}
35172
35202
  type: "boolean",
35173
35203
  affectsSemanticDiagnostics: true,
35174
35204
  affectsEmit: true,
35175
- affectsMultiFileEmitBuildInfo: true,
35205
+ affectsBuildInfo: true,
35176
35206
  showInSimplifiedHelpView: true,
35177
35207
  category: Diagnostics.Interop_Constraints,
35178
35208
  description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
@@ -35189,7 +35219,7 @@ ${lanes.join("\n")}
35189
35219
  name: "allowUmdGlobalAccess",
35190
35220
  type: "boolean",
35191
35221
  affectsSemanticDiagnostics: true,
35192
- affectsMultiFileEmitBuildInfo: true,
35222
+ affectsBuildInfo: true,
35193
35223
  category: Diagnostics.Modules,
35194
35224
  description: Diagnostics.Allow_accessing_UMD_globals_from_modules,
35195
35225
  defaultValueDescription: false
@@ -35210,7 +35240,7 @@ ${lanes.join("\n")}
35210
35240
  name: "sourceRoot",
35211
35241
  type: "string",
35212
35242
  affectsEmit: true,
35213
- affectsMultiFileEmitBuildInfo: true,
35243
+ affectsBuildInfo: true,
35214
35244
  paramType: Diagnostics.LOCATION,
35215
35245
  category: Diagnostics.Emit,
35216
35246
  description: Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code
@@ -35219,25 +35249,16 @@ ${lanes.join("\n")}
35219
35249
  name: "mapRoot",
35220
35250
  type: "string",
35221
35251
  affectsEmit: true,
35222
- affectsMultiFileEmitBuildInfo: true,
35252
+ affectsBuildInfo: true,
35223
35253
  paramType: Diagnostics.LOCATION,
35224
35254
  category: Diagnostics.Emit,
35225
35255
  description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations
35226
35256
  },
35227
- {
35228
- name: "inlineSourceMap",
35229
- type: "boolean",
35230
- affectsEmit: true,
35231
- affectsMultiFileEmitBuildInfo: true,
35232
- category: Diagnostics.Emit,
35233
- description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
35234
- defaultValueDescription: false
35235
- },
35236
35257
  {
35237
35258
  name: "inlineSources",
35238
35259
  type: "boolean",
35239
35260
  affectsEmit: true,
35240
- affectsMultiFileEmitBuildInfo: true,
35261
+ affectsBuildInfo: true,
35241
35262
  category: Diagnostics.Emit,
35242
35263
  description: Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
35243
35264
  defaultValueDescription: false
@@ -35246,7 +35267,7 @@ ${lanes.join("\n")}
35246
35267
  name: "experimentalDecorators",
35247
35268
  type: "boolean",
35248
35269
  affectsSemanticDiagnostics: true,
35249
- affectsMultiFileEmitBuildInfo: true,
35270
+ affectsBuildInfo: true,
35250
35271
  category: Diagnostics.Language_and_Environment,
35251
35272
  description: Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
35252
35273
  defaultValueDescription: false
@@ -35256,7 +35277,7 @@ ${lanes.join("\n")}
35256
35277
  type: "boolean",
35257
35278
  affectsSemanticDiagnostics: true,
35258
35279
  affectsEmit: true,
35259
- affectsMultiFileEmitBuildInfo: true,
35280
+ affectsBuildInfo: true,
35260
35281
  category: Diagnostics.Language_and_Environment,
35261
35282
  description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
35262
35283
  defaultValueDescription: false
@@ -35280,7 +35301,7 @@ ${lanes.join("\n")}
35280
35301
  type: "string",
35281
35302
  affectsSemanticDiagnostics: true,
35282
35303
  affectsEmit: true,
35283
- affectsMultiFileEmitBuildInfo: true,
35304
+ affectsBuildInfo: true,
35284
35305
  affectsModuleResolution: true,
35285
35306
  category: Diagnostics.Language_and_Environment,
35286
35307
  description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
@@ -35298,9 +35319,8 @@ ${lanes.join("\n")}
35298
35319
  name: "out",
35299
35320
  type: "string",
35300
35321
  affectsEmit: true,
35301
- affectsMultiFileEmitBuildInfo: true,
35322
+ affectsBuildInfo: true,
35302
35323
  affectsDeclarationPath: true,
35303
- affectsBundleEmitBuildInfo: true,
35304
35324
  isFilePath: false,
35305
35325
  category: Diagnostics.Backwards_Compatibility,
35306
35326
  paramType: Diagnostics.FILE,
@@ -35311,7 +35331,7 @@ ${lanes.join("\n")}
35311
35331
  name: "reactNamespace",
35312
35332
  type: "string",
35313
35333
  affectsEmit: true,
35314
- affectsMultiFileEmitBuildInfo: true,
35334
+ affectsBuildInfo: true,
35315
35335
  category: Diagnostics.Language_and_Environment,
35316
35336
  description: Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
35317
35337
  defaultValueDescription: "`React`"
@@ -35319,7 +35339,7 @@ ${lanes.join("\n")}
35319
35339
  {
35320
35340
  name: "skipDefaultLibCheck",
35321
35341
  type: "boolean",
35322
- affectsMultiFileEmitBuildInfo: true,
35342
+ affectsBuildInfo: true,
35323
35343
  category: Diagnostics.Completeness,
35324
35344
  description: Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
35325
35345
  defaultValueDescription: false
@@ -35335,7 +35355,7 @@ ${lanes.join("\n")}
35335
35355
  name: "emitBOM",
35336
35356
  type: "boolean",
35337
35357
  affectsEmit: true,
35338
- affectsMultiFileEmitBuildInfo: true,
35358
+ affectsBuildInfo: true,
35339
35359
  category: Diagnostics.Emit,
35340
35360
  description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
35341
35361
  defaultValueDescription: false
@@ -35347,7 +35367,7 @@ ${lanes.join("\n")}
35347
35367
  lf: 1 /* LineFeed */
35348
35368
  })),
35349
35369
  affectsEmit: true,
35350
- affectsMultiFileEmitBuildInfo: true,
35370
+ affectsBuildInfo: true,
35351
35371
  paramType: Diagnostics.NEWLINE,
35352
35372
  category: Diagnostics.Emit,
35353
35373
  description: Diagnostics.Set_the_newline_character_for_emitting_files,
@@ -35357,7 +35377,7 @@ ${lanes.join("\n")}
35357
35377
  name: "noErrorTruncation",
35358
35378
  type: "boolean",
35359
35379
  affectsSemanticDiagnostics: true,
35360
- affectsMultiFileEmitBuildInfo: true,
35380
+ affectsBuildInfo: true,
35361
35381
  category: Diagnostics.Output_Formatting,
35362
35382
  description: Diagnostics.Disable_truncating_types_in_error_messages,
35363
35383
  defaultValueDescription: false
@@ -35384,7 +35404,7 @@ ${lanes.join("\n")}
35384
35404
  name: "stripInternal",
35385
35405
  type: "boolean",
35386
35406
  affectsEmit: true,
35387
- affectsMultiFileEmitBuildInfo: true,
35407
+ affectsBuildInfo: true,
35388
35408
  category: Diagnostics.Emit,
35389
35409
  description: Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
35390
35410
  defaultValueDescription: false
@@ -35425,7 +35445,7 @@ ${lanes.join("\n")}
35425
35445
  name: "noImplicitUseStrict",
35426
35446
  type: "boolean",
35427
35447
  affectsSemanticDiagnostics: true,
35428
- affectsMultiFileEmitBuildInfo: true,
35448
+ affectsBuildInfo: true,
35429
35449
  category: Diagnostics.Backwards_Compatibility,
35430
35450
  description: Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
35431
35451
  defaultValueDescription: false
@@ -35434,7 +35454,7 @@ ${lanes.join("\n")}
35434
35454
  name: "noEmitHelpers",
35435
35455
  type: "boolean",
35436
35456
  affectsEmit: true,
35437
- affectsMultiFileEmitBuildInfo: true,
35457
+ affectsBuildInfo: true,
35438
35458
  category: Diagnostics.Emit,
35439
35459
  description: Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
35440
35460
  defaultValueDescription: false
@@ -35443,7 +35463,7 @@ ${lanes.join("\n")}
35443
35463
  name: "noEmitOnError",
35444
35464
  type: "boolean",
35445
35465
  affectsEmit: true,
35446
- affectsMultiFileEmitBuildInfo: true,
35466
+ affectsBuildInfo: true,
35447
35467
  category: Diagnostics.Emit,
35448
35468
  transpileOptionValue: void 0,
35449
35469
  description: Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
@@ -35453,7 +35473,7 @@ ${lanes.join("\n")}
35453
35473
  name: "preserveConstEnums",
35454
35474
  type: "boolean",
35455
35475
  affectsEmit: true,
35456
- affectsMultiFileEmitBuildInfo: true,
35476
+ affectsBuildInfo: true,
35457
35477
  category: Diagnostics.Emit,
35458
35478
  description: Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
35459
35479
  defaultValueDescription: false
@@ -35462,7 +35482,7 @@ ${lanes.join("\n")}
35462
35482
  name: "declarationDir",
35463
35483
  type: "string",
35464
35484
  affectsEmit: true,
35465
- affectsMultiFileEmitBuildInfo: true,
35485
+ affectsBuildInfo: true,
35466
35486
  affectsDeclarationPath: true,
35467
35487
  isFilePath: true,
35468
35488
  paramType: Diagnostics.DIRECTORY,
@@ -35473,7 +35493,7 @@ ${lanes.join("\n")}
35473
35493
  {
35474
35494
  name: "skipLibCheck",
35475
35495
  type: "boolean",
35476
- affectsMultiFileEmitBuildInfo: true,
35496
+ affectsBuildInfo: true,
35477
35497
  category: Diagnostics.Completeness,
35478
35498
  description: Diagnostics.Skip_type_checking_all_d_ts_files,
35479
35499
  defaultValueDescription: false
@@ -35483,7 +35503,7 @@ ${lanes.join("\n")}
35483
35503
  type: "boolean",
35484
35504
  affectsBindDiagnostics: true,
35485
35505
  affectsSemanticDiagnostics: true,
35486
- affectsMultiFileEmitBuildInfo: true,
35506
+ affectsBuildInfo: true,
35487
35507
  category: Diagnostics.Type_Checking,
35488
35508
  description: Diagnostics.Disable_error_reporting_for_unused_labels,
35489
35509
  defaultValueDescription: void 0
@@ -35493,7 +35513,7 @@ ${lanes.join("\n")}
35493
35513
  type: "boolean",
35494
35514
  affectsBindDiagnostics: true,
35495
35515
  affectsSemanticDiagnostics: true,
35496
- affectsMultiFileEmitBuildInfo: true,
35516
+ affectsBuildInfo: true,
35497
35517
  category: Diagnostics.Type_Checking,
35498
35518
  description: Diagnostics.Disable_error_reporting_for_unreachable_code,
35499
35519
  defaultValueDescription: void 0
@@ -35502,7 +35522,7 @@ ${lanes.join("\n")}
35502
35522
  name: "suppressExcessPropertyErrors",
35503
35523
  type: "boolean",
35504
35524
  affectsSemanticDiagnostics: true,
35505
- affectsMultiFileEmitBuildInfo: true,
35525
+ affectsBuildInfo: true,
35506
35526
  category: Diagnostics.Backwards_Compatibility,
35507
35527
  description: Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
35508
35528
  defaultValueDescription: false
@@ -35511,7 +35531,7 @@ ${lanes.join("\n")}
35511
35531
  name: "suppressImplicitAnyIndexErrors",
35512
35532
  type: "boolean",
35513
35533
  affectsSemanticDiagnostics: true,
35514
- affectsMultiFileEmitBuildInfo: true,
35534
+ affectsBuildInfo: true,
35515
35535
  category: Diagnostics.Backwards_Compatibility,
35516
35536
  description: Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
35517
35537
  defaultValueDescription: false
@@ -35536,7 +35556,7 @@ ${lanes.join("\n")}
35536
35556
  name: "noStrictGenericChecks",
35537
35557
  type: "boolean",
35538
35558
  affectsSemanticDiagnostics: true,
35539
- affectsMultiFileEmitBuildInfo: true,
35559
+ affectsBuildInfo: true,
35540
35560
  category: Diagnostics.Backwards_Compatibility,
35541
35561
  description: Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
35542
35562
  defaultValueDescription: false
@@ -35546,7 +35566,7 @@ ${lanes.join("\n")}
35546
35566
  type: "boolean",
35547
35567
  affectsSemanticDiagnostics: true,
35548
35568
  affectsEmit: true,
35549
- affectsMultiFileEmitBuildInfo: true,
35569
+ affectsBuildInfo: true,
35550
35570
  category: Diagnostics.Language_and_Environment,
35551
35571
  description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
35552
35572
  defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext
@@ -35555,7 +35575,7 @@ ${lanes.join("\n")}
35555
35575
  name: "preserveValueImports",
35556
35576
  type: "boolean",
35557
35577
  affectsEmit: true,
35558
- affectsMultiFileEmitBuildInfo: true,
35578
+ affectsBuildInfo: true,
35559
35579
  category: Diagnostics.Emit,
35560
35580
  description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
35561
35581
  defaultValueDescription: false
@@ -37794,14 +37814,18 @@ ${lanes.join("\n")}
37794
37814
  return result;
37795
37815
  }
37796
37816
  }
37817
+ function getResolutionName(entry) {
37818
+ return !isString(entry) ? isStringLiteralLike(entry) ? entry.text : toFileNameLowerCase(entry.fileName) : entry;
37819
+ }
37820
+ function getResolutionMode(entry, file) {
37821
+ return isStringLiteralLike(entry) ? getModeForUsageLocation(file, entry) : entry.resolutionMode || file.impliedNodeFormat;
37822
+ }
37797
37823
  function zipToModeAwareCache(file, keys, values) {
37798
37824
  Debug.assert(keys.length === values.length);
37799
37825
  const map2 = createModeAwareCache();
37800
37826
  for (let i = 0; i < keys.length; ++i) {
37801
37827
  const entry = keys[i];
37802
- const name = !isString(entry) ? entry.fileName.toLowerCase() : entry;
37803
- const mode = !isString(entry) ? entry.resolutionMode || file.impliedNodeFormat : getModeForResolutionAtIndex(file, i);
37804
- map2.set(name, mode, values[i]);
37828
+ map2.set(getResolutionName(entry), getResolutionMode(entry, file), values[i]);
37805
37829
  }
37806
37830
  return map2;
37807
37831
  }
@@ -52718,13 +52742,6 @@ ${lanes.join("\n")}
52718
52742
  function isOptionalPropertyDeclaration(node) {
52719
52743
  return isPropertyDeclaration(node) && !hasAccessorModifier(node) && node.questionToken;
52720
52744
  }
52721
- function isOptionalJSDocPropertyLikeTag(node) {
52722
- if (!isJSDocPropertyLikeTag(node)) {
52723
- return false;
52724
- }
52725
- const { isBracketed, typeExpression } = node;
52726
- return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */;
52727
- }
52728
52745
  function createTypePredicate(kind, parameterName, parameterIndex, type) {
52729
52746
  return { kind, parameterName, parameterIndex, type };
52730
52747
  }
@@ -57330,7 +57347,7 @@ ${lanes.join("\n")}
57330
57347
  }
57331
57348
  function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) {
57332
57349
  if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 131068 /* Primitive */) {
57333
- if (isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) {
57350
+ if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) {
57334
57351
  return -1 /* True */;
57335
57352
  }
57336
57353
  if (reportErrors2) {
@@ -60461,6 +60478,7 @@ ${lanes.join("\n")}
60461
60478
  }
60462
60479
  }
60463
60480
  function inferFromObjectTypes(source, target) {
60481
+ var _a2, _b;
60464
60482
  if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) {
60465
60483
  inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));
60466
60484
  return;
@@ -60507,11 +60525,35 @@ ${lanes.join("\n")}
60507
60525
  }
60508
60526
  } else {
60509
60527
  const middleLength = targetArity - startLength - endLength;
60510
- if (middleLength === 2 && elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */ && isTupleType(source)) {
60511
- const targetInfo = getInferenceInfoForType(elementTypes[startLength]);
60512
- if (targetInfo && targetInfo.impliedArity !== void 0) {
60513
- inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
60514
- inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
60528
+ if (middleLength === 2) {
60529
+ if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */ && isTupleType(source)) {
60530
+ const targetInfo = getInferenceInfoForType(elementTypes[startLength]);
60531
+ if (targetInfo && targetInfo.impliedArity !== void 0) {
60532
+ inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
60533
+ inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
60534
+ }
60535
+ } else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) {
60536
+ const param = (_a2 = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _a2.typeParameter;
60537
+ const constraint = param && getBaseConstraintOfType(param);
60538
+ if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) {
60539
+ const impliedArity = constraint.target.fixedLength;
60540
+ inferFromTypes(sliceTupleType(source, startLength, sourceArity - (startLength + impliedArity)), elementTypes[startLength]);
60541
+ }
60542
+ } else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */ && isTupleType(source)) {
60543
+ const param = (_b = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _b.typeParameter;
60544
+ const constraint = param && getBaseConstraintOfType(param);
60545
+ if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) {
60546
+ const impliedArity = constraint.target.fixedLength;
60547
+ const endIndex = sourceArity - getEndElementCount(target.target, 3 /* Fixed */);
60548
+ const startIndex = endIndex - impliedArity;
60549
+ const trailingSlice = createTupleType(
60550
+ getTypeArguments(source).slice(startIndex, endIndex),
60551
+ source.target.elementFlags.slice(startIndex, endIndex),
60552
+ false,
60553
+ source.target.labeledElementDeclarations && source.target.labeledElementDeclarations.slice(startIndex, endIndex)
60554
+ );
60555
+ inferFromTypes(trailingSlice, elementTypes[startLength + 1]);
60556
+ }
60515
60557
  }
60516
60558
  } else if (middleLength === 1 && elementFlags[startLength] & 8 /* Variadic */) {
60517
60559
  const endsInOptional = target.target.elementFlags[targetArity - 1] & 2 /* Optional */;
@@ -79193,6 +79235,7 @@ ${lanes.join("\n")}
79193
79235
  } while (inValue > 0);
79194
79236
  }
79195
79237
  }
79238
+ var sourceMapCommentRegExpDontCareLineStart = /\/\/[@#] source[M]appingURL=(.+)\r?\n?$/;
79196
79239
  var sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/;
79197
79240
  var whitespaceOrMapCommentRegExp = /^\s*(\/\/[@#] .*)?$/;
79198
79241
  function getLineInfo(text, lineStarts) {
@@ -96227,14 +96270,14 @@ ${lanes.join("\n")}
96227
96270
  }
96228
96271
  }
96229
96272
  var noTransformers = { scriptTransformers: emptyArray, declarationTransformers: emptyArray };
96230
- function getTransformers(compilerOptions, customTransformers, emitOnlyDtsFiles) {
96273
+ function getTransformers(compilerOptions, customTransformers, emitOnly) {
96231
96274
  return {
96232
- scriptTransformers: getScriptTransformers(compilerOptions, customTransformers, emitOnlyDtsFiles),
96275
+ scriptTransformers: getScriptTransformers(compilerOptions, customTransformers, emitOnly),
96233
96276
  declarationTransformers: getDeclarationTransformers(customTransformers)
96234
96277
  };
96235
96278
  }
96236
- function getScriptTransformers(compilerOptions, customTransformers, emitOnlyDtsFiles) {
96237
- if (emitOnlyDtsFiles)
96279
+ function getScriptTransformers(compilerOptions, customTransformers, emitOnly) {
96280
+ if (emitOnly)
96238
96281
  return emptyArray;
96239
96282
  const languageVersion = getEmitScriptTarget(compilerOptions);
96240
96283
  const moduleKind = getEmitModuleKind(compilerOptions);
@@ -96821,8 +96864,8 @@ ${lanes.join("\n")}
96821
96864
  }
96822
96865
  function getFirstProjectOutput(configFile, ignoreCase) {
96823
96866
  if (outFile(configFile.options)) {
96824
- const { jsFilePath } = getOutputPathsForBundle(configFile.options, false);
96825
- return Debug.checkDefined(jsFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`);
96867
+ const { jsFilePath, declarationFilePath } = getOutputPathsForBundle(configFile.options, false);
96868
+ return Debug.checkDefined(jsFilePath || declarationFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`);
96826
96869
  }
96827
96870
  const getCommonSourceDirectory2 = memoize(() => getCommonSourceDirectoryOfConfig(configFile, ignoreCase));
96828
96871
  for (const inputFileName of configFile.fileNames) {
@@ -96842,7 +96885,7 @@ ${lanes.join("\n")}
96842
96885
  return buildInfoPath;
96843
96886
  return Debug.fail(`project ${configFile.options.configFilePath} expected to have at least one output`);
96844
96887
  }
96845
- function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnlyDtsFiles, onlyBuildInfo, forceDtsEmit) {
96888
+ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnly, onlyBuildInfo, forceDtsEmit) {
96846
96889
  const compilerOptions = host.getCompilerOptions();
96847
96890
  const sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap || getAreDeclarationMapsEnabled(compilerOptions) ? [] : void 0;
96848
96891
  const emittedFilesList = compilerOptions.listEmittedFiles ? [] : void 0;
@@ -96888,7 +96931,7 @@ ${lanes.join("\n")}
96888
96931
  emitBuildInfo(bundleBuildInfo, buildInfoPath);
96889
96932
  (_f = tracing) == null ? void 0 : _f.pop();
96890
96933
  if (!emitSkipped && emittedFilesList) {
96891
- if (!emitOnlyDtsFiles) {
96934
+ if (!emitOnly) {
96892
96935
  if (jsFilePath) {
96893
96936
  emittedFilesList.push(jsFilePath);
96894
96937
  }
@@ -96899,11 +96942,13 @@ ${lanes.join("\n")}
96899
96942
  emittedFilesList.push(buildInfoPath);
96900
96943
  }
96901
96944
  }
96902
- if (declarationFilePath) {
96903
- emittedFilesList.push(declarationFilePath);
96904
- }
96905
- if (declarationMapPath) {
96906
- emittedFilesList.push(declarationMapPath);
96945
+ if (emitOnly !== 0 /* Js */) {
96946
+ if (declarationFilePath) {
96947
+ emittedFilesList.push(declarationFilePath);
96948
+ }
96949
+ if (declarationMapPath) {
96950
+ emittedFilesList.push(declarationMapPath);
96951
+ }
96907
96952
  }
96908
96953
  }
96909
96954
  function relativeToBuildInfo(path) {
@@ -96913,17 +96958,15 @@ ${lanes.join("\n")}
96913
96958
  function emitBuildInfo(bundle, buildInfoPath) {
96914
96959
  if (!buildInfoPath || targetSourceFile || emitSkipped)
96915
96960
  return;
96916
- const program = host.getProgramBuildInfo();
96917
96961
  if (host.isEmitBlocked(buildInfoPath)) {
96918
96962
  emitSkipped = true;
96919
96963
  return;
96920
96964
  }
96921
- const version2 = version;
96922
- const buildInfo = { bundle, program, version: version2 };
96965
+ const buildInfo = host.getBuildInfo(bundle) || createBuildInfo(void 0, bundle);
96923
96966
  writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, void 0, { buildInfo });
96924
96967
  }
96925
96968
  function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
96926
- if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
96969
+ if (!sourceFileOrBundle || emitOnly || !jsFilePath) {
96927
96970
  return;
96928
96971
  }
96929
96972
  if (host.isEmitBlocked(jsFilePath) || compilerOptions.noEmit) {
@@ -96957,17 +97000,17 @@ ${lanes.join("\n")}
96957
97000
  bundleBuildInfo.js = printer.bundleFileInfo;
96958
97001
  }
96959
97002
  function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) {
96960
- if (!sourceFileOrBundle)
97003
+ if (!sourceFileOrBundle || emitOnly === 0 /* Js */)
96961
97004
  return;
96962
97005
  if (!declarationFilePath) {
96963
- if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly)
97006
+ if (emitOnly || compilerOptions.emitDeclarationOnly)
96964
97007
  emitSkipped = true;
96965
97008
  return;
96966
97009
  }
96967
97010
  const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
96968
97011
  const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
96969
97012
  const inputListOrBundle = outFile(compilerOptions) ? [factory.createBundle(filesForEmit, !isSourceFile(sourceFileOrBundle) ? sourceFileOrBundle.prepends : void 0)] : filesForEmit;
96970
- if (emitOnlyDtsFiles && !getEmitDeclarations(compilerOptions)) {
97013
+ if (emitOnly && !getEmitDeclarations(compilerOptions)) {
96971
97014
  filesForEmit.forEach(collectLinkedAliases);
96972
97015
  }
96973
97016
  const declarationTransform = transformNodes(resolver, host, factory, compilerOptions, inputListOrBundle, declarationTransformers, false);
@@ -97137,6 +97180,10 @@ ${lanes.join("\n")}
97137
97180
  return encodeURI(sourceMapFile);
97138
97181
  }
97139
97182
  }
97183
+ function createBuildInfo(program, bundle) {
97184
+ const version2 = version;
97185
+ return { bundle, program, version: version2 };
97186
+ }
97140
97187
  function getBuildInfoText(buildInfo) {
97141
97188
  return JSON.stringify(buildInfo);
97142
97189
  }
@@ -97296,19 +97343,7 @@ ${lanes.join("\n")}
97296
97343
  return;
97297
97344
  break;
97298
97345
  case buildInfoPath:
97299
- const newBuildInfo = data.buildInfo;
97300
- newBuildInfo.program = buildInfo.program;
97301
- if (newBuildInfo.program && changedDtsText !== void 0 && config.options.composite) {
97302
- newBuildInfo.program.outSignature = computeSignature(changedDtsText, createHash, changedDtsData);
97303
- }
97304
- const { js, dts, sourceFiles } = buildInfo.bundle;
97305
- newBuildInfo.bundle.js.sources = js.sources;
97306
- if (dts) {
97307
- newBuildInfo.bundle.dts.sources = dts.sources;
97308
- }
97309
- newBuildInfo.bundle.sourceFiles = sourceFiles;
97310
- outputFiles.push({ name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark, buildInfo: newBuildInfo });
97311
- return;
97346
+ break;
97312
97347
  case declarationFilePath:
97313
97348
  if (declarationText === text)
97314
97349
  return;
@@ -97322,13 +97357,25 @@ ${lanes.join("\n")}
97322
97357
  default:
97323
97358
  Debug.fail(`Unexpected path: ${name}`);
97324
97359
  }
97325
- outputFiles.push({ name, text, writeByteOrderMark });
97360
+ outputFiles.push({ name, text, writeByteOrderMark, data });
97326
97361
  },
97327
97362
  isEmitBlocked: returnFalse,
97328
97363
  readFile: (f) => host.readFile(f),
97329
97364
  fileExists: (f) => host.fileExists(f),
97330
97365
  useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
97331
- getProgramBuildInfo: returnUndefined,
97366
+ getBuildInfo: (bundle) => {
97367
+ const program = buildInfo.program;
97368
+ if (program && changedDtsText !== void 0 && config.options.composite) {
97369
+ program.outSignature = computeSignature(changedDtsText, createHash, changedDtsData);
97370
+ }
97371
+ const { js, dts, sourceFiles } = buildInfo.bundle;
97372
+ bundle.js.sources = js.sources;
97373
+ if (dts) {
97374
+ bundle.dts.sources = dts.sources;
97375
+ }
97376
+ bundle.sourceFiles = sourceFiles;
97377
+ return createBuildInfo(program, bundle);
97378
+ },
97332
97379
  getSourceFileFromReference: returnUndefined,
97333
97380
  redirectTargetsMap: createMultiMap(),
97334
97381
  getFileIncludeReasons: notImplemented,
@@ -102292,7 +102339,7 @@ ${lanes.join("\n")}
102292
102339
  for (const name of names) {
102293
102340
  let result;
102294
102341
  const mode = getModeForFileReference(name, containingFileMode);
102295
- const strName = isString(name) ? name : name.fileName.toLowerCase();
102342
+ const strName = getResolutionName(name);
102296
102343
  const cacheKey = mode !== void 0 ? `${mode}|${strName}` : strName;
102297
102344
  if (cache.has(cacheKey)) {
102298
102345
  result = cache.get(cacheKey);
@@ -102368,17 +102415,18 @@ ${lanes.join("\n")}
102368
102415
  }
102369
102416
  return elem.value.text === "import" ? 99 /* ESNext */ : 1 /* CommonJS */;
102370
102417
  }
102371
- function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
102418
+ function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, resolutionInfo, loader) {
102372
102419
  if (names.length === 0) {
102373
102420
  return [];
102374
102421
  }
102375
102422
  const resolutions = [];
102376
102423
  const cache = new Map();
102377
102424
  let i = 0;
102378
- for (const name of names) {
102425
+ for (const entry of resolutionInfo ? resolutionInfo.names : names) {
102379
102426
  let result;
102380
- const mode = getModeForResolutionAtIndex(containingFile, i);
102427
+ const mode = !isString(entry) ? getModeForUsageLocation(containingFile, entry) : getModeForResolutionAtIndex(containingFile, i);
102381
102428
  i++;
102429
+ const name = isString(entry) ? entry : entry.text;
102382
102430
  const cacheKey = mode !== void 0 ? `${mode}|${name}` : name;
102383
102431
  if (cache.has(cacheKey)) {
102384
102432
  result = cache.get(cacheKey);
@@ -102675,23 +102723,34 @@ ${lanes.join("\n")}
102675
102723
  let actualResolveModuleNamesWorker;
102676
102724
  const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse;
102677
102725
  if (host.resolveModuleNames) {
102678
- actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, reusedNames, redirectedReference) => host.resolveModuleNames(Debug.checkEachDefined(moduleNames), containingFileName, reusedNames, redirectedReference, options, containingFile).map((resolved) => {
102679
- if (!resolved || resolved.extension !== void 0) {
102680
- return resolved;
102681
- }
102682
- const withExtension = clone(resolved);
102683
- withExtension.extension = extensionFromPath(resolved.resolvedFileName);
102684
- return withExtension;
102685
- });
102726
+ actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo) => {
102727
+ var _a3;
102728
+ return host.resolveModuleNames(
102729
+ moduleNames.map((literal) => literal.text),
102730
+ containingFileName,
102731
+ (_a3 = resolutionInfo == null ? void 0 : resolutionInfo.reusedNames) == null ? void 0 : _a3.map((literal) => literal.text),
102732
+ redirectedReference,
102733
+ options,
102734
+ containingFile,
102735
+ resolutionInfo
102736
+ ).map((resolved) => {
102737
+ if (!resolved || resolved.extension !== void 0) {
102738
+ return resolved;
102739
+ }
102740
+ const withExtension = clone(resolved);
102741
+ withExtension.extension = extensionFromPath(resolved.resolvedFileName);
102742
+ return withExtension;
102743
+ });
102744
+ };
102686
102745
  moduleResolutionCache = (_b = host.getModuleResolutionCache) == null ? void 0 : _b.call(host);
102687
102746
  } else {
102688
102747
  moduleResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName, options);
102689
102748
  const loader = (moduleName, resolverMode, containingFileName, redirectedReference) => resolveModuleName(moduleName, containingFileName, options, host, moduleResolutionCache, redirectedReference, resolverMode).resolvedModule;
102690
- actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, _reusedNames, redirectedReference) => loadWithModeAwareCache(Debug.checkEachDefined(moduleNames), containingFile, containingFileName, redirectedReference, loader);
102749
+ actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo) => loadWithModeAwareCache(moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo, loader);
102691
102750
  }
102692
102751
  let actualResolveTypeReferenceDirectiveNamesWorker;
102693
102752
  if (host.resolveTypeReferenceDirectives) {
102694
- actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, containingFileMode) => host.resolveTypeReferenceDirectives(Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options, containingFileMode);
102753
+ actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, containingFileMode, resolutionInfo) => host.resolveTypeReferenceDirectives(Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options, containingFileMode, resolutionInfo);
102695
102754
  } else {
102696
102755
  typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, void 0, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache());
102697
102756
  const loader = (typesRef, containingFile, redirectedReference, resolutionMode) => resolveTypeReferenceDirective(
@@ -102775,7 +102834,7 @@ ${lanes.join("\n")}
102775
102834
  (_j = tracing) == null ? void 0 : _j.push(tracing.Phase.Program, "processTypeReferences", { count: typeReferences.length });
102776
102835
  const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : host.getCurrentDirectory();
102777
102836
  const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile);
102778
- const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename);
102837
+ const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeReferences, containingFilename);
102779
102838
  for (let i = 0; i < typeReferences.length; i++) {
102780
102839
  processTypeReferenceDirective(typeReferences[i], void 0, resolutions[i], { kind: 8 /* AutomaticTypeDirectiveFile */, typeReference: typeReferences[i], packageId: (_k = resolutions[i]) == null ? void 0 : _k.packageId });
102781
102840
  }
@@ -102916,21 +102975,18 @@ ${lanes.join("\n")}
102916
102975
  if (!moduleResolutionCache)
102917
102976
  return;
102918
102977
  const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
102919
- const containingFileMode = !isString(containingFile) ? containingFile.impliedNodeFormat : void 0;
102920
102978
  const containingDir = getDirectoryPath(containingFileName);
102921
102979
  const redirectedReference = getRedirectReferenceForResolution(containingFile);
102922
- let i = 0;
102923
102980
  for (const n of names) {
102924
- const mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode);
102925
- const name = typeof n === "string" ? n : n.fileName;
102926
- i++;
102981
+ const mode = getResolutionMode(n, containingFile);
102982
+ const name = getResolutionName(n);
102927
102983
  if (isExternalModuleNameRelative(name))
102928
102984
  continue;
102929
102985
  const diags = (_a3 = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)) == null ? void 0 : _a3.resolutionDiagnostics;
102930
102986
  addResolutionDiagnostics(diags);
102931
102987
  }
102932
102988
  }
102933
- function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {
102989
+ function resolveModuleNamesWorker(moduleNames, containingFile, resolutionInfo) {
102934
102990
  var _a3, _b2;
102935
102991
  if (!moduleNames.length)
102936
102992
  return emptyArray;
@@ -102938,14 +102994,14 @@ ${lanes.join("\n")}
102938
102994
  const redirectedReference = getRedirectReferenceForResolution(containingFile);
102939
102995
  (_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "resolveModuleNamesWorker", { containingFileName });
102940
102996
  mark("beforeResolveModule");
102941
- const result = actualResolveModuleNamesWorker(moduleNames, containingFile, containingFileName, reusedNames, redirectedReference);
102997
+ const result = actualResolveModuleNamesWorker(moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo);
102942
102998
  mark("afterResolveModule");
102943
102999
  measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
102944
103000
  (_b2 = tracing) == null ? void 0 : _b2.pop();
102945
103001
  pullDiagnosticsFromCache(moduleNames, containingFile);
102946
103002
  return result;
102947
103003
  }
102948
- function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile) {
103004
+ function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, resolutionInfo) {
102949
103005
  var _a3, _b2;
102950
103006
  if (!typeDirectiveNames.length)
102951
103007
  return [];
@@ -102954,7 +103010,7 @@ ${lanes.join("\n")}
102954
103010
  const containingFileMode = !isString(containingFile) ? containingFile.impliedNodeFormat : void 0;
102955
103011
  (_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName });
102956
103012
  mark("beforeResolveTypeReference");
102957
- const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference, containingFileMode);
103013
+ const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference, containingFileMode, resolutionInfo);
102958
103014
  mark("afterResolveTypeReference");
102959
103015
  measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference");
102960
103016
  (_b2 = tracing) == null ? void 0 : _b2.pop();
@@ -103037,10 +103093,8 @@ ${lanes.join("\n")}
103037
103093
  const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName);
103038
103094
  if (oldSourceFile !== file && file.resolvedModules) {
103039
103095
  const result2 = [];
103040
- let i = 0;
103041
103096
  for (const moduleName of moduleNames) {
103042
- const resolvedModule = file.resolvedModules.get(moduleName, getModeForResolutionAtIndex(file, i));
103043
- i++;
103097
+ const resolvedModule = file.resolvedModules.get(moduleName.text, getModeForUsageLocation(file, moduleName));
103044
103098
  result2.push(resolvedModule);
103045
103099
  }
103046
103100
  return result2;
@@ -103052,39 +103106,40 @@ ${lanes.join("\n")}
103052
103106
  for (let i = 0; i < moduleNames.length; i++) {
103053
103107
  const moduleName = moduleNames[i];
103054
103108
  if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) {
103055
- const oldResolvedModule = getResolvedModule(oldSourceFile, moduleName, getModeForResolutionAtIndex(oldSourceFile, i));
103109
+ const mode = getModeForUsageLocation(file, moduleName);
103110
+ const oldResolvedModule = getResolvedModule(oldSourceFile, moduleName.text, mode);
103056
103111
  if (oldResolvedModule) {
103057
103112
  if (isTraceEnabled(options, host)) {
103058
103113
  trace(
103059
103114
  host,
103060
103115
  oldResolvedModule.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2,
103061
- moduleName,
103116
+ moduleName.text,
103062
103117
  getNormalizedAbsolutePath(file.originalFileName, currentDirectory),
103063
103118
  oldResolvedModule.resolvedFileName,
103064
103119
  oldResolvedModule.packageId && packageIdToString(oldResolvedModule.packageId)
103065
103120
  );
103066
103121
  }
103067
- (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
103068
- (reusedNames || (reusedNames = [])).push(moduleName);
103122
+ (result != null ? result : result = new Array(moduleNames.length))[i] = oldResolvedModule;
103123
+ (reusedNames != null ? reusedNames : reusedNames = []).push(moduleName);
103069
103124
  continue;
103070
103125
  }
103071
103126
  }
103072
103127
  let resolvesToAmbientModuleInNonModifiedFile = false;
103073
- if (contains(file.ambientModuleNames, moduleName)) {
103128
+ if (contains(file.ambientModuleNames, moduleName.text)) {
103074
103129
  resolvesToAmbientModuleInNonModifiedFile = true;
103075
103130
  if (isTraceEnabled(options, host)) {
103076
- trace(host, Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName, getNormalizedAbsolutePath(file.originalFileName, currentDirectory));
103131
+ trace(host, Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName.text, getNormalizedAbsolutePath(file.originalFileName, currentDirectory));
103077
103132
  }
103078
103133
  } else {
103079
- resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, i);
103134
+ resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName);
103080
103135
  }
103081
103136
  if (resolvesToAmbientModuleInNonModifiedFile) {
103082
103137
  (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
103083
103138
  } else {
103084
- (unknownModuleNames || (unknownModuleNames = [])).push(moduleName);
103139
+ (unknownModuleNames != null ? unknownModuleNames : unknownModuleNames = []).push(moduleName);
103085
103140
  }
103086
103141
  }
103087
- const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file, reusedNames) : emptyArray;
103142
+ const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file, { names: unknownModuleNames, reusedNames }) : emptyArray;
103088
103143
  if (!result) {
103089
103144
  Debug.assert(resolutions.length === moduleNames.length);
103090
103145
  return resolutions;
@@ -103102,24 +103157,87 @@ ${lanes.join("\n")}
103102
103157
  }
103103
103158
  Debug.assert(j === resolutions.length);
103104
103159
  return result;
103105
- function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, index) {
103106
- if (index >= length(oldSourceFile == null ? void 0 : oldSourceFile.imports) + length(oldSourceFile == null ? void 0 : oldSourceFile.moduleAugmentations))
103107
- return false;
103108
- const resolutionToFile = getResolvedModule(oldSourceFile, moduleName, oldSourceFile && getModeForResolutionAtIndex(oldSourceFile, index));
103160
+ function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) {
103161
+ const resolutionToFile = getResolvedModule(oldSourceFile, moduleName.text, getModeForUsageLocation(file, moduleName));
103109
103162
  const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName);
103110
103163
  if (resolutionToFile && resolvedFile) {
103111
103164
  return false;
103112
103165
  }
103113
- const unmodifiedFile = ambientModuleNameToUnmodifiedFileName.get(moduleName);
103166
+ const unmodifiedFile = ambientModuleNameToUnmodifiedFileName.get(moduleName.text);
103114
103167
  if (!unmodifiedFile) {
103115
103168
  return false;
103116
103169
  }
103117
103170
  if (isTraceEnabled(options, host)) {
103118
- trace(host, Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified, moduleName, unmodifiedFile);
103171
+ trace(host, Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified, moduleName.text, unmodifiedFile);
103119
103172
  }
103120
103173
  return true;
103121
103174
  }
103122
103175
  }
103176
+ function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) {
103177
+ if (structureIsReused === 0 /* Not */) {
103178
+ return resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, void 0);
103179
+ }
103180
+ const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0;
103181
+ if (!isString(containingFile)) {
103182
+ if (oldSourceFile !== containingFile && containingFile.resolvedTypeReferenceDirectiveNames) {
103183
+ const result2 = [];
103184
+ for (const typeDirectiveName of typeDirectiveNames) {
103185
+ const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(getResolutionName(typeDirectiveName), typeDirectiveName.resolutionMode || containingFile.impliedNodeFormat);
103186
+ result2.push(resolvedTypeReferenceDirective);
103187
+ }
103188
+ return result2;
103189
+ }
103190
+ }
103191
+ let unknownTypeReferenceDirectiveNames;
103192
+ let result;
103193
+ let reusedNames;
103194
+ const containingSourceFile = !isString(containingFile) ? containingFile : void 0;
103195
+ const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile));
103196
+ for (let i = 0; i < typeDirectiveNames.length; i++) {
103197
+ const entry = typeDirectiveNames[i];
103198
+ if (canReuseResolutions) {
103199
+ const typeDirectiveName = getResolutionName(entry);
103200
+ const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat);
103201
+ const oldResolvedTypeReferenceDirective = getResolvedTypeReferenceDirective(oldSourceFile, typeDirectiveName, mode);
103202
+ if (oldResolvedTypeReferenceDirective) {
103203
+ if (isTraceEnabled(options, host)) {
103204
+ trace(
103205
+ host,
103206
+ oldResolvedTypeReferenceDirective.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2,
103207
+ typeDirectiveName,
103208
+ !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile,
103209
+ oldResolvedTypeReferenceDirective.resolvedFileName,
103210
+ oldResolvedTypeReferenceDirective.packageId && packageIdToString(oldResolvedTypeReferenceDirective.packageId)
103211
+ );
103212
+ }
103213
+ (result != null ? result : result = new Array(typeDirectiveNames.length))[i] = oldResolvedTypeReferenceDirective;
103214
+ (reusedNames != null ? reusedNames : reusedNames = []).push(entry);
103215
+ continue;
103216
+ }
103217
+ }
103218
+ (unknownTypeReferenceDirectiveNames != null ? unknownTypeReferenceDirectiveNames : unknownTypeReferenceDirectiveNames = []).push(entry);
103219
+ }
103220
+ if (!unknownTypeReferenceDirectiveNames)
103221
+ return result || emptyArray;
103222
+ const resolutions = resolveTypeReferenceDirectiveNamesWorker(
103223
+ unknownTypeReferenceDirectiveNames,
103224
+ containingFile,
103225
+ { names: unknownTypeReferenceDirectiveNames, reusedNames }
103226
+ );
103227
+ if (!result) {
103228
+ Debug.assert(resolutions.length === typeDirectiveNames.length);
103229
+ return resolutions;
103230
+ }
103231
+ let j = 0;
103232
+ for (let i = 0; i < result.length; i++) {
103233
+ if (!result[i]) {
103234
+ result[i] = resolutions[j];
103235
+ j++;
103236
+ }
103237
+ }
103238
+ Debug.assert(j === resolutions.length);
103239
+ return result;
103240
+ }
103123
103241
  function canReuseProjectReferences() {
103124
103242
  return !forEachProjectReference(
103125
103243
  oldProgram.getProjectReferences(),
@@ -103250,7 +103368,7 @@ ${lanes.join("\n")}
103250
103368
  for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) {
103251
103369
  const moduleNames = getModuleNames(newSourceFile);
103252
103370
  const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);
103253
- const resolutionsChanged = hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, oldSourceFile, moduleResolutionIsEqualTo);
103371
+ const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo);
103254
103372
  if (resolutionsChanged) {
103255
103373
  structureIsReused = 1 /* SafeModules */;
103256
103374
  newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions);
@@ -103258,8 +103376,8 @@ ${lanes.join("\n")}
103258
103376
  newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
103259
103377
  }
103260
103378
  const typesReferenceDirectives = newSourceFile.typeReferenceDirectives;
103261
- const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFile);
103262
- const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, oldSourceFile, typeDirectiveIsEqualTo);
103379
+ const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile);
103380
+ const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo);
103263
103381
  if (typeReferenceResolutionsChanged) {
103264
103382
  structureIsReused = 1 /* SafeModules */;
103265
103383
  newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions);
@@ -103330,7 +103448,10 @@ ${lanes.join("\n")}
103330
103448
  return host.fileExists(f);
103331
103449
  },
103332
103450
  useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
103333
- getProgramBuildInfo: () => program.getProgramBuildInfo && program.getProgramBuildInfo(),
103451
+ getBuildInfo: (bundle) => {
103452
+ var _a3;
103453
+ return (_a3 = program.getBuildInfo) == null ? void 0 : _a3.call(program, bundle);
103454
+ },
103334
103455
  getSourceFileFromReference: (file, ref) => program.getSourceFileFromReference(file, ref),
103335
103456
  redirectTargetsMap,
103336
103457
  getFileIncludeReasons: program.getFileIncludeReasons,
@@ -103402,17 +103523,17 @@ ${lanes.join("\n")}
103402
103523
  function getTypeChecker() {
103403
103524
  return typeChecker || (typeChecker = createTypeChecker(program));
103404
103525
  }
103405
- function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers, forceDtsEmit) {
103526
+ function emit(sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit) {
103406
103527
  var _a3, _b2;
103407
103528
  (_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Emit, "emit", { path: sourceFile == null ? void 0 : sourceFile.path }, true);
103408
- const result = runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers, forceDtsEmit));
103529
+ const result = runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit));
103409
103530
  (_b2 = tracing) == null ? void 0 : _b2.pop();
103410
103531
  return result;
103411
103532
  }
103412
103533
  function isEmitBlocked(emitFileName) {
103413
103534
  return hasEmitBlockingDiagnostics.has(toPath3(emitFileName));
103414
103535
  }
103415
- function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit) {
103536
+ function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnly, customTransformers, forceDtsEmit) {
103416
103537
  if (!forceDtsEmit) {
103417
103538
  const result = handleNoEmitOptions(program2, sourceFile, writeFileCallback, cancellationToken);
103418
103539
  if (result)
@@ -103424,8 +103545,8 @@ ${lanes.join("\n")}
103424
103545
  emitResolver,
103425
103546
  getEmitHost(writeFileCallback),
103426
103547
  sourceFile,
103427
- getTransformers(options, customTransformers, emitOnlyDtsFiles),
103428
- emitOnlyDtsFiles,
103548
+ getTransformers(options, customTransformers, emitOnly),
103549
+ emitOnly,
103429
103550
  false,
103430
103551
  forceDtsEmit
103431
103552
  );
@@ -104239,12 +104360,12 @@ ${lanes.join("\n")}
104239
104360
  if (!typeDirectives) {
104240
104361
  return;
104241
104362
  }
104242
- const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeDirectives, file);
104363
+ const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file);
104243
104364
  for (let index = 0; index < typeDirectives.length; index++) {
104244
104365
  const ref = file.typeReferenceDirectives[index];
104245
104366
  const resolvedTypeReferenceDirective = resolutions[index];
104246
104367
  const fileName = toFileNameLowerCase(ref.fileName);
104247
- setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
104368
+ setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective, getModeForFileReference(ref, file.impliedNodeFormat));
104248
104369
  const mode = ref.resolutionMode || file.impliedNodeFormat;
104249
104370
  if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) {
104250
104371
  programDiagnostics.add(createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
@@ -104344,7 +104465,7 @@ ${lanes.join("\n")}
104344
104465
  const optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a3 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a3.commandLine.options : void 0) || options;
104345
104466
  for (let index = 0; index < moduleNames.length; index++) {
104346
104467
  const resolution = resolutions[index];
104347
- setResolvedModule(file, moduleNames[index], resolution, getModeForResolutionAtIndex(file, index));
104468
+ setResolvedModule(file, moduleNames[index].text, resolution, getModeForUsageLocation(file, moduleNames[index]));
104348
104469
  if (!resolution) {
104349
104470
  continue;
104350
104471
  }
@@ -105209,10 +105330,10 @@ ${lanes.join("\n")}
105209
105330
  }
105210
105331
  }
105211
105332
  function getModuleNames({ imports, moduleAugmentations }) {
105212
- const res = imports.map((i) => i.text);
105333
+ const res = imports.map((i) => i);
105213
105334
  for (const aug of moduleAugmentations) {
105214
105335
  if (aug.kind === 10 /* StringLiteral */) {
105215
- res.push(aug.text);
105336
+ res.push(aug);
105216
105337
  }
105217
105338
  }
105218
105339
  return res;
@@ -105377,7 +105498,8 @@ ${lanes.join("\n")}
105377
105498
  var _a2, _b, _c;
105378
105499
  const fileInfos = new Map();
105379
105500
  const options = newProgram.getCompilerOptions();
105380
- const referencedMap = options.module !== 0 /* None */ && !outFile(options) ? createManyToManyPathMap() : void 0;
105501
+ const isOutFile = outFile(options);
105502
+ const referencedMap = options.module !== 0 /* None */ && !isOutFile ? createManyToManyPathMap() : void 0;
105381
105503
  const exportedModulesMap = referencedMap ? createManyToManyPathMap() : void 0;
105382
105504
  const useOldState = canReuseOldState(referencedMap, oldState);
105383
105505
  newProgram.getTypeChecker();
@@ -105401,7 +105523,7 @@ ${lanes.join("\n")}
105401
105523
  fileInfos.set(sourceFile.resolvedPath, {
105402
105524
  version: version2,
105403
105525
  signature,
105404
- affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || void 0,
105526
+ affectsGlobalScope: !isOutFile ? isFileAffectingGlobalScope(sourceFile) || void 0 : void 0,
105405
105527
  impliedFormat: sourceFile.impliedNodeFormat
105406
105528
  });
105407
105529
  }
@@ -105631,10 +105753,46 @@ ${lanes.join("\n")}
105631
105753
 
105632
105754
  // src/compiler/builder.ts
105633
105755
  var BuilderFileEmit = /* @__PURE__ */ ((BuilderFileEmit2) => {
105634
- BuilderFileEmit2[BuilderFileEmit2["DtsOnly"] = 0] = "DtsOnly";
105635
- BuilderFileEmit2[BuilderFileEmit2["Full"] = 1] = "Full";
105756
+ BuilderFileEmit2[BuilderFileEmit2["None"] = 0] = "None";
105757
+ BuilderFileEmit2[BuilderFileEmit2["Js"] = 1] = "Js";
105758
+ BuilderFileEmit2[BuilderFileEmit2["JsMap"] = 2] = "JsMap";
105759
+ BuilderFileEmit2[BuilderFileEmit2["JsInlineMap"] = 4] = "JsInlineMap";
105760
+ BuilderFileEmit2[BuilderFileEmit2["Dts"] = 8] = "Dts";
105761
+ BuilderFileEmit2[BuilderFileEmit2["DtsMap"] = 16] = "DtsMap";
105762
+ BuilderFileEmit2[BuilderFileEmit2["AllJs"] = 7] = "AllJs";
105763
+ BuilderFileEmit2[BuilderFileEmit2["AllDts"] = 24] = "AllDts";
105764
+ BuilderFileEmit2[BuilderFileEmit2["All"] = 31] = "All";
105636
105765
  return BuilderFileEmit2;
105637
105766
  })(BuilderFileEmit || {});
105767
+ function getBuilderFileEmit(options) {
105768
+ let result = 1 /* Js */;
105769
+ if (options.sourceMap)
105770
+ result = result | 2 /* JsMap */;
105771
+ if (options.inlineSourceMap)
105772
+ result = result | 4 /* JsInlineMap */;
105773
+ if (getEmitDeclarations(options))
105774
+ result = result | 8 /* Dts */;
105775
+ if (options.declarationMap)
105776
+ result = result | 16 /* DtsMap */;
105777
+ if (options.emitDeclarationOnly)
105778
+ result = result & 24 /* AllDts */;
105779
+ return result;
105780
+ }
105781
+ function getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) {
105782
+ const oldEmitKind = oldOptionsOrEmitKind && (isNumber(oldOptionsOrEmitKind) ? oldOptionsOrEmitKind : getBuilderFileEmit(oldOptionsOrEmitKind));
105783
+ const emitKind = isNumber(optionsOrEmitKind) ? optionsOrEmitKind : getBuilderFileEmit(optionsOrEmitKind);
105784
+ if (oldEmitKind === emitKind)
105785
+ return 0 /* None */;
105786
+ if (!oldEmitKind || !emitKind)
105787
+ return emitKind;
105788
+ const diff = oldEmitKind ^ emitKind;
105789
+ let result = 0 /* None */;
105790
+ if (diff & 7 /* AllJs */)
105791
+ result = emitKind & 7 /* AllJs */;
105792
+ if (diff & 24 /* AllDts */)
105793
+ result = result | emitKind & 24 /* AllDts */;
105794
+ return result;
105795
+ }
105638
105796
  function hasSameKeys(map1, map2) {
105639
105797
  return map1 === map2 || map1 !== void 0 && map2 !== void 0 && map1.size === map2.size && !forEachKey(map1, (key) => !map2.has(key));
105640
105798
  }
@@ -105648,7 +105806,7 @@ ${lanes.join("\n")}
105648
105806
  if (!outFilePath) {
105649
105807
  state.semanticDiagnosticsPerFile = new Map();
105650
105808
  } else if (compilerOptions.composite && (oldState == null ? void 0 : oldState.outSignature) && outFilePath === outFile(oldState == null ? void 0 : oldState.compilerOptions)) {
105651
- state.outSignature = oldState == null ? void 0 : oldState.outSignature;
105809
+ state.outSignature = oldState.outSignature && getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldState.outSignature);
105652
105810
  }
105653
105811
  state.changedFilesSet = new Set();
105654
105812
  state.latestChangedDtsFile = compilerOptions.composite ? oldState == null ? void 0 : oldState.latestChangedDtsFile : void 0;
@@ -105658,22 +105816,24 @@ ${lanes.join("\n")}
105658
105816
  const canCopyEmitSignatures = compilerOptions.composite && (oldState == null ? void 0 : oldState.emitSignatures) && !outFilePath && !compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
105659
105817
  if (useOldState) {
105660
105818
  (_a2 = oldState.changedFilesSet) == null ? void 0 : _a2.forEach((value) => state.changedFilesSet.add(value));
105661
- if (!outFilePath && oldState.affectedFilesPendingEmit) {
105662
- state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
105663
- state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new Map(oldState.affectedFilesPendingEmitKind);
105664
- state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
105819
+ if (!outFilePath && ((_b = oldState.affectedFilesPendingEmit) == null ? void 0 : _b.size)) {
105820
+ state.affectedFilesPendingEmit = new Map(oldState.affectedFilesPendingEmit);
105665
105821
  state.seenAffectedFiles = new Set();
105666
105822
  }
105823
+ state.programEmitPending = oldState.programEmitPending;
105824
+ } else {
105825
+ state.buildInfoEmitPending = true;
105667
105826
  }
105668
105827
  const referencedMap = state.referencedMap;
105669
105828
  const oldReferencedMap = useOldState ? oldState.referencedMap : void 0;
105670
105829
  const copyDeclarationFileDiagnostics = canCopySemanticDiagnostics && !compilerOptions.skipLibCheck === !oldCompilerOptions.skipLibCheck;
105671
105830
  const copyLibFileDiagnostics = copyDeclarationFileDiagnostics && !compilerOptions.skipDefaultLibCheck === !oldCompilerOptions.skipDefaultLibCheck;
105672
105831
  state.fileInfos.forEach((info, sourceFilePath) => {
105832
+ var _a3;
105673
105833
  let oldInfo;
105674
105834
  let newReferences;
105675
105835
  if (!useOldState || !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || oldInfo.version !== info.version || oldInfo.impliedFormat !== info.impliedFormat || !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || newReferences && forEachKey(newReferences, (path) => !state.fileInfos.has(path) && oldState.fileInfos.has(path))) {
105676
- state.changedFilesSet.add(sourceFilePath);
105836
+ addFileToChangeSet(state, sourceFilePath);
105677
105837
  } else if (canCopySemanticDiagnostics) {
105678
105838
  const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
105679
105839
  if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics)
@@ -105691,20 +105851,50 @@ ${lanes.join("\n")}
105691
105851
  }
105692
105852
  if (canCopyEmitSignatures) {
105693
105853
  const oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
105694
- if (oldEmitSignature)
105695
- (state.emitSignatures || (state.emitSignatures = new Map())).set(sourceFilePath, oldEmitSignature);
105854
+ if (oldEmitSignature) {
105855
+ ((_a3 = state.emitSignatures) != null ? _a3 : state.emitSignatures = new Map()).set(sourceFilePath, getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldEmitSignature));
105856
+ }
105696
105857
  }
105697
105858
  });
105698
- if (useOldState && forEachEntry(oldState.fileInfos, (info, sourceFilePath) => info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath))) {
105699
- BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, void 0).forEach((file) => state.changedFilesSet.add(file.resolvedPath));
105700
- } else if (oldCompilerOptions && !outFilePath && compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
105701
- newProgram.getSourceFiles().forEach((f) => addToAffectedFilesPendingEmit(state, f.resolvedPath, 1 /* Full */));
105702
- Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
105703
- state.seenAffectedFiles = state.seenAffectedFiles || new Set();
105704
- }
105705
- state.buildInfoEmitPending = !useOldState || state.changedFilesSet.size !== (((_b = oldState.changedFilesSet) == null ? void 0 : _b.size) || 0);
105859
+ if (useOldState && forEachEntry(oldState.fileInfos, (info, sourceFilePath) => (outFilePath || info.affectsGlobalScope) && !state.fileInfos.has(sourceFilePath))) {
105860
+ BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, void 0).forEach((file) => addFileToChangeSet(state, file.resolvedPath));
105861
+ } else if (oldCompilerOptions) {
105862
+ const pendingEmitKind = compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions) ? getBuilderFileEmit(compilerOptions) : getPendingEmitKind(compilerOptions, oldCompilerOptions);
105863
+ if (pendingEmitKind !== 0 /* None */) {
105864
+ if (!outFilePath) {
105865
+ newProgram.getSourceFiles().forEach((f) => {
105866
+ if (!state.changedFilesSet.has(f.resolvedPath)) {
105867
+ addToAffectedFilesPendingEmit(
105868
+ state,
105869
+ f.resolvedPath,
105870
+ pendingEmitKind
105871
+ );
105872
+ }
105873
+ });
105874
+ Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
105875
+ state.seenAffectedFiles = state.seenAffectedFiles || new Set();
105876
+ state.buildInfoEmitPending = true;
105877
+ } else {
105878
+ state.programEmitPending = state.programEmitPending ? state.programEmitPending | pendingEmitKind : pendingEmitKind;
105879
+ }
105880
+ }
105881
+ }
105882
+ if (outFilePath && !state.changedFilesSet.size) {
105883
+ if (useOldState)
105884
+ state.bundle = oldState.bundle;
105885
+ if (some(newProgram.getProjectReferences(), (ref) => !!ref.prepend))
105886
+ state.programEmitPending = getBuilderFileEmit(compilerOptions);
105887
+ }
105706
105888
  return state;
105707
105889
  }
105890
+ function addFileToChangeSet(state, path) {
105891
+ state.changedFilesSet.add(path);
105892
+ state.buildInfoEmitPending = true;
105893
+ state.programEmitPending = void 0;
105894
+ }
105895
+ function getEmitSignatureFromOldSignature(options, oldOptions, oldEmitSignature) {
105896
+ return !!options.declarationMap === !!oldOptions.declarationMap ? oldEmitSignature : isString(oldEmitSignature) ? [oldEmitSignature] : oldEmitSignature[0];
105897
+ }
105708
105898
  function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
105709
105899
  if (!diagnostics.length)
105710
105900
  return emptyArray;
@@ -105738,11 +105928,9 @@ ${lanes.join("\n")}
105738
105928
  const outFilePath = outFile(state.compilerOptions);
105739
105929
  Debug.assert(!state.changedFilesSet.size || outFilePath);
105740
105930
  return {
105741
- affectedFilesPendingEmit: state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice(),
105742
- affectedFilesPendingEmitKind: state.affectedFilesPendingEmitKind && new Map(state.affectedFilesPendingEmitKind),
105743
- affectedFilesPendingEmitIndex: state.affectedFilesPendingEmitIndex,
105931
+ affectedFilesPendingEmit: state.affectedFilesPendingEmit && new Map(state.affectedFilesPendingEmit),
105744
105932
  seenEmittedFiles: state.seenEmittedFiles && new Map(state.seenEmittedFiles),
105745
- programEmitComplete: state.programEmitComplete,
105933
+ programEmitPending: state.programEmitPending,
105746
105934
  emitSignatures: state.emitSignatures && new Map(state.emitSignatures),
105747
105935
  outSignature: state.outSignature,
105748
105936
  latestChangedDtsFile: state.latestChangedDtsFile,
@@ -105752,10 +105940,8 @@ ${lanes.join("\n")}
105752
105940
  }
105753
105941
  function restoreBuilderProgramEmitState(state, savedEmitState) {
105754
105942
  state.affectedFilesPendingEmit = savedEmitState.affectedFilesPendingEmit;
105755
- state.affectedFilesPendingEmitKind = savedEmitState.affectedFilesPendingEmitKind;
105756
- state.affectedFilesPendingEmitIndex = savedEmitState.affectedFilesPendingEmitIndex;
105757
105943
  state.seenEmittedFiles = savedEmitState.seenEmittedFiles;
105758
- state.programEmitComplete = savedEmitState.programEmitComplete;
105944
+ state.programEmitPending = savedEmitState.programEmitPending;
105759
105945
  state.emitSignatures = savedEmitState.emitSignatures;
105760
105946
  state.outSignature = savedEmitState.outSignature;
105761
105947
  state.latestChangedDtsFile = savedEmitState.latestChangedDtsFile;
@@ -105777,6 +105963,7 @@ ${lanes.join("\n")}
105777
105963
  const affectedFile = affectedFiles[affectedFilesIndex];
105778
105964
  if (!seenAffectedFiles.has(affectedFile.resolvedPath)) {
105779
105965
  state.affectedFilesIndex = affectedFilesIndex;
105966
+ addToAffectedFilesPendingEmit(state, affectedFile.resolvedPath, getBuilderFileEmit(state.compilerOptions));
105780
105967
  handleDtsMayChangeOfAffectedFile(
105781
105968
  state,
105782
105969
  affectedFile,
@@ -105819,29 +106006,38 @@ ${lanes.join("\n")}
105819
106006
  state.seenAffectedFiles = new Set();
105820
106007
  }
105821
106008
  }
105822
- function clearAffectedFilesPendingEmit(state) {
105823
- state.affectedFilesPendingEmit = void 0;
105824
- state.affectedFilesPendingEmitKind = void 0;
105825
- state.affectedFilesPendingEmitIndex = void 0;
106009
+ function clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles) {
106010
+ var _a2;
106011
+ if (!((_a2 = state.affectedFilesPendingEmit) == null ? void 0 : _a2.size))
106012
+ return;
106013
+ if (!emitOnlyDtsFiles)
106014
+ return state.affectedFilesPendingEmit = void 0;
106015
+ state.affectedFilesPendingEmit.forEach((emitKind, path) => {
106016
+ const pending = emitKind & 7 /* AllJs */;
106017
+ if (!pending)
106018
+ state.affectedFilesPendingEmit.delete(path);
106019
+ else
106020
+ state.affectedFilesPendingEmit.set(path, pending);
106021
+ });
105826
106022
  }
105827
- function getNextAffectedFilePendingEmit(state) {
105828
- const { affectedFilesPendingEmit } = state;
105829
- if (affectedFilesPendingEmit) {
105830
- const seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = new Map());
105831
- for (let i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) {
105832
- const affectedFile = Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]);
105833
- if (affectedFile && sourceFileMayBeEmitted(affectedFile, state.program)) {
105834
- const seenKind = seenEmittedFiles.get(affectedFile.resolvedPath);
105835
- const emitKind = Debug.checkDefined(Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath));
105836
- if (seenKind === void 0 || seenKind < emitKind) {
105837
- state.affectedFilesPendingEmitIndex = i;
105838
- return { affectedFile, emitKind };
105839
- }
105840
- }
106023
+ function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) {
106024
+ var _a2;
106025
+ if (!((_a2 = state.affectedFilesPendingEmit) == null ? void 0 : _a2.size))
106026
+ return void 0;
106027
+ return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path) => {
106028
+ var _a3;
106029
+ const affectedFile = state.program.getSourceFileByPath(path);
106030
+ if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
106031
+ state.affectedFilesPendingEmit.delete(path);
106032
+ return void 0;
105841
106033
  }
105842
- clearAffectedFilesPendingEmit(state);
105843
- }
105844
- return void 0;
106034
+ const seenKind = (_a3 = state.seenEmittedFiles) == null ? void 0 : _a3.get(affectedFile.resolvedPath);
106035
+ let pendingKind = getPendingEmitKind(emitKind, seenKind);
106036
+ if (emitOnlyDtsFiles)
106037
+ pendingKind = pendingKind & 24 /* AllDts */;
106038
+ if (pendingKind)
106039
+ return { affectedFile, emitKind: pendingKind };
106040
+ });
105845
106041
  }
105846
106042
  function removeDiagnosticsOfLibraryFiles(state) {
105847
106043
  if (!state.cleanedDiagnosticsOfLibFiles) {
@@ -105895,7 +106091,7 @@ ${lanes.join("\n")}
105895
106091
  !host.disableUseFileVersionAsSignature
105896
106092
  );
105897
106093
  if (getEmitDeclarations(state.compilerOptions)) {
105898
- addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */);
106094
+ addToAffectedFilesPendingEmit(state, path, state.compilerOptions.declarationMap ? 24 /* AllDts */ : 8 /* Dts */);
105899
106095
  }
105900
106096
  }
105901
106097
  }
@@ -106001,33 +106197,6 @@ ${lanes.join("\n")}
106001
106197
  );
106002
106198
  return void 0;
106003
106199
  }
106004
- function doneWithAffectedFile(state, affected, emitKind, isPendingEmit, isBuildInfoEmit) {
106005
- if (isBuildInfoEmit) {
106006
- state.buildInfoEmitPending = false;
106007
- } else if (affected === state.program) {
106008
- state.changedFilesSet.clear();
106009
- state.programEmitComplete = true;
106010
- } else {
106011
- state.seenAffectedFiles.add(affected.resolvedPath);
106012
- state.buildInfoEmitPending = true;
106013
- if (emitKind !== void 0) {
106014
- (state.seenEmittedFiles || (state.seenEmittedFiles = new Map())).set(affected.resolvedPath, emitKind);
106015
- }
106016
- if (isPendingEmit) {
106017
- state.affectedFilesPendingEmitIndex++;
106018
- } else {
106019
- state.affectedFilesIndex++;
106020
- }
106021
- }
106022
- }
106023
- function toAffectedFileResult(state, result, affected) {
106024
- doneWithAffectedFile(state, affected);
106025
- return { result, affected };
106026
- }
106027
- function toAffectedFileEmitResult(state, result, affected, emitKind, isPendingEmit, isBuildInfoEmit) {
106028
- doneWithAffectedFile(state, affected, emitKind, isPendingEmit, isBuildInfoEmit);
106029
- return { result, affected };
106030
- }
106031
106200
  function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) {
106032
106201
  return concatenate(
106033
106202
  getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken),
@@ -106051,49 +106220,50 @@ ${lanes.join("\n")}
106051
106220
  function isProgramBundleEmitBuildInfo(info) {
106052
106221
  return !!outFile(info.options || {});
106053
106222
  }
106054
- function getProgramBuildInfo(state, getCanonicalFileName) {
106055
- const outFilePath = outFile(state.compilerOptions);
106056
- if (outFilePath && !state.compilerOptions.composite)
106057
- return;
106223
+ function getBuildInfo2(state, getCanonicalFileName, bundle) {
106224
+ var _a2, _b, _c;
106058
106225
  const currentDirectory = Debug.checkDefined(state.program).getCurrentDirectory();
106059
106226
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
106060
106227
  const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
106061
- if (outFilePath) {
106062
- const fileNames2 = [];
106063
- const fileInfos2 = [];
106064
- state.program.getRootFileNames().forEach((f) => {
106065
- const sourceFile = state.program.getSourceFile(f);
106066
- if (!sourceFile)
106067
- return;
106068
- fileNames2.push(relativeToBuildInfo(sourceFile.resolvedPath));
106069
- fileInfos2.push(sourceFile.version);
106228
+ const fileNames = [];
106229
+ const fileNameToFileId = new Map();
106230
+ if (outFile(state.compilerOptions)) {
106231
+ const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
106232
+ toFileId(key);
106233
+ return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
106070
106234
  });
106071
- const result2 = {
106072
- fileNames: fileNames2,
106235
+ const program2 = {
106236
+ fileNames,
106073
106237
  fileInfos: fileInfos2,
106074
- options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
106238
+ options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
106075
106239
  outSignature: state.outSignature,
106076
- latestChangedDtsFile
106240
+ latestChangedDtsFile,
106241
+ pendingEmit: !state.programEmitPending ? void 0 : state.programEmitPending === getBuilderFileEmit(state.compilerOptions) ? false : state.programEmitPending
106242
+ };
106243
+ const { js, dts, commonSourceDirectory, sourceFiles } = bundle;
106244
+ state.bundle = bundle = {
106245
+ commonSourceDirectory,
106246
+ sourceFiles,
106247
+ js: js || (!state.compilerOptions.emitDeclarationOnly ? (_a2 = state.bundle) == null ? void 0 : _a2.js : void 0),
106248
+ dts: dts || (getEmitDeclarations(state.compilerOptions) ? (_b = state.bundle) == null ? void 0 : _b.dts : void 0)
106077
106249
  };
106078
- return result2;
106250
+ return createBuildInfo(program2, bundle);
106079
106251
  }
106080
- const fileNames = [];
106081
- const fileNameToFileId = new Map();
106082
106252
  let fileIdsList;
106083
106253
  let fileNamesToFileIdListId;
106084
106254
  let emitSignatures;
106085
106255
  const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
106086
- var _a2, _b;
106256
+ var _a3, _b2;
106087
106257
  const fileId = toFileId(key);
106088
106258
  Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
106089
- const oldSignature = (_a2 = state.oldSignatures) == null ? void 0 : _a2.get(key);
106259
+ const oldSignature = (_a3 = state.oldSignatures) == null ? void 0 : _a3.get(key);
106090
106260
  const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;
106091
106261
  if (state.compilerOptions.composite) {
106092
106262
  const file = state.program.getSourceFileByPath(key);
106093
106263
  if (!isJsonSourceFile(file) && sourceFileMayBeEmitted(file, state.program)) {
106094
- const emitSignature = (_b = state.emitSignatures) == null ? void 0 : _b.get(key);
106264
+ const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key);
106095
106265
  if (emitSignature !== actualSignature) {
106096
- (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : [fileId, emitSignature]);
106266
+ (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature]);
106097
106267
  }
106098
106268
  }
106099
106269
  }
@@ -106109,8 +106279,8 @@ ${lanes.join("\n")}
106109
106279
  let exportedModulesMap;
106110
106280
  if (state.exportedModulesMap) {
106111
106281
  exportedModulesMap = mapDefined(arrayFrom(state.exportedModulesMap.keys()).sort(compareStringsCaseSensitive), (key) => {
106112
- var _a2;
106113
- const oldValue = (_a2 = state.oldExportedModulesMap) == null ? void 0 : _a2.get(key);
106282
+ var _a3;
106283
+ const oldValue = (_a3 = state.oldExportedModulesMap) == null ? void 0 : _a3.get(key);
106114
106284
  if (oldValue === void 0)
106115
106285
  return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
106116
106286
  if (oldValue)
@@ -106131,16 +106301,17 @@ ${lanes.join("\n")}
106131
106301
  }
106132
106302
  }
106133
106303
  let affectedFilesPendingEmit;
106134
- if (state.affectedFilesPendingEmit) {
106304
+ if ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.size) {
106305
+ const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
106135
106306
  const seenFiles = new Set();
106136
- for (const path of state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(compareStringsCaseSensitive)) {
106307
+ for (const path of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
106137
106308
  if (tryAddToSet(seenFiles, path)) {
106138
106309
  const file = state.program.getSourceFileByPath(path);
106139
106310
  if (!sourceFileMayBeEmitted(file, state.program))
106140
106311
  continue;
106141
- const fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
106312
+ const fileId = toFileId(path), pendingEmit = state.affectedFilesPendingEmit.get(path);
106142
106313
  (affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(
106143
- emitKind === 1 /* Full */ ? fileId : [fileId]
106314
+ pendingEmit === fullEmitForOptions ? fileId : pendingEmit === 8 /* Dts */ ? [fileId] : [fileId, pendingEmit]
106144
106315
  );
106145
106316
  }
106146
106317
  }
@@ -106151,10 +106322,10 @@ ${lanes.join("\n")}
106151
106322
  (changeFileSet || (changeFileSet = [])).push(toFileId(path));
106152
106323
  }
106153
106324
  }
106154
- const result = {
106325
+ const program = {
106155
106326
  fileNames,
106156
106327
  fileInfos,
106157
- options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsMultiFileEmitBuildInfo"),
106328
+ options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
106158
106329
  fileIdsList,
106159
106330
  referencedMap,
106160
106331
  exportedModulesMap,
@@ -106164,7 +106335,7 @@ ${lanes.join("\n")}
106164
106335
  emitSignatures,
106165
106336
  latestChangedDtsFile
106166
106337
  };
106167
- return result;
106338
+ return createBuildInfo(program, bundle);
106168
106339
  function relativeToBuildInfoEnsuringAbsolutePath(path) {
106169
106340
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
106170
106341
  }
@@ -106189,20 +106360,20 @@ ${lanes.join("\n")}
106189
106360
  }
106190
106361
  return fileIdListId;
106191
106362
  }
106192
- function convertToProgramBuildInfoCompilerOptions(options, optionKey) {
106193
- let result2;
106363
+ function convertToProgramBuildInfoCompilerOptions(options) {
106364
+ let result;
106194
106365
  const { optionsNameMap } = getOptionsNameMap();
106195
106366
  for (const name of getOwnKeys(options).sort(compareStringsCaseSensitive)) {
106196
106367
  const optionInfo = optionsNameMap.get(name.toLowerCase());
106197
- if (optionInfo == null ? void 0 : optionInfo[optionKey]) {
106198
- (result2 || (result2 = {}))[name] = convertToReusableCompilerOptionValue(
106368
+ if (optionInfo == null ? void 0 : optionInfo.affectsBuildInfo) {
106369
+ (result || (result = {}))[name] = convertToReusableCompilerOptionValue(
106199
106370
  optionInfo,
106200
106371
  options[name],
106201
106372
  relativeToBuildInfoEnsuringAbsolutePath
106202
106373
  );
106203
106374
  }
106204
106375
  }
106205
- return result2;
106376
+ return result;
106206
106377
  }
106207
106378
  }
106208
106379
  function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
@@ -106309,7 +106480,7 @@ ${lanes.join("\n")}
106309
106480
  const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
106310
106481
  const computeHash = maybeBind(host, host.createHash);
106311
106482
  const state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
106312
- newProgram.getProgramBuildInfo = () => getProgramBuildInfo(state, getCanonicalFileName);
106483
+ newProgram.getBuildInfo = (bundle) => getBuildInfo2(state, getCanonicalFileName, bundle);
106313
106484
  newProgram = void 0;
106314
106485
  oldProgram = void 0;
106315
106486
  oldState = void 0;
@@ -106342,50 +106513,70 @@ ${lanes.join("\n")}
106342
106513
  return emitSkippedWithNoDiagnostics;
106343
106514
  }
106344
106515
  function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
106516
+ var _a2, _b, _c, _d, _e;
106345
106517
  let affected = getNextAffectedFile(state, cancellationToken, computeHash, getCanonicalFileName, host);
106346
- let emitKind = 1 /* Full */;
106347
- let isPendingEmitFile = false;
106518
+ const programEmitKind = getBuilderFileEmit(state.compilerOptions);
106519
+ let emitKind = emitOnlyDtsFiles ? programEmitKind & 24 /* AllDts */ : programEmitKind;
106348
106520
  if (!affected) {
106349
106521
  if (!outFile(state.compilerOptions)) {
106350
- const pendingAffectedFile = getNextAffectedFilePendingEmit(state);
106522
+ const pendingAffectedFile = getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles);
106351
106523
  if (!pendingAffectedFile) {
106352
- if (!state.buildInfoEmitPending) {
106524
+ if (!state.buildInfoEmitPending)
106353
106525
  return void 0;
106354
- }
106355
- const affected2 = Debug.checkDefined(state.program);
106356
- return toAffectedFileEmitResult(
106357
- state,
106358
- affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken),
106359
- affected2,
106360
- 1 /* Full */,
106361
- false,
106362
- true
106363
- );
106526
+ const affected2 = state.program;
106527
+ const result2 = affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken);
106528
+ state.buildInfoEmitPending = false;
106529
+ return { result: result2, affected: affected2 };
106364
106530
  }
106365
106531
  ({ affectedFile: affected, emitKind } = pendingAffectedFile);
106366
- isPendingEmitFile = true;
106367
106532
  } else {
106368
- const program = Debug.checkDefined(state.program);
106369
- if (state.programEmitComplete)
106533
+ if (!state.programEmitPending)
106534
+ return void 0;
106535
+ emitKind = state.programEmitPending;
106536
+ if (emitOnlyDtsFiles)
106537
+ emitKind = emitKind & 24 /* AllDts */;
106538
+ if (!emitKind)
106370
106539
  return void 0;
106371
- affected = program;
106540
+ affected = state.program;
106372
106541
  }
106373
106542
  }
106374
- return toAffectedFileEmitResult(
106375
- state,
106376
- Debug.checkDefined(state.program).emit(
106377
- affected === state.program ? void 0 : affected,
106378
- getEmitDeclarations(state.compilerOptions) ? getWriteFileCallback(writeFile2, customTransformers) : writeFile2 || maybeBind(host, host.writeFile),
106379
- cancellationToken,
106380
- emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */,
106381
- customTransformers
106382
- ),
106383
- affected,
106384
- emitKind,
106385
- isPendingEmitFile
106543
+ let emitOnly;
106544
+ if (emitKind & 7 /* AllJs */)
106545
+ emitOnly = 0 /* Js */;
106546
+ if (emitKind & 24 /* AllDts */)
106547
+ emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0;
106548
+ if (affected === state.program) {
106549
+ state.programEmitPending = state.changedFilesSet.size ? getPendingEmitKind(programEmitKind, emitKind) : state.programEmitPending ? getPendingEmitKind(state.programEmitPending, emitKind) : void 0;
106550
+ }
106551
+ const result = state.program.emit(
106552
+ affected === state.program ? void 0 : affected,
106553
+ getWriteFileCallback(writeFile2, customTransformers),
106554
+ cancellationToken,
106555
+ emitOnly,
106556
+ customTransformers
106386
106557
  );
106558
+ if (affected !== state.program) {
106559
+ const affectedSourceFile = affected;
106560
+ state.seenAffectedFiles.add(affectedSourceFile.resolvedPath);
106561
+ if (state.affectedFilesIndex !== void 0)
106562
+ state.affectedFilesIndex++;
106563
+ state.buildInfoEmitPending = true;
106564
+ const existing = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedSourceFile.resolvedPath)) || 0 /* None */;
106565
+ ((_b = state.seenEmittedFiles) != null ? _b : state.seenEmittedFiles = new Map()).set(affectedSourceFile.resolvedPath, emitKind | existing);
106566
+ const existingPending = ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.get(affectedSourceFile.resolvedPath)) || programEmitKind;
106567
+ const pendingKind = getPendingEmitKind(existingPending, emitKind | existing);
106568
+ if (pendingKind)
106569
+ ((_d = state.affectedFilesPendingEmit) != null ? _d : state.affectedFilesPendingEmit = new Map()).set(affectedSourceFile.resolvedPath, pendingKind);
106570
+ else
106571
+ (_e = state.affectedFilesPendingEmit) == null ? void 0 : _e.delete(affectedSourceFile.resolvedPath);
106572
+ } else {
106573
+ state.changedFilesSet.clear();
106574
+ }
106575
+ return { result, affected };
106387
106576
  }
106388
106577
  function getWriteFileCallback(writeFile2, customTransformers) {
106578
+ if (!getEmitDeclarations(state.compilerOptions))
106579
+ return writeFile2 || maybeBind(host, host.writeFile);
106389
106580
  return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
106390
106581
  var _a2, _b, _c, _d, _e, _f, _g;
106391
106582
  if (isDeclarationFileName(fileName)) {
@@ -106424,21 +106615,16 @@ ${lanes.join("\n")}
106424
106615
  }
106425
106616
  if (state.compilerOptions.composite) {
106426
106617
  const filePath = sourceFiles[0].resolvedPath;
106427
- const oldSignature = (_f = state.emitSignatures) == null ? void 0 : _f.get(filePath);
106428
- emitSignature != null ? emitSignature : emitSignature = computeSignature(text, computeHash, data);
106429
- if (emitSignature === oldSignature)
106618
+ emitSignature = handleNewSignature((_f = state.emitSignatures) == null ? void 0 : _f.get(filePath), emitSignature);
106619
+ if (!emitSignature)
106430
106620
  return;
106431
106621
  ((_g = state.emitSignatures) != null ? _g : state.emitSignatures = new Map()).set(filePath, emitSignature);
106432
- state.hasChangedEmitSignature = true;
106433
- state.latestChangedDtsFile = fileName;
106434
106622
  }
106435
106623
  } else if (state.compilerOptions.composite) {
106436
- const newSignature = computeSignature(text, computeHash, data);
106437
- if (newSignature === state.outSignature)
106624
+ const newSignature = handleNewSignature(state.outSignature, void 0);
106625
+ if (!newSignature)
106438
106626
  return;
106439
106627
  state.outSignature = newSignature;
106440
- state.hasChangedEmitSignature = true;
106441
- state.latestChangedDtsFile = fileName;
106442
106628
  }
106443
106629
  }
106444
106630
  if (writeFile2)
@@ -106447,10 +106633,25 @@ ${lanes.join("\n")}
106447
106633
  host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
106448
106634
  else
106449
106635
  state.program.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
106636
+ function handleNewSignature(oldSignatureFormat, newSignature) {
106637
+ const oldSignature = !oldSignatureFormat || isString(oldSignatureFormat) ? oldSignatureFormat : oldSignatureFormat[0];
106638
+ newSignature != null ? newSignature : newSignature = computeSignature(text, computeHash, data);
106639
+ if (newSignature === oldSignature) {
106640
+ if (oldSignatureFormat === oldSignature)
106641
+ return void 0;
106642
+ else if (data)
106643
+ data.differsOnlyInMap = true;
106644
+ else
106645
+ data = { differsOnlyInMap: true };
106646
+ } else {
106647
+ state.hasChangedEmitSignature = true;
106648
+ state.latestChangedDtsFile = fileName;
106649
+ }
106650
+ return newSignature;
106651
+ }
106450
106652
  };
106451
106653
  }
106452
106654
  function emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
106453
- var _a2;
106454
106655
  if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {
106455
106656
  assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile);
106456
106657
  }
@@ -106476,16 +106677,13 @@ ${lanes.join("\n")}
106476
106677
  emittedFiles,
106477
106678
  sourceMaps
106478
106679
  };
106479
- } else if ((_a2 = state.affectedFilesPendingEmitKind) == null ? void 0 : _a2.size) {
106480
- Debug.assert(kind === 0 /* SemanticDiagnosticsBuilderProgram */);
106481
- if (!emitOnlyDtsFiles || every(state.affectedFilesPendingEmit, (path, index) => index < state.affectedFilesPendingEmitIndex || state.affectedFilesPendingEmitKind.get(path) === 0 /* DtsOnly */)) {
106482
- clearAffectedFilesPendingEmit(state);
106483
- }
106680
+ } else {
106681
+ clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles);
106484
106682
  }
106485
106683
  }
106486
106684
  return Debug.checkDefined(state.program).emit(
106487
106685
  targetSourceFile,
106488
- getEmitDeclarations(state.compilerOptions) ? getWriteFileCallback(writeFile2, customTransformers) : writeFile2 || maybeBind(host, host.writeFile),
106686
+ getWriteFileCallback(writeFile2, customTransformers),
106489
106687
  cancellationToken,
106490
106688
  emitOnlyDtsFiles,
106491
106689
  customTransformers
@@ -106494,27 +106692,25 @@ ${lanes.join("\n")}
106494
106692
  function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
106495
106693
  while (true) {
106496
106694
  const affected = getNextAffectedFile(state, cancellationToken, computeHash, getCanonicalFileName, host);
106497
- if (!affected) {
106695
+ let result;
106696
+ if (!affected)
106498
106697
  return void 0;
106499
- } else if (affected === state.program) {
106500
- return toAffectedFileResult(
106501
- state,
106502
- state.program.getSemanticDiagnostics(void 0, cancellationToken),
106503
- affected
106504
- );
106505
- }
106506
- if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */ || state.compilerOptions.noEmit || state.compilerOptions.noEmitOnError) {
106507
- addToAffectedFilesPendingEmit(state, affected.resolvedPath, 1 /* Full */);
106508
- }
106509
- if (ignoreSourceFile && ignoreSourceFile(affected)) {
106510
- doneWithAffectedFile(state, affected);
106511
- continue;
106698
+ else if (affected !== state.program) {
106699
+ const affectedSourceFile = affected;
106700
+ if (!ignoreSourceFile || !ignoreSourceFile(affectedSourceFile)) {
106701
+ result = getSemanticDiagnosticsOfFile(state, affectedSourceFile, cancellationToken);
106702
+ }
106703
+ state.seenAffectedFiles.add(affectedSourceFile.resolvedPath);
106704
+ state.affectedFilesIndex++;
106705
+ state.buildInfoEmitPending = true;
106706
+ if (!result)
106707
+ continue;
106708
+ } else {
106709
+ result = state.program.getSemanticDiagnostics(void 0, cancellationToken);
106710
+ state.changedFilesSet.clear();
106711
+ state.programEmitPending = getBuilderFileEmit(state.compilerOptions);
106512
106712
  }
106513
- return toAffectedFileResult(
106514
- state,
106515
- getSemanticDiagnosticsOfFile(state, affected, cancellationToken),
106516
- affected
106517
- );
106713
+ return { result, affected };
106518
106714
  }
106519
106715
  }
106520
106716
  function getSemanticDiagnostics(sourceFile, cancellationToken) {
@@ -106537,46 +106733,49 @@ ${lanes.join("\n")}
106537
106733
  }
106538
106734
  }
106539
106735
  function addToAffectedFilesPendingEmit(state, affectedFilePendingEmit, kind) {
106540
- if (!state.affectedFilesPendingEmit)
106541
- state.affectedFilesPendingEmit = [];
106542
- if (!state.affectedFilesPendingEmitKind)
106543
- state.affectedFilesPendingEmitKind = new Map();
106544
- const existingKind = state.affectedFilesPendingEmitKind.get(affectedFilePendingEmit);
106545
- state.affectedFilesPendingEmit.push(affectedFilePendingEmit);
106546
- state.affectedFilesPendingEmitKind.set(affectedFilePendingEmit, existingKind || kind);
106547
- if (state.affectedFilesPendingEmitIndex === void 0) {
106548
- state.affectedFilesPendingEmitIndex = 0;
106549
- }
106550
- }
106551
- function toBuilderStateFileInfo(fileInfo) {
106736
+ var _a2, _b;
106737
+ const existingKind = ((_a2 = state.affectedFilesPendingEmit) == null ? void 0 : _a2.get(affectedFilePendingEmit)) || 0 /* None */;
106738
+ ((_b = state.affectedFilesPendingEmit) != null ? _b : state.affectedFilesPendingEmit = new Map()).set(affectedFilePendingEmit, existingKind | kind);
106739
+ }
106740
+ function toBuilderStateFileInfoForMultiEmit(fileInfo) {
106552
106741
  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 };
106553
106742
  }
106554
- function toBuilderFileEmit(value) {
106555
- return isNumber(value) ? 1 /* Full */ : 0 /* DtsOnly */;
106743
+ function toBuilderFileEmit(value, fullEmitForOptions) {
106744
+ return isNumber(value) ? fullEmitForOptions : value[1] || 8 /* Dts */;
106745
+ }
106746
+ function toProgramEmitPending(value, options) {
106747
+ return !value ? getBuilderFileEmit(options || {}) : value;
106556
106748
  }
106557
- function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
106749
+ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host) {
106558
106750
  var _a2, _b, _c, _d;
106751
+ const program = buildInfo.program;
106559
106752
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
106560
106753
  const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
106561
106754
  let state;
106562
- let filePaths;
106755
+ const filePaths = (_a2 = program.fileNames) == null ? void 0 : _a2.map(toPath3);
106563
106756
  let filePathsSetList;
106564
106757
  const latestChangedDtsFile = program.latestChangedDtsFile ? toAbsolutePath(program.latestChangedDtsFile) : void 0;
106565
106758
  if (isProgramBundleEmitBuildInfo(program)) {
106759
+ const fileInfos = new Map();
106760
+ program.fileInfos.forEach((fileInfo, index) => {
106761
+ const path = toFilePath(index + 1);
106762
+ fileInfos.set(path, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
106763
+ });
106566
106764
  state = {
106567
- fileInfos: new Map(),
106765
+ fileInfos,
106568
106766
  compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
106569
106767
  latestChangedDtsFile,
106570
- outSignature: program.outSignature
106768
+ outSignature: program.outSignature,
106769
+ programEmitPending: program.pendingEmit === void 0 ? void 0 : toProgramEmitPending(program.pendingEmit, program.options),
106770
+ bundle: buildInfo.bundle
106571
106771
  };
106572
106772
  } else {
106573
- filePaths = (_a2 = program.fileNames) == null ? void 0 : _a2.map(toPath3);
106574
106773
  filePathsSetList = (_b = program.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
106575
106774
  const fileInfos = new Map();
106576
106775
  const emitSignatures = ((_c = program.options) == null ? void 0 : _c.composite) && !outFile(program.options) ? new Map() : void 0;
106577
106776
  program.fileInfos.forEach((fileInfo, index) => {
106578
106777
  const path = toFilePath(index + 1);
106579
- const stateFileInfo = toBuilderStateFileInfo(fileInfo);
106778
+ const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
106580
106779
  fileInfos.set(path, stateFileInfo);
106581
106780
  if (emitSignatures && stateFileInfo.signature)
106582
106781
  emitSignatures.set(path, stateFileInfo.signature);
@@ -106584,9 +106783,15 @@ ${lanes.join("\n")}
106584
106783
  (_d = program.emitSignatures) == null ? void 0 : _d.forEach((value) => {
106585
106784
  if (isNumber(value))
106586
106785
  emitSignatures.delete(toFilePath(value));
106587
- else
106588
- emitSignatures.set(toFilePath(value[0]), value[1]);
106786
+ else {
106787
+ const key = toFilePath(value[0]);
106788
+ emitSignatures.set(
106789
+ key,
106790
+ !isString(value[1]) && !value[1].length ? [emitSignatures.get(key)] : value[1]
106791
+ );
106792
+ }
106589
106793
  });
106794
+ const fullEmitForOptions = program.affectedFilesPendingEmit ? getBuilderFileEmit(program.options || {}) : void 0;
106590
106795
  state = {
106591
106796
  fileInfos,
106592
106797
  compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
@@ -106594,9 +106799,7 @@ ${lanes.join("\n")}
106594
106799
  exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
106595
106800
  semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && arrayToMap(program.semanticDiagnosticsPerFile, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => isNumber(value) ? emptyArray : value[1]),
106596
106801
  hasReusableDiagnostic: true,
106597
- affectedFilesPendingEmit: map(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0])),
106598
- affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && arrayToMap(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), toBuilderFileEmit),
106599
- affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
106802
+ affectedFilesPendingEmit: program.affectedFilesPendingEmit && arrayToMap(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)),
106600
106803
  changedFilesSet: new Set(map(program.changeFileSet, toFilePath)),
106601
106804
  latestChangedDtsFile,
106602
106805
  emitSignatures: (emitSignatures == null ? void 0 : emitSignatures.size) ? emitSignatures : void 0
@@ -106805,7 +107008,7 @@ ${lanes.join("\n")}
106805
107008
  function getResolvedModule2(resolution) {
106806
107009
  return resolution.resolvedModule;
106807
107010
  }
106808
- function getResolvedTypeReferenceDirective(resolution) {
107011
+ function getResolvedTypeReferenceDirective2(resolution) {
106809
107012
  return resolution.resolvedTypeReferenceDirective;
106810
107013
  }
106811
107014
  function isInDirectoryPath(dir, file) {
@@ -106942,11 +107145,12 @@ ${lanes.join("\n")}
106942
107145
  getResolutionWithResolvedFileName,
106943
107146
  shouldRetryResolution,
106944
107147
  reusedNames,
107148
+ resolutionInfo,
106945
107149
  logChanges,
106946
107150
  containingSourceFile,
106947
107151
  containingSourceFileMode
106948
107152
  }) {
106949
- var _a2, _b, _c;
107153
+ var _a2, _b, _c, _d;
106950
107154
  const path = resolutionHost.toPath(containingFile);
106951
107155
  const resolutionsInFile = cache.get(path) || cache.set(path, createModeAwareCache()).get(path);
106952
107156
  const dirPath = getDirectoryPath(path);
@@ -106964,9 +107168,9 @@ ${lanes.join("\n")}
106964
107168
  const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
106965
107169
  const seenNamesInFile = createModeAwareCache();
106966
107170
  let i = 0;
106967
- for (const entry of names) {
106968
- const name = isString(entry) ? entry : entry.fileName.toLowerCase();
106969
- const mode = !isString(entry) ? getModeForFileReference(entry, containingSourceFileMode) : containingSourceFile ? getModeForResolutionAtIndex(containingSourceFile, i) : void 0;
107171
+ for (const entry of containingSourceFile && resolutionInfo ? resolutionInfo.names : names) {
107172
+ const name = getResolutionName(entry);
107173
+ const mode = !isString(entry) ? isStringLiteralLike(entry) ? getModeForUsageLocation(containingSourceFile, entry) : getModeForFileReference(entry, containingSourceFileMode) : containingSourceFile ? getModeForResolutionAtIndex(containingSourceFile, i) : void 0;
106970
107174
  i++;
106971
107175
  let resolution = resolutionsInFile.get(name, mode);
106972
107176
  if (!seenNamesInFile.has(name, mode) && unmatchedRedirects || !resolution || resolution.isInvalidated || hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution)) {
@@ -107021,12 +107225,22 @@ ${lanes.join("\n")}
107021
107225
  seenNamesInFile.set(name, mode, true);
107022
107226
  resolvedModules.push(getResolutionWithResolvedFileName(resolution));
107023
107227
  }
107024
- resolutionsInFile.forEach((resolution, name, mode) => {
107025
- if (!seenNamesInFile.has(name, mode) && !contains(reusedNames, name)) {
107026
- stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
107027
- resolutionsInFile.delete(name, mode);
107028
- }
107029
- });
107228
+ if (containingSourceFile && resolutionInfo) {
107229
+ (_d = resolutionInfo.reusedNames) == null ? void 0 : _d.forEach((entry) => seenNamesInFile.set(
107230
+ getResolutionName(entry),
107231
+ !isString(entry) && isStringLiteralLike(entry) ? getModeForUsageLocation(containingSourceFile, entry) : getModeForFileReference(entry, containingSourceFile.impliedNodeFormat),
107232
+ true
107233
+ ));
107234
+ reusedNames = void 0;
107235
+ }
107236
+ if (resolutionsInFile.size() !== seenNamesInFile.size()) {
107237
+ resolutionsInFile.forEach((resolution, name, mode) => {
107238
+ if (!seenNamesInFile.has(name, mode) && !contains(reusedNames, name)) {
107239
+ stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
107240
+ resolutionsInFile.delete(name, mode);
107241
+ }
107242
+ });
107243
+ }
107030
107244
  return resolvedModules;
107031
107245
  function resolutionIsEqualTo(oldResolution, newResolution) {
107032
107246
  if (oldResolution === newResolution) {
@@ -107046,7 +107260,7 @@ ${lanes.join("\n")}
107046
107260
  return oldResult.resolvedFileName === newResult.resolvedFileName;
107047
107261
  }
107048
107262
  }
107049
- function resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode) {
107263
+ function resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode, resolutionInfo) {
107050
107264
  return resolveNamesWithLocalCache({
107051
107265
  names: typeDirectiveNames,
107052
107266
  containingFile,
@@ -107054,12 +107268,13 @@ ${lanes.join("\n")}
107054
107268
  cache: resolvedTypeReferenceDirectives,
107055
107269
  perDirectoryCacheWithRedirects: perDirectoryResolvedTypeReferenceDirectives,
107056
107270
  loader: resolveTypeReferenceDirective2,
107057
- getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective,
107271
+ getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2,
107058
107272
  shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0,
107059
- containingSourceFileMode: containingFileMode
107273
+ containingSourceFileMode: containingFileMode,
107274
+ resolutionInfo
107060
107275
  });
107061
107276
  }
107062
- function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, containingSourceFile) {
107277
+ function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, containingSourceFile, resolutionInfo) {
107063
107278
  return resolveNamesWithLocalCache({
107064
107279
  names: moduleNames,
107065
107280
  containingFile,
@@ -107070,6 +107285,7 @@ ${lanes.join("\n")}
107070
107285
  getResolutionWithResolvedFileName: getResolvedModule2,
107071
107286
  shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
107072
107287
  reusedNames,
107288
+ resolutionInfo,
107073
107289
  logChanges: logChangesWhenResolvingModule,
107074
107290
  containingSourceFile
107075
107291
  });
@@ -107346,7 +107562,7 @@ ${lanes.join("\n")}
107346
107562
  }
107347
107563
  function removeResolutionsOfFile(filePath) {
107348
107564
  removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule2);
107349
- removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective);
107565
+ removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective2);
107350
107566
  }
107351
107567
  function invalidateResolutions(resolutions, canInvalidate) {
107352
107568
  if (!resolutions)
@@ -107952,13 +108168,44 @@ ${lanes.join("\n")}
107952
108168
  storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit
107953
108169
  };
107954
108170
  }
108171
+ function getSourceFileVersionAsHashFromText(host, text) {
108172
+ if (text.match(sourceMapCommentRegExpDontCareLineStart)) {
108173
+ let lineEnd = text.length;
108174
+ let lineStart = lineEnd;
108175
+ for (let pos = lineEnd - 1; pos >= 0; pos--) {
108176
+ const ch = text.charCodeAt(pos);
108177
+ switch (ch) {
108178
+ case 10 /* lineFeed */:
108179
+ if (pos && text.charCodeAt(pos - 1) === 13 /* carriageReturn */) {
108180
+ pos--;
108181
+ }
108182
+ case 13 /* carriageReturn */:
108183
+ break;
108184
+ default:
108185
+ if (ch < 127 /* maxAsciiCharacter */ || !isLineBreak(ch)) {
108186
+ lineStart = pos;
108187
+ continue;
108188
+ }
108189
+ break;
108190
+ }
108191
+ const line = text.substring(lineStart, lineEnd);
108192
+ if (line.match(sourceMapCommentRegExp)) {
108193
+ text = text.substring(0, lineStart);
108194
+ break;
108195
+ } else if (!line.match(whitespaceOrMapCommentRegExp)) {
108196
+ break;
108197
+ }
108198
+ lineEnd = lineStart;
108199
+ }
108200
+ }
108201
+ return (host.createHash || generateDjb2Hash)(text);
108202
+ }
107955
108203
  function setGetSourceFileAsHashVersioned(compilerHost, host) {
107956
108204
  const originalGetSourceFile = compilerHost.getSourceFile;
107957
- const computeHash = maybeBind(host, host.createHash) || generateDjb2Hash;
107958
108205
  compilerHost.getSourceFile = (...args) => {
107959
108206
  const result = originalGetSourceFile.call(compilerHost, ...args);
107960
108207
  if (result) {
107961
- result.version = computeHash(result.text);
108208
+ result.version = getSourceFileVersionAsHashFromText(host, result.text);
107962
108209
  }
107963
108210
  return result;
107964
108211
  };
@@ -108080,7 +108327,7 @@ ${lanes.join("\n")}
108080
108327
  }
108081
108328
  if (!buildInfo || buildInfo.version !== version || !buildInfo.program)
108082
108329
  return void 0;
108083
- return createBuilderProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
108330
+ return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
108084
108331
  }
108085
108332
  function createIncrementalCompilerHost(options, system = sys) {
108086
108333
  const host = createCompilerHostWorker(options, void 0, system);
@@ -108201,8 +108448,8 @@ ${lanes.join("\n")}
108201
108448
  configFileName ? getDirectoryPath(getNormalizedAbsolutePath(configFileName, currentDirectory)) : currentDirectory,
108202
108449
  false
108203
108450
  );
108204
- compilerHost.resolveModuleNames = host.resolveModuleNames ? (...args) => host.resolveModuleNames(...args) : (moduleNames, containingFile, reusedNames, redirectedReference, _options, sourceFile) => resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, sourceFile);
108205
- compilerHost.resolveTypeReferenceDirectives = host.resolveTypeReferenceDirectives ? (...args) => host.resolveTypeReferenceDirectives(...args) : (typeDirectiveNames, containingFile, redirectedReference, _options, containingFileMode) => resolutionCache.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode);
108451
+ compilerHost.resolveModuleNames = host.resolveModuleNames ? (...args) => host.resolveModuleNames(...args) : (moduleNames, containingFile, reusedNames, redirectedReference, _options, sourceFile, resolutionInfo) => resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, sourceFile, resolutionInfo);
108452
+ compilerHost.resolveTypeReferenceDirectives = host.resolveTypeReferenceDirectives ? (...args) => host.resolveTypeReferenceDirectives(...args) : (typeDirectiveNames, containingFile, redirectedReference, _options, containingFileMode, resolutionInfo) => resolutionCache.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode, resolutionInfo);
108206
108453
  compilerHost.getModuleResolutionCache = host.resolveModuleNames ? maybeBind(host, host.getModuleResolutionCache) : () => resolutionCache.getModuleResolutionCache();
108207
108454
  const userProvidedResolution = !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;
108208
108455
  const customHasInvalidatedResolutions = userProvidedResolution ? maybeBind(host, host.hasInvalidatedResolutions) || returnTrue : returnFalse;
@@ -108765,13 +109012,14 @@ ${lanes.join("\n")}
108765
109012
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithSelf"] = 6] = "OutOfDateWithSelf";
108766
109013
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithUpstream"] = 7] = "OutOfDateWithUpstream";
108767
109014
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateBuildInfo"] = 8] = "OutOfDateBuildInfo";
108768
- UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 9] = "UpstreamOutOfDate";
108769
- UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 10] = "UpstreamBlocked";
108770
- UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 11] = "ComputingUpstream";
108771
- UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 12] = "TsVersionOutputOfDate";
108772
- UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 13] = "UpToDateWithInputFileText";
108773
- UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 14] = "ContainerOnly";
108774
- UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 15] = "ForceBuild";
109015
+ UpToDateStatusType2[UpToDateStatusType2["OutOfDateOptions"] = 9] = "OutOfDateOptions";
109016
+ UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 10] = "UpstreamOutOfDate";
109017
+ UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 11] = "UpstreamBlocked";
109018
+ UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 12] = "ComputingUpstream";
109019
+ UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 13] = "TsVersionOutputOfDate";
109020
+ UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 14] = "UpToDateWithInputFileText";
109021
+ UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 15] = "ContainerOnly";
109022
+ UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 16] = "ForceBuild";
108775
109023
  return UpToDateStatusType2;
108776
109024
  })(UpToDateStatusType || {});
108777
109025
  function resolveConfigFileProjectName(project) {
@@ -108863,14 +109111,14 @@ ${lanes.join("\n")}
108863
109111
  const typeReferenceDirectiveResolutionCache = !compilerHost.resolveTypeReferenceDirectives ? createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, void 0, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache()) : void 0;
108864
109112
  if (!compilerHost.resolveModuleNames) {
108865
109113
  const loader = (moduleName, resolverMode, containingFile, redirectedReference) => resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference, resolverMode).resolvedModule;
108866
- compilerHost.resolveModuleNames = (moduleNames, containingFile, _reusedNames, redirectedReference, _options, containingSourceFile) => loadWithModeAwareCache(Debug.checkEachDefined(moduleNames), Debug.checkDefined(containingSourceFile), containingFile, redirectedReference, loader);
109114
+ compilerHost.resolveModuleNames = (moduleNames, containingFile, _reusedNames, redirectedReference, _options, containingSourceFile, resolutionInfo) => loadWithModeAwareCache(Debug.checkEachDefined(moduleNames), Debug.checkDefined(containingSourceFile), containingFile, redirectedReference, resolutionInfo, loader);
108867
109115
  compilerHost.getModuleResolutionCache = () => moduleResolutionCache;
108868
109116
  }
108869
109117
  if (!compilerHost.resolveTypeReferenceDirectives) {
108870
109118
  const loader = (moduleName, containingFile, redirectedReference, containingFileMode) => resolveTypeReferenceDirective(moduleName, containingFile, state.projectCompilerOptions, compilerHost, redirectedReference, state.typeReferenceDirectiveResolutionCache, containingFileMode).resolvedTypeReferenceDirective;
108871
109119
  compilerHost.resolveTypeReferenceDirectives = (typeReferenceDirectiveNames, containingFile, redirectedReference, _options, containingFileMode) => loadWithTypeDirectiveCache(Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader);
108872
109120
  }
108873
- compilerHost.getBuildInfo = (fileName, configFilePath) => getBuildInfo2(state, fileName, toResolvedConfigFilePath(state, configFilePath), void 0);
109121
+ compilerHost.getBuildInfo = (fileName, configFilePath) => getBuildInfo3(state, fileName, toResolvedConfigFilePath(state, configFilePath), void 0);
108874
109122
  const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(hostWithWatch, options);
108875
109123
  const state = {
108876
109124
  host,
@@ -109362,7 +109610,7 @@ ${lanes.join("\n")}
109362
109610
  reportDeclarationDiagnostics,
109363
109611
  void 0,
109364
109612
  void 0,
109365
- (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, buildInfo: data == null ? void 0 : data.buildInfo }),
109613
+ (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }),
109366
109614
  cancellationToken,
109367
109615
  false,
109368
109616
  customTransformers || ((_b = (_a2 = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a2, project))
@@ -109391,13 +109639,16 @@ ${lanes.join("\n")}
109391
109639
  const isIncremental = isIncrementalCompilation(options);
109392
109640
  let outputTimeStampMap;
109393
109641
  let now;
109394
- outputFiles.forEach(({ name, text, writeByteOrderMark, buildInfo }) => {
109642
+ outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => {
109395
109643
  const path = toPath2(state, name);
109396
109644
  emittedOutputs.set(toPath2(state, name), name);
109397
- if (buildInfo)
109398
- setBuildInfo(state, buildInfo, projectPath, options, resultFlags);
109645
+ if (data == null ? void 0 : data.buildInfo)
109646
+ setBuildInfo(state, data.buildInfo, projectPath, options, resultFlags);
109647
+ const modifiedTime = (data == null ? void 0 : data.differsOnlyInMap) ? getModifiedTime(state.host, name) : void 0;
109399
109648
  writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
109400
- if (!isIncremental && state.watch) {
109649
+ if (data == null ? void 0 : data.differsOnlyInMap)
109650
+ state.host.setModifiedTime(name, modifiedTime);
109651
+ else if (!isIncremental && state.watch) {
109401
109652
  (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
109402
109653
  }
109403
109654
  });
@@ -109501,14 +109752,14 @@ ${lanes.join("\n")}
109501
109752
  const emittedOutputs = new Map();
109502
109753
  let resultFlags = 2 /* DeclarationOutputUnchanged */;
109503
109754
  const existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo || void 0;
109504
- outputFiles.forEach(({ name, text, writeByteOrderMark, buildInfo }) => {
109755
+ outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => {
109505
109756
  var _a3, _b2;
109506
109757
  emittedOutputs.set(toPath2(state, name), name);
109507
- if (buildInfo) {
109508
- if (((_a3 = buildInfo.program) == null ? void 0 : _a3.outSignature) !== ((_b2 = existingBuildInfo == null ? void 0 : existingBuildInfo.program) == null ? void 0 : _b2.outSignature)) {
109758
+ if (data == null ? void 0 : data.buildInfo) {
109759
+ if (((_a3 = data.buildInfo.program) == null ? void 0 : _a3.outSignature) !== ((_b2 = existingBuildInfo == null ? void 0 : existingBuildInfo.program) == null ? void 0 : _b2.outSignature)) {
109509
109760
  resultFlags &= ~2 /* DeclarationOutputUnchanged */;
109510
109761
  }
109511
- setBuildInfo(state, buildInfo, projectPath, config.options, resultFlags);
109762
+ setBuildInfo(state, data.buildInfo, projectPath, config.options, resultFlags);
109512
109763
  }
109513
109764
  writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
109514
109765
  });
@@ -109608,7 +109859,7 @@ ${lanes.join("\n")}
109608
109859
  }
109609
109860
  continue;
109610
109861
  }
109611
- if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 13 /* UpToDateWithInputFileText */) {
109862
+ if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 14 /* UpToDateWithInputFileText */) {
109612
109863
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
109613
109864
  return {
109614
109865
  kind: 2 /* UpdateOutputFileStamps */,
@@ -109620,7 +109871,7 @@ ${lanes.join("\n")}
109620
109871
  };
109621
109872
  }
109622
109873
  }
109623
- if (status.type === 10 /* UpstreamBlocked */) {
109874
+ if (status.type === 11 /* UpstreamBlocked */) {
109624
109875
  verboseReportProjectStatus(state, project, status);
109625
109876
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
109626
109877
  projectPendingBuild.delete(projectPath);
@@ -109634,7 +109885,7 @@ ${lanes.join("\n")}
109634
109885
  }
109635
109886
  continue;
109636
109887
  }
109637
- if (status.type === 14 /* ContainerOnly */) {
109888
+ if (status.type === 15 /* ContainerOnly */) {
109638
109889
  verboseReportProjectStatus(state, project, status);
109639
109890
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
109640
109891
  projectPendingBuild.delete(projectPath);
@@ -109796,7 +110047,7 @@ ${lanes.join("\n")}
109796
110047
  const existing = state.buildInfoCache.get(resolvedConfigPath);
109797
110048
  return (existing == null ? void 0 : existing.path) === path ? existing : void 0;
109798
110049
  }
109799
- function getBuildInfo2(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
110050
+ function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
109800
110051
  const path = toPath2(state, buildInfoPath);
109801
110052
  const existing = state.buildInfoCache.get(resolvedConfigPath);
109802
110053
  if (existing !== void 0 && existing.path === path) {
@@ -109821,31 +110072,31 @@ ${lanes.join("\n")}
109821
110072
  var _a2, _b;
109822
110073
  if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
109823
110074
  return {
109824
- type: 14 /* ContainerOnly */
110075
+ type: 15 /* ContainerOnly */
109825
110076
  };
109826
110077
  }
109827
110078
  let referenceStatuses;
109828
110079
  const force = !!state.options.force;
109829
110080
  if (project.projectReferences) {
109830
- state.projectStatus.set(resolvedPath, { type: 11 /* ComputingUpstream */ });
110081
+ state.projectStatus.set(resolvedPath, { type: 12 /* ComputingUpstream */ });
109831
110082
  for (const ref of project.projectReferences) {
109832
110083
  const resolvedRef = resolveProjectReferencePath(ref);
109833
110084
  const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
109834
110085
  const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
109835
110086
  const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
109836
- if (refStatus.type === 11 /* ComputingUpstream */ || refStatus.type === 14 /* ContainerOnly */) {
110087
+ if (refStatus.type === 12 /* ComputingUpstream */ || refStatus.type === 15 /* ContainerOnly */) {
109837
110088
  continue;
109838
110089
  }
109839
- if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 10 /* UpstreamBlocked */) {
110090
+ if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 11 /* UpstreamBlocked */) {
109840
110091
  return {
109841
- type: 10 /* UpstreamBlocked */,
110092
+ type: 11 /* UpstreamBlocked */,
109842
110093
  upstreamProjectName: ref.path,
109843
- upstreamProjectBlocked: refStatus.type === 10 /* UpstreamBlocked */
110094
+ upstreamProjectBlocked: refStatus.type === 11 /* UpstreamBlocked */
109844
110095
  };
109845
110096
  }
109846
110097
  if (refStatus.type !== 1 /* UpToDate */) {
109847
110098
  return {
109848
- type: 9 /* UpstreamOutOfDate */,
110099
+ type: 10 /* UpstreamOutOfDate */,
109849
110100
  upstreamProjectName: ref.path
109850
110101
  };
109851
110102
  }
@@ -109854,7 +110105,7 @@ ${lanes.join("\n")}
109854
110105
  }
109855
110106
  }
109856
110107
  if (force)
109857
- return { type: 15 /* ForceBuild */ };
110108
+ return { type: 16 /* ForceBuild */ };
109858
110109
  const { host } = state;
109859
110110
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
109860
110111
  let oldestOutputFileName;
@@ -109878,7 +110129,7 @@ ${lanes.join("\n")}
109878
110129
  missingOutputFileName: buildInfoPath
109879
110130
  };
109880
110131
  }
109881
- const buildInfo = getBuildInfo2(state, buildInfoPath, resolvedPath, buildInfoTime);
110132
+ const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime);
109882
110133
  if (!buildInfo) {
109883
110134
  return {
109884
110135
  type: 5 /* ErrorReadingFile */,
@@ -109887,7 +110138,7 @@ ${lanes.join("\n")}
109887
110138
  }
109888
110139
  if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== version) {
109889
110140
  return {
109890
- type: 12 /* TsVersionOutputOfDate */,
110141
+ type: 13 /* TsVersionOutputOfDate */,
109891
110142
  version: buildInfo.version
109892
110143
  };
109893
110144
  }
@@ -109898,6 +110149,12 @@ ${lanes.join("\n")}
109898
110149
  buildInfoFile: buildInfoPath
109899
110150
  };
109900
110151
  }
110152
+ if (!project.options.noEmit && getPendingEmitKind(project.options, buildInfo.program.options || {})) {
110153
+ return {
110154
+ type: 9 /* OutOfDateOptions */,
110155
+ buildInfoFile: buildInfoPath
110156
+ };
110157
+ }
109901
110158
  buildInfoProgram = buildInfo.program;
109902
110159
  }
109903
110160
  oldestOutputFileTime = buildInfoTime;
@@ -109922,7 +110179,7 @@ ${lanes.join("\n")}
109922
110179
  buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
109923
110180
  version2 = buildInfoVersionMap.get(toPath2(state, inputFile));
109924
110181
  const text = version2 ? state.readFileWithCache(inputFile) : void 0;
109925
- currentVersion = text && (host.createHash || generateDjb2Hash)(text);
110182
+ currentVersion = text && getSourceFileVersionAsHashFromText(host, text);
109926
110183
  if (version2 && version2 === currentVersion)
109927
110184
  pseudoInputUpToDate = true;
109928
110185
  }
@@ -110019,7 +110276,7 @@ ${lanes.join("\n")}
110019
110276
  };
110020
110277
  }
110021
110278
  return {
110022
- type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 13 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
110279
+ type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 14 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
110023
110280
  newestInputFileTime,
110024
110281
  newestInputFileName,
110025
110282
  oldestOutputFileName
@@ -110138,7 +110395,7 @@ ${lanes.join("\n")}
110138
110395
  }
110139
110396
  break;
110140
110397
  }
110141
- case 13 /* UpToDateWithInputFileText */:
110398
+ case 14 /* UpToDateWithInputFileText */:
110142
110399
  case 2 /* UpToDateWithUpstreamTypes */:
110143
110400
  case 3 /* OutOfDateWithPrepend */:
110144
110401
  if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {
@@ -110149,7 +110406,7 @@ ${lanes.join("\n")}
110149
110406
  });
110150
110407
  }
110151
110408
  break;
110152
- case 10 /* UpstreamBlocked */:
110409
+ case 11 /* UpstreamBlocked */:
110153
110410
  if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {
110154
110411
  clearProjectStatus(state, nextProjectPath);
110155
110412
  }
@@ -110555,6 +110812,13 @@ ${lanes.join("\n")}
110555
110812
  relName(state, configFileName),
110556
110813
  relName(state, status.buildInfoFile)
110557
110814
  );
110815
+ case 9 /* OutOfDateOptions */:
110816
+ return reportStatus(
110817
+ state,
110818
+ Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,
110819
+ relName(state, configFileName),
110820
+ relName(state, status.buildInfoFile)
110821
+ );
110558
110822
  case 1 /* UpToDate */:
110559
110823
  if (status.newestInputFileTime !== void 0) {
110560
110824
  return reportStatus(
@@ -110579,20 +110843,20 @@ ${lanes.join("\n")}
110579
110843
  Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,
110580
110844
  relName(state, configFileName)
110581
110845
  );
110582
- case 13 /* UpToDateWithInputFileText */:
110846
+ case 14 /* UpToDateWithInputFileText */:
110583
110847
  return reportStatus(
110584
110848
  state,
110585
110849
  Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,
110586
110850
  relName(state, configFileName)
110587
110851
  );
110588
- case 9 /* UpstreamOutOfDate */:
110852
+ case 10 /* UpstreamOutOfDate */:
110589
110853
  return reportStatus(
110590
110854
  state,
110591
110855
  Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,
110592
110856
  relName(state, configFileName),
110593
110857
  relName(state, status.upstreamProjectName)
110594
110858
  );
110595
- case 10 /* UpstreamBlocked */:
110859
+ case 11 /* UpstreamBlocked */:
110596
110860
  return reportStatus(
110597
110861
  state,
110598
110862
  status.upstreamProjectBlocked ? Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors,
@@ -110606,7 +110870,7 @@ ${lanes.join("\n")}
110606
110870
  relName(state, configFileName),
110607
110871
  status.reason
110608
110872
  );
110609
- case 12 /* TsVersionOutputOfDate */:
110873
+ case 13 /* TsVersionOutputOfDate */:
110610
110874
  return reportStatus(
110611
110875
  state,
110612
110876
  Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
@@ -110614,14 +110878,14 @@ ${lanes.join("\n")}
110614
110878
  status.version,
110615
110879
  version
110616
110880
  );
110617
- case 15 /* ForceBuild */:
110881
+ case 16 /* ForceBuild */:
110618
110882
  return reportStatus(
110619
110883
  state,
110620
110884
  Diagnostics.Project_0_is_being_forcibly_rebuilt,
110621
110885
  relName(state, configFileName)
110622
110886
  );
110623
- case 14 /* ContainerOnly */:
110624
- case 11 /* ComputingUpstream */:
110887
+ case 15 /* ContainerOnly */:
110888
+ case 12 /* ComputingUpstream */:
110625
110889
  break;
110626
110890
  default:
110627
110891
  assertType(status);
@@ -122529,12 +122793,24 @@ ${lanes.join("\n")}
122529
122793
  return transformJSDocFunctionType(node);
122530
122794
  case 180 /* TypeReference */:
122531
122795
  return transformJSDocTypeReference(node);
122796
+ case 325 /* JSDocTypeLiteral */:
122797
+ return transformJSDocTypeLiteral(node);
122532
122798
  default:
122533
122799
  const visited = visitEachChild(node, transformJSDocType, nullTransformationContext);
122534
122800
  setEmitFlags(visited, 1 /* SingleLine */);
122535
122801
  return visited;
122536
122802
  }
122537
122803
  }
122804
+ function transformJSDocTypeLiteral(node) {
122805
+ const typeNode = factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (tag) => factory.createPropertySignature(
122806
+ void 0,
122807
+ isIdentifier(tag.name) ? tag.name : tag.name.right,
122808
+ isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0,
122809
+ tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
122810
+ )));
122811
+ setEmitFlags(typeNode, 1 /* SingleLine */);
122812
+ return typeNode;
122813
+ }
122538
122814
  function transformJSDocOptionalType(node) {
122539
122815
  return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("undefined", emptyArray)]);
122540
122816
  }