@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/tsserver.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,
@@ -2636,7 +2649,7 @@ var ts = (() => {
2636
2649
 
2637
2650
  // src/compiler/corePublic.ts
2638
2651
  var versionMajorMinor = "5.0";
2639
- var version = `${versionMajorMinor}.0-insiders.20221107`;
2652
+ var version = `${versionMajorMinor}.0-insiders.20221108`;
2640
2653
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2641
2654
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2642
2655
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6701,6 +6714,11 @@ ${lanes.join("\n")}
6701
6714
  FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingFileExplainingDiagnostic"] = 1] = "FilePreprocessingFileExplainingDiagnostic";
6702
6715
  return FilePreprocessingDiagnosticsKind2;
6703
6716
  })(FilePreprocessingDiagnosticsKind || {});
6717
+ var EmitOnly = /* @__PURE__ */ ((EmitOnly4) => {
6718
+ EmitOnly4[EmitOnly4["Js"] = 0] = "Js";
6719
+ EmitOnly4[EmitOnly4["Dts"] = 1] = "Dts";
6720
+ return EmitOnly4;
6721
+ })(EmitOnly || {});
6704
6722
  var StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => {
6705
6723
  StructureIsReused2[StructureIsReused2["Not"] = 0] = "Not";
6706
6724
  StructureIsReused2[StructureIsReused2["SafeModules"] = 1] = "SafeModules";
@@ -10857,6 +10875,7 @@ ${lanes.join("\n")}
10857
10875
  Matched_0_condition_1: diag(6403, 3 /* Message */, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."),
10858
10876
  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}'."),
10859
10877
  Saw_non_matching_condition_0: diag(6405, 3 /* Message */, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."),
10878
+ 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"),
10860
10879
  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}'"),
10861
10880
  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."),
10862
10881
  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."),
@@ -14815,11 +14834,15 @@ ${lanes.join("\n")}
14815
14834
  }
14816
14835
  sourceFile.resolvedModules.set(moduleNameText, mode, resolvedModule);
14817
14836
  }
14818
- function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
14837
+ function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective, mode) {
14819
14838
  if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
14820
14839
  sourceFile.resolvedTypeReferenceDirectiveNames = createModeAwareCache();
14821
14840
  }
14822
- sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, void 0, resolvedTypeReferenceDirective);
14841
+ sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, mode, resolvedTypeReferenceDirective);
14842
+ }
14843
+ function getResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, mode) {
14844
+ var _a2;
14845
+ return (_a2 = sourceFile == null ? void 0 : sourceFile.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _a2.get(typeReferenceDirectiveName, mode);
14823
14846
  }
14824
14847
  function projectReferenceIsEqualTo(oldRef, newRef) {
14825
14848
  return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular;
@@ -14839,13 +14862,13 @@ ${lanes.join("\n")}
14839
14862
  function typeDirectiveIsEqualTo(oldResolution, newResolution) {
14840
14863
  return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.primary === newResolution.primary && oldResolution.originalPath === newResolution.originalPath;
14841
14864
  }
14842
- function hasChangesInResolutions(names, newResolutions, oldResolutions, oldSourceFile, comparer) {
14865
+ function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer) {
14843
14866
  Debug.assert(names.length === newResolutions.length);
14844
14867
  for (let i = 0; i < names.length; i++) {
14845
14868
  const newResolution = newResolutions[i];
14846
14869
  const entry = names[i];
14847
- const name = !isString(entry) ? entry.fileName.toLowerCase() : entry;
14848
- const mode = !isString(entry) ? getModeForFileReference(entry, oldSourceFile == null ? void 0 : oldSourceFile.impliedNodeFormat) : oldSourceFile && getModeForResolutionAtIndex(oldSourceFile, i);
14870
+ const name = getResolutionName(entry);
14871
+ const mode = getResolutionMode(entry, newSourceFile);
14849
14872
  const oldResolution = oldResolutions && oldResolutions.get(name, mode);
14850
14873
  const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution;
14851
14874
  if (changed) {
@@ -20119,6 +20142,13 @@ ${lanes.join("\n")}
20119
20142
  function canHaveExportModifier(node) {
20120
20143
  return isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isTypeDeclaration(node) || isModuleDeclaration(node) && !isExternalModuleAugmentation(node) && !isGlobalScopeAugmentation(node);
20121
20144
  }
20145
+ function isOptionalJSDocPropertyLikeTag(node) {
20146
+ if (!isJSDocPropertyLikeTag(node)) {
20147
+ return false;
20148
+ }
20149
+ const { isBracketed, typeExpression } = node;
20150
+ return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */;
20151
+ }
20122
20152
 
20123
20153
  // src/compiler/factory/baseNodeFactory.ts
20124
20154
  function createBaseNodeFactory() {
@@ -34675,12 +34705,60 @@ ${lanes.join("\n")}
34675
34705
  transpileOptionValue: void 0,
34676
34706
  defaultValueDescription: Diagnostics.false_unless_composite_is_set
34677
34707
  },
34708
+ {
34709
+ name: "declaration",
34710
+ shortName: "d",
34711
+ type: "boolean",
34712
+ affectsBuildInfo: true,
34713
+ showInSimplifiedHelpView: true,
34714
+ category: Diagnostics.Emit,
34715
+ transpileOptionValue: void 0,
34716
+ description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,
34717
+ defaultValueDescription: Diagnostics.false_unless_composite_is_set
34718
+ },
34719
+ {
34720
+ name: "declarationMap",
34721
+ type: "boolean",
34722
+ affectsBuildInfo: true,
34723
+ showInSimplifiedHelpView: true,
34724
+ category: Diagnostics.Emit,
34725
+ transpileOptionValue: void 0,
34726
+ defaultValueDescription: false,
34727
+ description: Diagnostics.Create_sourcemaps_for_d_ts_files
34728
+ },
34729
+ {
34730
+ name: "emitDeclarationOnly",
34731
+ type: "boolean",
34732
+ affectsBuildInfo: true,
34733
+ showInSimplifiedHelpView: true,
34734
+ category: Diagnostics.Emit,
34735
+ description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
34736
+ transpileOptionValue: void 0,
34737
+ defaultValueDescription: false
34738
+ },
34739
+ {
34740
+ name: "sourceMap",
34741
+ type: "boolean",
34742
+ affectsBuildInfo: true,
34743
+ showInSimplifiedHelpView: true,
34744
+ category: Diagnostics.Emit,
34745
+ defaultValueDescription: false,
34746
+ description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files
34747
+ },
34748
+ {
34749
+ name: "inlineSourceMap",
34750
+ type: "boolean",
34751
+ affectsBuildInfo: true,
34752
+ category: Diagnostics.Emit,
34753
+ description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
34754
+ defaultValueDescription: false
34755
+ },
34678
34756
  {
34679
34757
  name: "assumeChangesOnlyAffectDirectDependencies",
34680
34758
  type: "boolean",
34681
34759
  affectsSemanticDiagnostics: true,
34682
34760
  affectsEmit: true,
34683
- affectsMultiFileEmitBuildInfo: true,
34761
+ affectsBuildInfo: true,
34684
34762
  category: Diagnostics.Watch_and_Build_Modes,
34685
34763
  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,
34686
34764
  defaultValueDescription: false
@@ -34714,7 +34792,7 @@ ${lanes.join("\n")}
34714
34792
  affectsSourceFile: true,
34715
34793
  affectsModuleResolution: true,
34716
34794
  affectsEmit: true,
34717
- affectsMultiFileEmitBuildInfo: true,
34795
+ affectsBuildInfo: true,
34718
34796
  paramType: Diagnostics.VERSION,
34719
34797
  showInSimplifiedHelpView: true,
34720
34798
  category: Diagnostics.Language_and_Environment,
@@ -34740,7 +34818,7 @@ ${lanes.join("\n")}
34740
34818
  })),
34741
34819
  affectsModuleResolution: true,
34742
34820
  affectsEmit: true,
34743
- affectsMultiFileEmitBuildInfo: true,
34821
+ affectsBuildInfo: true,
34744
34822
  paramType: Diagnostics.KIND,
34745
34823
  showInSimplifiedHelpView: true,
34746
34824
  category: Diagnostics.Modules,
@@ -34847,7 +34925,7 @@ ${lanes.join("\n")}
34847
34925
  type: jsxOptionMap,
34848
34926
  affectsSourceFile: true,
34849
34927
  affectsEmit: true,
34850
- affectsMultiFileEmitBuildInfo: true,
34928
+ affectsBuildInfo: true,
34851
34929
  affectsModuleResolution: true,
34852
34930
  paramType: Diagnostics.KIND,
34853
34931
  showInSimplifiedHelpView: true,
@@ -34855,57 +34933,12 @@ ${lanes.join("\n")}
34855
34933
  description: Diagnostics.Specify_what_JSX_code_is_generated,
34856
34934
  defaultValueDescription: void 0
34857
34935
  },
34858
- {
34859
- name: "declaration",
34860
- shortName: "d",
34861
- type: "boolean",
34862
- affectsEmit: true,
34863
- affectsMultiFileEmitBuildInfo: true,
34864
- showInSimplifiedHelpView: true,
34865
- category: Diagnostics.Emit,
34866
- transpileOptionValue: void 0,
34867
- description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,
34868
- defaultValueDescription: Diagnostics.false_unless_composite_is_set
34869
- },
34870
- {
34871
- name: "declarationMap",
34872
- type: "boolean",
34873
- affectsEmit: true,
34874
- affectsMultiFileEmitBuildInfo: true,
34875
- showInSimplifiedHelpView: true,
34876
- category: Diagnostics.Emit,
34877
- transpileOptionValue: void 0,
34878
- defaultValueDescription: false,
34879
- description: Diagnostics.Create_sourcemaps_for_d_ts_files
34880
- },
34881
- {
34882
- name: "emitDeclarationOnly",
34883
- type: "boolean",
34884
- affectsEmit: true,
34885
- affectsMultiFileEmitBuildInfo: true,
34886
- showInSimplifiedHelpView: true,
34887
- category: Diagnostics.Emit,
34888
- description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
34889
- transpileOptionValue: void 0,
34890
- defaultValueDescription: false
34891
- },
34892
- {
34893
- name: "sourceMap",
34894
- type: "boolean",
34895
- affectsEmit: true,
34896
- affectsMultiFileEmitBuildInfo: true,
34897
- showInSimplifiedHelpView: true,
34898
- category: Diagnostics.Emit,
34899
- defaultValueDescription: false,
34900
- description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files
34901
- },
34902
34936
  {
34903
34937
  name: "outFile",
34904
34938
  type: "string",
34905
34939
  affectsEmit: true,
34906
- affectsMultiFileEmitBuildInfo: true,
34940
+ affectsBuildInfo: true,
34907
34941
  affectsDeclarationPath: true,
34908
- affectsBundleEmitBuildInfo: true,
34909
34942
  isFilePath: true,
34910
34943
  paramType: Diagnostics.FILE,
34911
34944
  showInSimplifiedHelpView: true,
@@ -34917,7 +34950,7 @@ ${lanes.join("\n")}
34917
34950
  name: "outDir",
34918
34951
  type: "string",
34919
34952
  affectsEmit: true,
34920
- affectsMultiFileEmitBuildInfo: true,
34953
+ affectsBuildInfo: true,
34921
34954
  affectsDeclarationPath: true,
34922
34955
  isFilePath: true,
34923
34956
  paramType: Diagnostics.DIRECTORY,
@@ -34929,7 +34962,7 @@ ${lanes.join("\n")}
34929
34962
  name: "rootDir",
34930
34963
  type: "string",
34931
34964
  affectsEmit: true,
34932
- affectsMultiFileEmitBuildInfo: true,
34965
+ affectsBuildInfo: true,
34933
34966
  affectsDeclarationPath: true,
34934
34967
  isFilePath: true,
34935
34968
  paramType: Diagnostics.LOCATION,
@@ -34940,9 +34973,7 @@ ${lanes.join("\n")}
34940
34973
  {
34941
34974
  name: "composite",
34942
34975
  type: "boolean",
34943
- affectsEmit: true,
34944
- affectsMultiFileEmitBuildInfo: true,
34945
- affectsBundleEmitBuildInfo: true,
34976
+ affectsBuildInfo: true,
34946
34977
  isTSConfigOnly: true,
34947
34978
  category: Diagnostics.Projects,
34948
34979
  transpileOptionValue: void 0,
@@ -34953,8 +34984,7 @@ ${lanes.join("\n")}
34953
34984
  name: "tsBuildInfoFile",
34954
34985
  type: "string",
34955
34986
  affectsEmit: true,
34956
- affectsMultiFileEmitBuildInfo: true,
34957
- affectsBundleEmitBuildInfo: true,
34987
+ affectsBuildInfo: true,
34958
34988
  isFilePath: true,
34959
34989
  paramType: Diagnostics.FILE,
34960
34990
  category: Diagnostics.Projects,
@@ -34966,7 +34996,7 @@ ${lanes.join("\n")}
34966
34996
  name: "removeComments",
34967
34997
  type: "boolean",
34968
34998
  affectsEmit: true,
34969
- affectsMultiFileEmitBuildInfo: true,
34999
+ affectsBuildInfo: true,
34970
35000
  showInSimplifiedHelpView: true,
34971
35001
  category: Diagnostics.Emit,
34972
35002
  defaultValueDescription: false,
@@ -34985,7 +35015,7 @@ ${lanes.join("\n")}
34985
35015
  name: "importHelpers",
34986
35016
  type: "boolean",
34987
35017
  affectsEmit: true,
34988
- affectsMultiFileEmitBuildInfo: true,
35018
+ affectsBuildInfo: true,
34989
35019
  category: Diagnostics.Emit,
34990
35020
  description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
34991
35021
  defaultValueDescription: false
@@ -34999,7 +35029,7 @@ ${lanes.join("\n")}
34999
35029
  })),
35000
35030
  affectsEmit: true,
35001
35031
  affectsSemanticDiagnostics: true,
35002
- affectsMultiFileEmitBuildInfo: true,
35032
+ affectsBuildInfo: true,
35003
35033
  category: Diagnostics.Emit,
35004
35034
  description: Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
35005
35035
  defaultValueDescription: 0 /* Remove */
@@ -35008,7 +35038,7 @@ ${lanes.join("\n")}
35008
35038
  name: "downlevelIteration",
35009
35039
  type: "boolean",
35010
35040
  affectsEmit: true,
35011
- affectsMultiFileEmitBuildInfo: true,
35041
+ affectsBuildInfo: true,
35012
35042
  category: Diagnostics.Emit,
35013
35043
  description: Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
35014
35044
  defaultValueDescription: false
@@ -35024,7 +35054,7 @@ ${lanes.join("\n")}
35024
35054
  {
35025
35055
  name: "strict",
35026
35056
  type: "boolean",
35027
- affectsMultiFileEmitBuildInfo: true,
35057
+ affectsBuildInfo: true,
35028
35058
  showInSimplifiedHelpView: true,
35029
35059
  category: Diagnostics.Type_Checking,
35030
35060
  description: Diagnostics.Enable_all_strict_type_checking_options,
@@ -35034,7 +35064,7 @@ ${lanes.join("\n")}
35034
35064
  name: "noImplicitAny",
35035
35065
  type: "boolean",
35036
35066
  affectsSemanticDiagnostics: true,
35037
- affectsMultiFileEmitBuildInfo: true,
35067
+ affectsBuildInfo: true,
35038
35068
  strictFlag: true,
35039
35069
  category: Diagnostics.Type_Checking,
35040
35070
  description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
@@ -35044,7 +35074,7 @@ ${lanes.join("\n")}
35044
35074
  name: "strictNullChecks",
35045
35075
  type: "boolean",
35046
35076
  affectsSemanticDiagnostics: true,
35047
- affectsMultiFileEmitBuildInfo: true,
35077
+ affectsBuildInfo: true,
35048
35078
  strictFlag: true,
35049
35079
  category: Diagnostics.Type_Checking,
35050
35080
  description: Diagnostics.When_type_checking_take_into_account_null_and_undefined,
@@ -35054,7 +35084,7 @@ ${lanes.join("\n")}
35054
35084
  name: "strictFunctionTypes",
35055
35085
  type: "boolean",
35056
35086
  affectsSemanticDiagnostics: true,
35057
- affectsMultiFileEmitBuildInfo: true,
35087
+ affectsBuildInfo: true,
35058
35088
  strictFlag: true,
35059
35089
  category: Diagnostics.Type_Checking,
35060
35090
  description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
@@ -35064,7 +35094,7 @@ ${lanes.join("\n")}
35064
35094
  name: "strictBindCallApply",
35065
35095
  type: "boolean",
35066
35096
  affectsSemanticDiagnostics: true,
35067
- affectsMultiFileEmitBuildInfo: true,
35097
+ affectsBuildInfo: true,
35068
35098
  strictFlag: true,
35069
35099
  category: Diagnostics.Type_Checking,
35070
35100
  description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
@@ -35074,7 +35104,7 @@ ${lanes.join("\n")}
35074
35104
  name: "strictPropertyInitialization",
35075
35105
  type: "boolean",
35076
35106
  affectsSemanticDiagnostics: true,
35077
- affectsMultiFileEmitBuildInfo: true,
35107
+ affectsBuildInfo: true,
35078
35108
  strictFlag: true,
35079
35109
  category: Diagnostics.Type_Checking,
35080
35110
  description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
@@ -35084,7 +35114,7 @@ ${lanes.join("\n")}
35084
35114
  name: "noImplicitThis",
35085
35115
  type: "boolean",
35086
35116
  affectsSemanticDiagnostics: true,
35087
- affectsMultiFileEmitBuildInfo: true,
35117
+ affectsBuildInfo: true,
35088
35118
  strictFlag: true,
35089
35119
  category: Diagnostics.Type_Checking,
35090
35120
  description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
@@ -35094,7 +35124,7 @@ ${lanes.join("\n")}
35094
35124
  name: "useUnknownInCatchVariables",
35095
35125
  type: "boolean",
35096
35126
  affectsSemanticDiagnostics: true,
35097
- affectsMultiFileEmitBuildInfo: true,
35127
+ affectsBuildInfo: true,
35098
35128
  strictFlag: true,
35099
35129
  category: Diagnostics.Type_Checking,
35100
35130
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
@@ -35105,7 +35135,7 @@ ${lanes.join("\n")}
35105
35135
  type: "boolean",
35106
35136
  affectsSourceFile: true,
35107
35137
  affectsEmit: true,
35108
- affectsMultiFileEmitBuildInfo: true,
35138
+ affectsBuildInfo: true,
35109
35139
  strictFlag: true,
35110
35140
  category: Diagnostics.Type_Checking,
35111
35141
  description: Diagnostics.Ensure_use_strict_is_always_emitted,
@@ -35115,7 +35145,7 @@ ${lanes.join("\n")}
35115
35145
  name: "noUnusedLocals",
35116
35146
  type: "boolean",
35117
35147
  affectsSemanticDiagnostics: true,
35118
- affectsMultiFileEmitBuildInfo: true,
35148
+ affectsBuildInfo: true,
35119
35149
  category: Diagnostics.Type_Checking,
35120
35150
  description: Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
35121
35151
  defaultValueDescription: false
@@ -35124,7 +35154,7 @@ ${lanes.join("\n")}
35124
35154
  name: "noUnusedParameters",
35125
35155
  type: "boolean",
35126
35156
  affectsSemanticDiagnostics: true,
35127
- affectsMultiFileEmitBuildInfo: true,
35157
+ affectsBuildInfo: true,
35128
35158
  category: Diagnostics.Type_Checking,
35129
35159
  description: Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
35130
35160
  defaultValueDescription: false
@@ -35133,7 +35163,7 @@ ${lanes.join("\n")}
35133
35163
  name: "exactOptionalPropertyTypes",
35134
35164
  type: "boolean",
35135
35165
  affectsSemanticDiagnostics: true,
35136
- affectsMultiFileEmitBuildInfo: true,
35166
+ affectsBuildInfo: true,
35137
35167
  category: Diagnostics.Type_Checking,
35138
35168
  description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
35139
35169
  defaultValueDescription: false
@@ -35142,7 +35172,7 @@ ${lanes.join("\n")}
35142
35172
  name: "noImplicitReturns",
35143
35173
  type: "boolean",
35144
35174
  affectsSemanticDiagnostics: true,
35145
- affectsMultiFileEmitBuildInfo: true,
35175
+ affectsBuildInfo: true,
35146
35176
  category: Diagnostics.Type_Checking,
35147
35177
  description: Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
35148
35178
  defaultValueDescription: false
@@ -35152,7 +35182,7 @@ ${lanes.join("\n")}
35152
35182
  type: "boolean",
35153
35183
  affectsBindDiagnostics: true,
35154
35184
  affectsSemanticDiagnostics: true,
35155
- affectsMultiFileEmitBuildInfo: true,
35185
+ affectsBuildInfo: true,
35156
35186
  category: Diagnostics.Type_Checking,
35157
35187
  description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
35158
35188
  defaultValueDescription: false
@@ -35161,7 +35191,7 @@ ${lanes.join("\n")}
35161
35191
  name: "noUncheckedIndexedAccess",
35162
35192
  type: "boolean",
35163
35193
  affectsSemanticDiagnostics: true,
35164
- affectsMultiFileEmitBuildInfo: true,
35194
+ affectsBuildInfo: true,
35165
35195
  category: Diagnostics.Type_Checking,
35166
35196
  description: Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
35167
35197
  defaultValueDescription: false
@@ -35170,7 +35200,7 @@ ${lanes.join("\n")}
35170
35200
  name: "noImplicitOverride",
35171
35201
  type: "boolean",
35172
35202
  affectsSemanticDiagnostics: true,
35173
- affectsMultiFileEmitBuildInfo: true,
35203
+ affectsBuildInfo: true,
35174
35204
  category: Diagnostics.Type_Checking,
35175
35205
  description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
35176
35206
  defaultValueDescription: false
@@ -35179,7 +35209,7 @@ ${lanes.join("\n")}
35179
35209
  name: "noPropertyAccessFromIndexSignature",
35180
35210
  type: "boolean",
35181
35211
  affectsSemanticDiagnostics: true,
35182
- affectsMultiFileEmitBuildInfo: true,
35212
+ affectsBuildInfo: true,
35183
35213
  showInSimplifiedHelpView: false,
35184
35214
  category: Diagnostics.Type_Checking,
35185
35215
  description: Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
@@ -35260,7 +35290,7 @@ ${lanes.join("\n")}
35260
35290
  name: "allowSyntheticDefaultImports",
35261
35291
  type: "boolean",
35262
35292
  affectsSemanticDiagnostics: true,
35263
- affectsMultiFileEmitBuildInfo: true,
35293
+ affectsBuildInfo: true,
35264
35294
  category: Diagnostics.Interop_Constraints,
35265
35295
  description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
35266
35296
  defaultValueDescription: Diagnostics.module_system_or_esModuleInterop
@@ -35270,7 +35300,7 @@ ${lanes.join("\n")}
35270
35300
  type: "boolean",
35271
35301
  affectsSemanticDiagnostics: true,
35272
35302
  affectsEmit: true,
35273
- affectsMultiFileEmitBuildInfo: true,
35303
+ affectsBuildInfo: true,
35274
35304
  showInSimplifiedHelpView: true,
35275
35305
  category: Diagnostics.Interop_Constraints,
35276
35306
  description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
@@ -35287,7 +35317,7 @@ ${lanes.join("\n")}
35287
35317
  name: "allowUmdGlobalAccess",
35288
35318
  type: "boolean",
35289
35319
  affectsSemanticDiagnostics: true,
35290
- affectsMultiFileEmitBuildInfo: true,
35320
+ affectsBuildInfo: true,
35291
35321
  category: Diagnostics.Modules,
35292
35322
  description: Diagnostics.Allow_accessing_UMD_globals_from_modules,
35293
35323
  defaultValueDescription: false
@@ -35308,7 +35338,7 @@ ${lanes.join("\n")}
35308
35338
  name: "sourceRoot",
35309
35339
  type: "string",
35310
35340
  affectsEmit: true,
35311
- affectsMultiFileEmitBuildInfo: true,
35341
+ affectsBuildInfo: true,
35312
35342
  paramType: Diagnostics.LOCATION,
35313
35343
  category: Diagnostics.Emit,
35314
35344
  description: Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code
@@ -35317,25 +35347,16 @@ ${lanes.join("\n")}
35317
35347
  name: "mapRoot",
35318
35348
  type: "string",
35319
35349
  affectsEmit: true,
35320
- affectsMultiFileEmitBuildInfo: true,
35350
+ affectsBuildInfo: true,
35321
35351
  paramType: Diagnostics.LOCATION,
35322
35352
  category: Diagnostics.Emit,
35323
35353
  description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations
35324
35354
  },
35325
- {
35326
- name: "inlineSourceMap",
35327
- type: "boolean",
35328
- affectsEmit: true,
35329
- affectsMultiFileEmitBuildInfo: true,
35330
- category: Diagnostics.Emit,
35331
- description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
35332
- defaultValueDescription: false
35333
- },
35334
35355
  {
35335
35356
  name: "inlineSources",
35336
35357
  type: "boolean",
35337
35358
  affectsEmit: true,
35338
- affectsMultiFileEmitBuildInfo: true,
35359
+ affectsBuildInfo: true,
35339
35360
  category: Diagnostics.Emit,
35340
35361
  description: Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
35341
35362
  defaultValueDescription: false
@@ -35344,7 +35365,7 @@ ${lanes.join("\n")}
35344
35365
  name: "experimentalDecorators",
35345
35366
  type: "boolean",
35346
35367
  affectsSemanticDiagnostics: true,
35347
- affectsMultiFileEmitBuildInfo: true,
35368
+ affectsBuildInfo: true,
35348
35369
  category: Diagnostics.Language_and_Environment,
35349
35370
  description: Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
35350
35371
  defaultValueDescription: false
@@ -35354,7 +35375,7 @@ ${lanes.join("\n")}
35354
35375
  type: "boolean",
35355
35376
  affectsSemanticDiagnostics: true,
35356
35377
  affectsEmit: true,
35357
- affectsMultiFileEmitBuildInfo: true,
35378
+ affectsBuildInfo: true,
35358
35379
  category: Diagnostics.Language_and_Environment,
35359
35380
  description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
35360
35381
  defaultValueDescription: false
@@ -35378,7 +35399,7 @@ ${lanes.join("\n")}
35378
35399
  type: "string",
35379
35400
  affectsSemanticDiagnostics: true,
35380
35401
  affectsEmit: true,
35381
- affectsMultiFileEmitBuildInfo: true,
35402
+ affectsBuildInfo: true,
35382
35403
  affectsModuleResolution: true,
35383
35404
  category: Diagnostics.Language_and_Environment,
35384
35405
  description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
@@ -35396,9 +35417,8 @@ ${lanes.join("\n")}
35396
35417
  name: "out",
35397
35418
  type: "string",
35398
35419
  affectsEmit: true,
35399
- affectsMultiFileEmitBuildInfo: true,
35420
+ affectsBuildInfo: true,
35400
35421
  affectsDeclarationPath: true,
35401
- affectsBundleEmitBuildInfo: true,
35402
35422
  isFilePath: false,
35403
35423
  category: Diagnostics.Backwards_Compatibility,
35404
35424
  paramType: Diagnostics.FILE,
@@ -35409,7 +35429,7 @@ ${lanes.join("\n")}
35409
35429
  name: "reactNamespace",
35410
35430
  type: "string",
35411
35431
  affectsEmit: true,
35412
- affectsMultiFileEmitBuildInfo: true,
35432
+ affectsBuildInfo: true,
35413
35433
  category: Diagnostics.Language_and_Environment,
35414
35434
  description: Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
35415
35435
  defaultValueDescription: "`React`"
@@ -35417,7 +35437,7 @@ ${lanes.join("\n")}
35417
35437
  {
35418
35438
  name: "skipDefaultLibCheck",
35419
35439
  type: "boolean",
35420
- affectsMultiFileEmitBuildInfo: true,
35440
+ affectsBuildInfo: true,
35421
35441
  category: Diagnostics.Completeness,
35422
35442
  description: Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
35423
35443
  defaultValueDescription: false
@@ -35433,7 +35453,7 @@ ${lanes.join("\n")}
35433
35453
  name: "emitBOM",
35434
35454
  type: "boolean",
35435
35455
  affectsEmit: true,
35436
- affectsMultiFileEmitBuildInfo: true,
35456
+ affectsBuildInfo: true,
35437
35457
  category: Diagnostics.Emit,
35438
35458
  description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
35439
35459
  defaultValueDescription: false
@@ -35445,7 +35465,7 @@ ${lanes.join("\n")}
35445
35465
  lf: 1 /* LineFeed */
35446
35466
  })),
35447
35467
  affectsEmit: true,
35448
- affectsMultiFileEmitBuildInfo: true,
35468
+ affectsBuildInfo: true,
35449
35469
  paramType: Diagnostics.NEWLINE,
35450
35470
  category: Diagnostics.Emit,
35451
35471
  description: Diagnostics.Set_the_newline_character_for_emitting_files,
@@ -35455,7 +35475,7 @@ ${lanes.join("\n")}
35455
35475
  name: "noErrorTruncation",
35456
35476
  type: "boolean",
35457
35477
  affectsSemanticDiagnostics: true,
35458
- affectsMultiFileEmitBuildInfo: true,
35478
+ affectsBuildInfo: true,
35459
35479
  category: Diagnostics.Output_Formatting,
35460
35480
  description: Diagnostics.Disable_truncating_types_in_error_messages,
35461
35481
  defaultValueDescription: false
@@ -35482,7 +35502,7 @@ ${lanes.join("\n")}
35482
35502
  name: "stripInternal",
35483
35503
  type: "boolean",
35484
35504
  affectsEmit: true,
35485
- affectsMultiFileEmitBuildInfo: true,
35505
+ affectsBuildInfo: true,
35486
35506
  category: Diagnostics.Emit,
35487
35507
  description: Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
35488
35508
  defaultValueDescription: false
@@ -35523,7 +35543,7 @@ ${lanes.join("\n")}
35523
35543
  name: "noImplicitUseStrict",
35524
35544
  type: "boolean",
35525
35545
  affectsSemanticDiagnostics: true,
35526
- affectsMultiFileEmitBuildInfo: true,
35546
+ affectsBuildInfo: true,
35527
35547
  category: Diagnostics.Backwards_Compatibility,
35528
35548
  description: Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
35529
35549
  defaultValueDescription: false
@@ -35532,7 +35552,7 @@ ${lanes.join("\n")}
35532
35552
  name: "noEmitHelpers",
35533
35553
  type: "boolean",
35534
35554
  affectsEmit: true,
35535
- affectsMultiFileEmitBuildInfo: true,
35555
+ affectsBuildInfo: true,
35536
35556
  category: Diagnostics.Emit,
35537
35557
  description: Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
35538
35558
  defaultValueDescription: false
@@ -35541,7 +35561,7 @@ ${lanes.join("\n")}
35541
35561
  name: "noEmitOnError",
35542
35562
  type: "boolean",
35543
35563
  affectsEmit: true,
35544
- affectsMultiFileEmitBuildInfo: true,
35564
+ affectsBuildInfo: true,
35545
35565
  category: Diagnostics.Emit,
35546
35566
  transpileOptionValue: void 0,
35547
35567
  description: Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
@@ -35551,7 +35571,7 @@ ${lanes.join("\n")}
35551
35571
  name: "preserveConstEnums",
35552
35572
  type: "boolean",
35553
35573
  affectsEmit: true,
35554
- affectsMultiFileEmitBuildInfo: true,
35574
+ affectsBuildInfo: true,
35555
35575
  category: Diagnostics.Emit,
35556
35576
  description: Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
35557
35577
  defaultValueDescription: false
@@ -35560,7 +35580,7 @@ ${lanes.join("\n")}
35560
35580
  name: "declarationDir",
35561
35581
  type: "string",
35562
35582
  affectsEmit: true,
35563
- affectsMultiFileEmitBuildInfo: true,
35583
+ affectsBuildInfo: true,
35564
35584
  affectsDeclarationPath: true,
35565
35585
  isFilePath: true,
35566
35586
  paramType: Diagnostics.DIRECTORY,
@@ -35571,7 +35591,7 @@ ${lanes.join("\n")}
35571
35591
  {
35572
35592
  name: "skipLibCheck",
35573
35593
  type: "boolean",
35574
- affectsMultiFileEmitBuildInfo: true,
35594
+ affectsBuildInfo: true,
35575
35595
  category: Diagnostics.Completeness,
35576
35596
  description: Diagnostics.Skip_type_checking_all_d_ts_files,
35577
35597
  defaultValueDescription: false
@@ -35581,7 +35601,7 @@ ${lanes.join("\n")}
35581
35601
  type: "boolean",
35582
35602
  affectsBindDiagnostics: true,
35583
35603
  affectsSemanticDiagnostics: true,
35584
- affectsMultiFileEmitBuildInfo: true,
35604
+ affectsBuildInfo: true,
35585
35605
  category: Diagnostics.Type_Checking,
35586
35606
  description: Diagnostics.Disable_error_reporting_for_unused_labels,
35587
35607
  defaultValueDescription: void 0
@@ -35591,7 +35611,7 @@ ${lanes.join("\n")}
35591
35611
  type: "boolean",
35592
35612
  affectsBindDiagnostics: true,
35593
35613
  affectsSemanticDiagnostics: true,
35594
- affectsMultiFileEmitBuildInfo: true,
35614
+ affectsBuildInfo: true,
35595
35615
  category: Diagnostics.Type_Checking,
35596
35616
  description: Diagnostics.Disable_error_reporting_for_unreachable_code,
35597
35617
  defaultValueDescription: void 0
@@ -35600,7 +35620,7 @@ ${lanes.join("\n")}
35600
35620
  name: "suppressExcessPropertyErrors",
35601
35621
  type: "boolean",
35602
35622
  affectsSemanticDiagnostics: true,
35603
- affectsMultiFileEmitBuildInfo: true,
35623
+ affectsBuildInfo: true,
35604
35624
  category: Diagnostics.Backwards_Compatibility,
35605
35625
  description: Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
35606
35626
  defaultValueDescription: false
@@ -35609,7 +35629,7 @@ ${lanes.join("\n")}
35609
35629
  name: "suppressImplicitAnyIndexErrors",
35610
35630
  type: "boolean",
35611
35631
  affectsSemanticDiagnostics: true,
35612
- affectsMultiFileEmitBuildInfo: true,
35632
+ affectsBuildInfo: true,
35613
35633
  category: Diagnostics.Backwards_Compatibility,
35614
35634
  description: Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
35615
35635
  defaultValueDescription: false
@@ -35634,7 +35654,7 @@ ${lanes.join("\n")}
35634
35654
  name: "noStrictGenericChecks",
35635
35655
  type: "boolean",
35636
35656
  affectsSemanticDiagnostics: true,
35637
- affectsMultiFileEmitBuildInfo: true,
35657
+ affectsBuildInfo: true,
35638
35658
  category: Diagnostics.Backwards_Compatibility,
35639
35659
  description: Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
35640
35660
  defaultValueDescription: false
@@ -35644,7 +35664,7 @@ ${lanes.join("\n")}
35644
35664
  type: "boolean",
35645
35665
  affectsSemanticDiagnostics: true,
35646
35666
  affectsEmit: true,
35647
- affectsMultiFileEmitBuildInfo: true,
35667
+ affectsBuildInfo: true,
35648
35668
  category: Diagnostics.Language_and_Environment,
35649
35669
  description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
35650
35670
  defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext
@@ -35653,7 +35673,7 @@ ${lanes.join("\n")}
35653
35673
  name: "preserveValueImports",
35654
35674
  type: "boolean",
35655
35675
  affectsEmit: true,
35656
- affectsMultiFileEmitBuildInfo: true,
35676
+ affectsBuildInfo: true,
35657
35677
  category: Diagnostics.Emit,
35658
35678
  description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
35659
35679
  defaultValueDescription: false
@@ -37892,14 +37912,18 @@ ${lanes.join("\n")}
37892
37912
  return result;
37893
37913
  }
37894
37914
  }
37915
+ function getResolutionName(entry) {
37916
+ return !isString(entry) ? isStringLiteralLike(entry) ? entry.text : toFileNameLowerCase(entry.fileName) : entry;
37917
+ }
37918
+ function getResolutionMode(entry, file) {
37919
+ return isStringLiteralLike(entry) ? getModeForUsageLocation(file, entry) : entry.resolutionMode || file.impliedNodeFormat;
37920
+ }
37895
37921
  function zipToModeAwareCache(file, keys, values) {
37896
37922
  Debug.assert(keys.length === values.length);
37897
37923
  const map2 = createModeAwareCache();
37898
37924
  for (let i = 0; i < keys.length; ++i) {
37899
37925
  const entry = keys[i];
37900
- const name = !isString(entry) ? entry.fileName.toLowerCase() : entry;
37901
- const mode = !isString(entry) ? entry.resolutionMode || file.impliedNodeFormat : getModeForResolutionAtIndex(file, i);
37902
- map2.set(name, mode, values[i]);
37926
+ map2.set(getResolutionName(entry), getResolutionMode(entry, file), values[i]);
37903
37927
  }
37904
37928
  return map2;
37905
37929
  }
@@ -52816,13 +52840,6 @@ ${lanes.join("\n")}
52816
52840
  function isOptionalPropertyDeclaration(node) {
52817
52841
  return isPropertyDeclaration(node) && !hasAccessorModifier(node) && node.questionToken;
52818
52842
  }
52819
- function isOptionalJSDocPropertyLikeTag(node) {
52820
- if (!isJSDocPropertyLikeTag(node)) {
52821
- return false;
52822
- }
52823
- const { isBracketed, typeExpression } = node;
52824
- return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */;
52825
- }
52826
52843
  function createTypePredicate(kind, parameterName, parameterIndex, type) {
52827
52844
  return { kind, parameterName, parameterIndex, type };
52828
52845
  }
@@ -57428,7 +57445,7 @@ ${lanes.join("\n")}
57428
57445
  }
57429
57446
  function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) {
57430
57447
  if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 131068 /* Primitive */) {
57431
- if (isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) {
57448
+ if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) {
57432
57449
  return -1 /* True */;
57433
57450
  }
57434
57451
  if (reportErrors2) {
@@ -60559,6 +60576,7 @@ ${lanes.join("\n")}
60559
60576
  }
60560
60577
  }
60561
60578
  function inferFromObjectTypes(source, target) {
60579
+ var _a2, _b;
60562
60580
  if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) {
60563
60581
  inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));
60564
60582
  return;
@@ -60605,11 +60623,35 @@ ${lanes.join("\n")}
60605
60623
  }
60606
60624
  } else {
60607
60625
  const middleLength = targetArity - startLength - endLength;
60608
- if (middleLength === 2 && elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */ && isTupleType(source)) {
60609
- const targetInfo = getInferenceInfoForType(elementTypes[startLength]);
60610
- if (targetInfo && targetInfo.impliedArity !== void 0) {
60611
- inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
60612
- inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
60626
+ if (middleLength === 2) {
60627
+ if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */ && isTupleType(source)) {
60628
+ const targetInfo = getInferenceInfoForType(elementTypes[startLength]);
60629
+ if (targetInfo && targetInfo.impliedArity !== void 0) {
60630
+ inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
60631
+ inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
60632
+ }
60633
+ } else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) {
60634
+ const param = (_a2 = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _a2.typeParameter;
60635
+ const constraint = param && getBaseConstraintOfType(param);
60636
+ if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) {
60637
+ const impliedArity = constraint.target.fixedLength;
60638
+ inferFromTypes(sliceTupleType(source, startLength, sourceArity - (startLength + impliedArity)), elementTypes[startLength]);
60639
+ }
60640
+ } else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */ && isTupleType(source)) {
60641
+ const param = (_b = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _b.typeParameter;
60642
+ const constraint = param && getBaseConstraintOfType(param);
60643
+ if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) {
60644
+ const impliedArity = constraint.target.fixedLength;
60645
+ const endIndex = sourceArity - getEndElementCount(target.target, 3 /* Fixed */);
60646
+ const startIndex = endIndex - impliedArity;
60647
+ const trailingSlice = createTupleType(
60648
+ getTypeArguments(source).slice(startIndex, endIndex),
60649
+ source.target.elementFlags.slice(startIndex, endIndex),
60650
+ false,
60651
+ source.target.labeledElementDeclarations && source.target.labeledElementDeclarations.slice(startIndex, endIndex)
60652
+ );
60653
+ inferFromTypes(trailingSlice, elementTypes[startLength + 1]);
60654
+ }
60613
60655
  }
60614
60656
  } else if (middleLength === 1 && elementFlags[startLength] & 8 /* Variadic */) {
60615
60657
  const endsInOptional = target.target.elementFlags[targetArity - 1] & 2 /* Optional */;
@@ -79291,6 +79333,7 @@ ${lanes.join("\n")}
79291
79333
  } while (inValue > 0);
79292
79334
  }
79293
79335
  }
79336
+ var sourceMapCommentRegExpDontCareLineStart = /\/\/[@#] source[M]appingURL=(.+)\r?\n?$/;
79294
79337
  var sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/;
79295
79338
  var whitespaceOrMapCommentRegExp = /^\s*(\/\/[@#] .*)?$/;
79296
79339
  function getLineInfo(text, lineStarts) {
@@ -96325,14 +96368,14 @@ ${lanes.join("\n")}
96325
96368
  }
96326
96369
  }
96327
96370
  var noTransformers = { scriptTransformers: emptyArray, declarationTransformers: emptyArray };
96328
- function getTransformers(compilerOptions, customTransformers, emitOnlyDtsFiles) {
96371
+ function getTransformers(compilerOptions, customTransformers, emitOnly) {
96329
96372
  return {
96330
- scriptTransformers: getScriptTransformers(compilerOptions, customTransformers, emitOnlyDtsFiles),
96373
+ scriptTransformers: getScriptTransformers(compilerOptions, customTransformers, emitOnly),
96331
96374
  declarationTransformers: getDeclarationTransformers(customTransformers)
96332
96375
  };
96333
96376
  }
96334
- function getScriptTransformers(compilerOptions, customTransformers, emitOnlyDtsFiles) {
96335
- if (emitOnlyDtsFiles)
96377
+ function getScriptTransformers(compilerOptions, customTransformers, emitOnly) {
96378
+ if (emitOnly)
96336
96379
  return emptyArray;
96337
96380
  const languageVersion = getEmitScriptTarget(compilerOptions);
96338
96381
  const moduleKind = getEmitModuleKind(compilerOptions);
@@ -96919,8 +96962,8 @@ ${lanes.join("\n")}
96919
96962
  }
96920
96963
  function getFirstProjectOutput(configFile, ignoreCase) {
96921
96964
  if (outFile(configFile.options)) {
96922
- const { jsFilePath } = getOutputPathsForBundle(configFile.options, false);
96923
- return Debug.checkDefined(jsFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`);
96965
+ const { jsFilePath, declarationFilePath } = getOutputPathsForBundle(configFile.options, false);
96966
+ return Debug.checkDefined(jsFilePath || declarationFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`);
96924
96967
  }
96925
96968
  const getCommonSourceDirectory2 = memoize(() => getCommonSourceDirectoryOfConfig(configFile, ignoreCase));
96926
96969
  for (const inputFileName of configFile.fileNames) {
@@ -96940,7 +96983,7 @@ ${lanes.join("\n")}
96940
96983
  return buildInfoPath;
96941
96984
  return Debug.fail(`project ${configFile.options.configFilePath} expected to have at least one output`);
96942
96985
  }
96943
- function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnlyDtsFiles, onlyBuildInfo, forceDtsEmit) {
96986
+ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnly, onlyBuildInfo, forceDtsEmit) {
96944
96987
  const compilerOptions = host.getCompilerOptions();
96945
96988
  const sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap || getAreDeclarationMapsEnabled(compilerOptions) ? [] : void 0;
96946
96989
  const emittedFilesList = compilerOptions.listEmittedFiles ? [] : void 0;
@@ -96986,7 +97029,7 @@ ${lanes.join("\n")}
96986
97029
  emitBuildInfo(bundleBuildInfo, buildInfoPath);
96987
97030
  (_f = tracing) == null ? void 0 : _f.pop();
96988
97031
  if (!emitSkipped && emittedFilesList) {
96989
- if (!emitOnlyDtsFiles) {
97032
+ if (!emitOnly) {
96990
97033
  if (jsFilePath) {
96991
97034
  emittedFilesList.push(jsFilePath);
96992
97035
  }
@@ -96997,11 +97040,13 @@ ${lanes.join("\n")}
96997
97040
  emittedFilesList.push(buildInfoPath);
96998
97041
  }
96999
97042
  }
97000
- if (declarationFilePath) {
97001
- emittedFilesList.push(declarationFilePath);
97002
- }
97003
- if (declarationMapPath) {
97004
- emittedFilesList.push(declarationMapPath);
97043
+ if (emitOnly !== 0 /* Js */) {
97044
+ if (declarationFilePath) {
97045
+ emittedFilesList.push(declarationFilePath);
97046
+ }
97047
+ if (declarationMapPath) {
97048
+ emittedFilesList.push(declarationMapPath);
97049
+ }
97005
97050
  }
97006
97051
  }
97007
97052
  function relativeToBuildInfo(path) {
@@ -97011,17 +97056,15 @@ ${lanes.join("\n")}
97011
97056
  function emitBuildInfo(bundle, buildInfoPath) {
97012
97057
  if (!buildInfoPath || targetSourceFile || emitSkipped)
97013
97058
  return;
97014
- const program = host.getProgramBuildInfo();
97015
97059
  if (host.isEmitBlocked(buildInfoPath)) {
97016
97060
  emitSkipped = true;
97017
97061
  return;
97018
97062
  }
97019
- const version2 = version;
97020
- const buildInfo = { bundle, program, version: version2 };
97063
+ const buildInfo = host.getBuildInfo(bundle) || createBuildInfo(void 0, bundle);
97021
97064
  writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, void 0, { buildInfo });
97022
97065
  }
97023
97066
  function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
97024
- if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
97067
+ if (!sourceFileOrBundle || emitOnly || !jsFilePath) {
97025
97068
  return;
97026
97069
  }
97027
97070
  if (host.isEmitBlocked(jsFilePath) || compilerOptions.noEmit) {
@@ -97055,17 +97098,17 @@ ${lanes.join("\n")}
97055
97098
  bundleBuildInfo.js = printer.bundleFileInfo;
97056
97099
  }
97057
97100
  function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) {
97058
- if (!sourceFileOrBundle)
97101
+ if (!sourceFileOrBundle || emitOnly === 0 /* Js */)
97059
97102
  return;
97060
97103
  if (!declarationFilePath) {
97061
- if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly)
97104
+ if (emitOnly || compilerOptions.emitDeclarationOnly)
97062
97105
  emitSkipped = true;
97063
97106
  return;
97064
97107
  }
97065
97108
  const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
97066
97109
  const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
97067
97110
  const inputListOrBundle = outFile(compilerOptions) ? [factory.createBundle(filesForEmit, !isSourceFile(sourceFileOrBundle) ? sourceFileOrBundle.prepends : void 0)] : filesForEmit;
97068
- if (emitOnlyDtsFiles && !getEmitDeclarations(compilerOptions)) {
97111
+ if (emitOnly && !getEmitDeclarations(compilerOptions)) {
97069
97112
  filesForEmit.forEach(collectLinkedAliases);
97070
97113
  }
97071
97114
  const declarationTransform = transformNodes(resolver, host, factory, compilerOptions, inputListOrBundle, declarationTransformers, false);
@@ -97235,6 +97278,10 @@ ${lanes.join("\n")}
97235
97278
  return encodeURI(sourceMapFile);
97236
97279
  }
97237
97280
  }
97281
+ function createBuildInfo(program, bundle) {
97282
+ const version2 = version;
97283
+ return { bundle, program, version: version2 };
97284
+ }
97238
97285
  function getBuildInfoText(buildInfo) {
97239
97286
  return JSON.stringify(buildInfo);
97240
97287
  }
@@ -97394,19 +97441,7 @@ ${lanes.join("\n")}
97394
97441
  return;
97395
97442
  break;
97396
97443
  case buildInfoPath:
97397
- const newBuildInfo = data.buildInfo;
97398
- newBuildInfo.program = buildInfo.program;
97399
- if (newBuildInfo.program && changedDtsText !== void 0 && config.options.composite) {
97400
- newBuildInfo.program.outSignature = computeSignature(changedDtsText, createHash, changedDtsData);
97401
- }
97402
- const { js, dts, sourceFiles } = buildInfo.bundle;
97403
- newBuildInfo.bundle.js.sources = js.sources;
97404
- if (dts) {
97405
- newBuildInfo.bundle.dts.sources = dts.sources;
97406
- }
97407
- newBuildInfo.bundle.sourceFiles = sourceFiles;
97408
- outputFiles.push({ name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark, buildInfo: newBuildInfo });
97409
- return;
97444
+ break;
97410
97445
  case declarationFilePath:
97411
97446
  if (declarationText === text)
97412
97447
  return;
@@ -97420,13 +97455,25 @@ ${lanes.join("\n")}
97420
97455
  default:
97421
97456
  Debug.fail(`Unexpected path: ${name}`);
97422
97457
  }
97423
- outputFiles.push({ name, text, writeByteOrderMark });
97458
+ outputFiles.push({ name, text, writeByteOrderMark, data });
97424
97459
  },
97425
97460
  isEmitBlocked: returnFalse,
97426
97461
  readFile: (f) => host.readFile(f),
97427
97462
  fileExists: (f) => host.fileExists(f),
97428
97463
  useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
97429
- getProgramBuildInfo: returnUndefined,
97464
+ getBuildInfo: (bundle) => {
97465
+ const program = buildInfo.program;
97466
+ if (program && changedDtsText !== void 0 && config.options.composite) {
97467
+ program.outSignature = computeSignature(changedDtsText, createHash, changedDtsData);
97468
+ }
97469
+ const { js, dts, sourceFiles } = buildInfo.bundle;
97470
+ bundle.js.sources = js.sources;
97471
+ if (dts) {
97472
+ bundle.dts.sources = dts.sources;
97473
+ }
97474
+ bundle.sourceFiles = sourceFiles;
97475
+ return createBuildInfo(program, bundle);
97476
+ },
97430
97477
  getSourceFileFromReference: returnUndefined,
97431
97478
  redirectTargetsMap: createMultiMap(),
97432
97479
  getFileIncludeReasons: notImplemented,
@@ -102390,7 +102437,7 @@ ${lanes.join("\n")}
102390
102437
  for (const name of names) {
102391
102438
  let result;
102392
102439
  const mode = getModeForFileReference(name, containingFileMode);
102393
- const strName = isString(name) ? name : name.fileName.toLowerCase();
102440
+ const strName = getResolutionName(name);
102394
102441
  const cacheKey = mode !== void 0 ? `${mode}|${strName}` : strName;
102395
102442
  if (cache.has(cacheKey)) {
102396
102443
  result = cache.get(cacheKey);
@@ -102466,17 +102513,18 @@ ${lanes.join("\n")}
102466
102513
  }
102467
102514
  return elem.value.text === "import" ? 99 /* ESNext */ : 1 /* CommonJS */;
102468
102515
  }
102469
- function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
102516
+ function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, resolutionInfo, loader) {
102470
102517
  if (names.length === 0) {
102471
102518
  return [];
102472
102519
  }
102473
102520
  const resolutions = [];
102474
102521
  const cache = new Map();
102475
102522
  let i = 0;
102476
- for (const name of names) {
102523
+ for (const entry of resolutionInfo ? resolutionInfo.names : names) {
102477
102524
  let result;
102478
- const mode = getModeForResolutionAtIndex(containingFile, i);
102525
+ const mode = !isString(entry) ? getModeForUsageLocation(containingFile, entry) : getModeForResolutionAtIndex(containingFile, i);
102479
102526
  i++;
102527
+ const name = isString(entry) ? entry : entry.text;
102480
102528
  const cacheKey = mode !== void 0 ? `${mode}|${name}` : name;
102481
102529
  if (cache.has(cacheKey)) {
102482
102530
  result = cache.get(cacheKey);
@@ -102773,23 +102821,34 @@ ${lanes.join("\n")}
102773
102821
  let actualResolveModuleNamesWorker;
102774
102822
  const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse;
102775
102823
  if (host.resolveModuleNames) {
102776
- actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, reusedNames, redirectedReference) => host.resolveModuleNames(Debug.checkEachDefined(moduleNames), containingFileName, reusedNames, redirectedReference, options, containingFile).map((resolved) => {
102777
- if (!resolved || resolved.extension !== void 0) {
102778
- return resolved;
102779
- }
102780
- const withExtension = clone(resolved);
102781
- withExtension.extension = extensionFromPath(resolved.resolvedFileName);
102782
- return withExtension;
102783
- });
102824
+ actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo) => {
102825
+ var _a3;
102826
+ return host.resolveModuleNames(
102827
+ moduleNames.map((literal) => literal.text),
102828
+ containingFileName,
102829
+ (_a3 = resolutionInfo == null ? void 0 : resolutionInfo.reusedNames) == null ? void 0 : _a3.map((literal) => literal.text),
102830
+ redirectedReference,
102831
+ options,
102832
+ containingFile,
102833
+ resolutionInfo
102834
+ ).map((resolved) => {
102835
+ if (!resolved || resolved.extension !== void 0) {
102836
+ return resolved;
102837
+ }
102838
+ const withExtension = clone(resolved);
102839
+ withExtension.extension = extensionFromPath(resolved.resolvedFileName);
102840
+ return withExtension;
102841
+ });
102842
+ };
102784
102843
  moduleResolutionCache = (_b = host.getModuleResolutionCache) == null ? void 0 : _b.call(host);
102785
102844
  } else {
102786
102845
  moduleResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName, options);
102787
102846
  const loader = (moduleName, resolverMode, containingFileName, redirectedReference) => resolveModuleName(moduleName, containingFileName, options, host, moduleResolutionCache, redirectedReference, resolverMode).resolvedModule;
102788
- actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, _reusedNames, redirectedReference) => loadWithModeAwareCache(Debug.checkEachDefined(moduleNames), containingFile, containingFileName, redirectedReference, loader);
102847
+ actualResolveModuleNamesWorker = (moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo) => loadWithModeAwareCache(moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo, loader);
102789
102848
  }
102790
102849
  let actualResolveTypeReferenceDirectiveNamesWorker;
102791
102850
  if (host.resolveTypeReferenceDirectives) {
102792
- actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, containingFileMode) => host.resolveTypeReferenceDirectives(Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options, containingFileMode);
102851
+ actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, containingFileMode, resolutionInfo) => host.resolveTypeReferenceDirectives(Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options, containingFileMode, resolutionInfo);
102793
102852
  } else {
102794
102853
  typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, void 0, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache());
102795
102854
  const loader = (typesRef, containingFile, redirectedReference, resolutionMode) => resolveTypeReferenceDirective(
@@ -102873,7 +102932,7 @@ ${lanes.join("\n")}
102873
102932
  (_j = tracing) == null ? void 0 : _j.push(tracing.Phase.Program, "processTypeReferences", { count: typeReferences.length });
102874
102933
  const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : host.getCurrentDirectory();
102875
102934
  const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile);
102876
- const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename);
102935
+ const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeReferences, containingFilename);
102877
102936
  for (let i = 0; i < typeReferences.length; i++) {
102878
102937
  processTypeReferenceDirective(typeReferences[i], void 0, resolutions[i], { kind: 8 /* AutomaticTypeDirectiveFile */, typeReference: typeReferences[i], packageId: (_k = resolutions[i]) == null ? void 0 : _k.packageId });
102879
102938
  }
@@ -103014,21 +103073,18 @@ ${lanes.join("\n")}
103014
103073
  if (!moduleResolutionCache)
103015
103074
  return;
103016
103075
  const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
103017
- const containingFileMode = !isString(containingFile) ? containingFile.impliedNodeFormat : void 0;
103018
103076
  const containingDir = getDirectoryPath(containingFileName);
103019
103077
  const redirectedReference = getRedirectReferenceForResolution(containingFile);
103020
- let i = 0;
103021
103078
  for (const n of names) {
103022
- const mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode);
103023
- const name = typeof n === "string" ? n : n.fileName;
103024
- i++;
103079
+ const mode = getResolutionMode(n, containingFile);
103080
+ const name = getResolutionName(n);
103025
103081
  if (isExternalModuleNameRelative(name))
103026
103082
  continue;
103027
103083
  const diags = (_a3 = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)) == null ? void 0 : _a3.resolutionDiagnostics;
103028
103084
  addResolutionDiagnostics(diags);
103029
103085
  }
103030
103086
  }
103031
- function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {
103087
+ function resolveModuleNamesWorker(moduleNames, containingFile, resolutionInfo) {
103032
103088
  var _a3, _b2;
103033
103089
  if (!moduleNames.length)
103034
103090
  return emptyArray;
@@ -103036,14 +103092,14 @@ ${lanes.join("\n")}
103036
103092
  const redirectedReference = getRedirectReferenceForResolution(containingFile);
103037
103093
  (_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "resolveModuleNamesWorker", { containingFileName });
103038
103094
  mark("beforeResolveModule");
103039
- const result = actualResolveModuleNamesWorker(moduleNames, containingFile, containingFileName, reusedNames, redirectedReference);
103095
+ const result = actualResolveModuleNamesWorker(moduleNames, containingFile, containingFileName, redirectedReference, resolutionInfo);
103040
103096
  mark("afterResolveModule");
103041
103097
  measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
103042
103098
  (_b2 = tracing) == null ? void 0 : _b2.pop();
103043
103099
  pullDiagnosticsFromCache(moduleNames, containingFile);
103044
103100
  return result;
103045
103101
  }
103046
- function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile) {
103102
+ function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, resolutionInfo) {
103047
103103
  var _a3, _b2;
103048
103104
  if (!typeDirectiveNames.length)
103049
103105
  return [];
@@ -103052,7 +103108,7 @@ ${lanes.join("\n")}
103052
103108
  const containingFileMode = !isString(containingFile) ? containingFile.impliedNodeFormat : void 0;
103053
103109
  (_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName });
103054
103110
  mark("beforeResolveTypeReference");
103055
- const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference, containingFileMode);
103111
+ const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference, containingFileMode, resolutionInfo);
103056
103112
  mark("afterResolveTypeReference");
103057
103113
  measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference");
103058
103114
  (_b2 = tracing) == null ? void 0 : _b2.pop();
@@ -103135,10 +103191,8 @@ ${lanes.join("\n")}
103135
103191
  const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName);
103136
103192
  if (oldSourceFile !== file && file.resolvedModules) {
103137
103193
  const result2 = [];
103138
- let i = 0;
103139
103194
  for (const moduleName of moduleNames) {
103140
- const resolvedModule = file.resolvedModules.get(moduleName, getModeForResolutionAtIndex(file, i));
103141
- i++;
103195
+ const resolvedModule = file.resolvedModules.get(moduleName.text, getModeForUsageLocation(file, moduleName));
103142
103196
  result2.push(resolvedModule);
103143
103197
  }
103144
103198
  return result2;
@@ -103150,39 +103204,40 @@ ${lanes.join("\n")}
103150
103204
  for (let i = 0; i < moduleNames.length; i++) {
103151
103205
  const moduleName = moduleNames[i];
103152
103206
  if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) {
103153
- const oldResolvedModule = getResolvedModule(oldSourceFile, moduleName, getModeForResolutionAtIndex(oldSourceFile, i));
103207
+ const mode = getModeForUsageLocation(file, moduleName);
103208
+ const oldResolvedModule = getResolvedModule(oldSourceFile, moduleName.text, mode);
103154
103209
  if (oldResolvedModule) {
103155
103210
  if (isTraceEnabled(options, host)) {
103156
103211
  trace(
103157
103212
  host,
103158
103213
  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,
103159
- moduleName,
103214
+ moduleName.text,
103160
103215
  getNormalizedAbsolutePath(file.originalFileName, currentDirectory),
103161
103216
  oldResolvedModule.resolvedFileName,
103162
103217
  oldResolvedModule.packageId && packageIdToString(oldResolvedModule.packageId)
103163
103218
  );
103164
103219
  }
103165
- (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
103166
- (reusedNames || (reusedNames = [])).push(moduleName);
103220
+ (result != null ? result : result = new Array(moduleNames.length))[i] = oldResolvedModule;
103221
+ (reusedNames != null ? reusedNames : reusedNames = []).push(moduleName);
103167
103222
  continue;
103168
103223
  }
103169
103224
  }
103170
103225
  let resolvesToAmbientModuleInNonModifiedFile = false;
103171
- if (contains(file.ambientModuleNames, moduleName)) {
103226
+ if (contains(file.ambientModuleNames, moduleName.text)) {
103172
103227
  resolvesToAmbientModuleInNonModifiedFile = true;
103173
103228
  if (isTraceEnabled(options, host)) {
103174
- trace(host, Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName, getNormalizedAbsolutePath(file.originalFileName, currentDirectory));
103229
+ trace(host, Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName.text, getNormalizedAbsolutePath(file.originalFileName, currentDirectory));
103175
103230
  }
103176
103231
  } else {
103177
- resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, i);
103232
+ resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName);
103178
103233
  }
103179
103234
  if (resolvesToAmbientModuleInNonModifiedFile) {
103180
103235
  (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
103181
103236
  } else {
103182
- (unknownModuleNames || (unknownModuleNames = [])).push(moduleName);
103237
+ (unknownModuleNames != null ? unknownModuleNames : unknownModuleNames = []).push(moduleName);
103183
103238
  }
103184
103239
  }
103185
- const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file, reusedNames) : emptyArray;
103240
+ const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file, { names: unknownModuleNames, reusedNames }) : emptyArray;
103186
103241
  if (!result) {
103187
103242
  Debug.assert(resolutions.length === moduleNames.length);
103188
103243
  return resolutions;
@@ -103200,24 +103255,87 @@ ${lanes.join("\n")}
103200
103255
  }
103201
103256
  Debug.assert(j === resolutions.length);
103202
103257
  return result;
103203
- function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, index) {
103204
- if (index >= length(oldSourceFile == null ? void 0 : oldSourceFile.imports) + length(oldSourceFile == null ? void 0 : oldSourceFile.moduleAugmentations))
103205
- return false;
103206
- const resolutionToFile = getResolvedModule(oldSourceFile, moduleName, oldSourceFile && getModeForResolutionAtIndex(oldSourceFile, index));
103258
+ function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) {
103259
+ const resolutionToFile = getResolvedModule(oldSourceFile, moduleName.text, getModeForUsageLocation(file, moduleName));
103207
103260
  const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName);
103208
103261
  if (resolutionToFile && resolvedFile) {
103209
103262
  return false;
103210
103263
  }
103211
- const unmodifiedFile = ambientModuleNameToUnmodifiedFileName.get(moduleName);
103264
+ const unmodifiedFile = ambientModuleNameToUnmodifiedFileName.get(moduleName.text);
103212
103265
  if (!unmodifiedFile) {
103213
103266
  return false;
103214
103267
  }
103215
103268
  if (isTraceEnabled(options, host)) {
103216
- trace(host, Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified, moduleName, unmodifiedFile);
103269
+ trace(host, Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified, moduleName.text, unmodifiedFile);
103217
103270
  }
103218
103271
  return true;
103219
103272
  }
103220
103273
  }
103274
+ function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) {
103275
+ if (structureIsReused === 0 /* Not */) {
103276
+ return resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, void 0);
103277
+ }
103278
+ const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0;
103279
+ if (!isString(containingFile)) {
103280
+ if (oldSourceFile !== containingFile && containingFile.resolvedTypeReferenceDirectiveNames) {
103281
+ const result2 = [];
103282
+ for (const typeDirectiveName of typeDirectiveNames) {
103283
+ const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(getResolutionName(typeDirectiveName), typeDirectiveName.resolutionMode || containingFile.impliedNodeFormat);
103284
+ result2.push(resolvedTypeReferenceDirective);
103285
+ }
103286
+ return result2;
103287
+ }
103288
+ }
103289
+ let unknownTypeReferenceDirectiveNames;
103290
+ let result;
103291
+ let reusedNames;
103292
+ const containingSourceFile = !isString(containingFile) ? containingFile : void 0;
103293
+ const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile));
103294
+ for (let i = 0; i < typeDirectiveNames.length; i++) {
103295
+ const entry = typeDirectiveNames[i];
103296
+ if (canReuseResolutions) {
103297
+ const typeDirectiveName = getResolutionName(entry);
103298
+ const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat);
103299
+ const oldResolvedTypeReferenceDirective = getResolvedTypeReferenceDirective(oldSourceFile, typeDirectiveName, mode);
103300
+ if (oldResolvedTypeReferenceDirective) {
103301
+ if (isTraceEnabled(options, host)) {
103302
+ trace(
103303
+ host,
103304
+ 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,
103305
+ typeDirectiveName,
103306
+ !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile,
103307
+ oldResolvedTypeReferenceDirective.resolvedFileName,
103308
+ oldResolvedTypeReferenceDirective.packageId && packageIdToString(oldResolvedTypeReferenceDirective.packageId)
103309
+ );
103310
+ }
103311
+ (result != null ? result : result = new Array(typeDirectiveNames.length))[i] = oldResolvedTypeReferenceDirective;
103312
+ (reusedNames != null ? reusedNames : reusedNames = []).push(entry);
103313
+ continue;
103314
+ }
103315
+ }
103316
+ (unknownTypeReferenceDirectiveNames != null ? unknownTypeReferenceDirectiveNames : unknownTypeReferenceDirectiveNames = []).push(entry);
103317
+ }
103318
+ if (!unknownTypeReferenceDirectiveNames)
103319
+ return result || emptyArray;
103320
+ const resolutions = resolveTypeReferenceDirectiveNamesWorker(
103321
+ unknownTypeReferenceDirectiveNames,
103322
+ containingFile,
103323
+ { names: unknownTypeReferenceDirectiveNames, reusedNames }
103324
+ );
103325
+ if (!result) {
103326
+ Debug.assert(resolutions.length === typeDirectiveNames.length);
103327
+ return resolutions;
103328
+ }
103329
+ let j = 0;
103330
+ for (let i = 0; i < result.length; i++) {
103331
+ if (!result[i]) {
103332
+ result[i] = resolutions[j];
103333
+ j++;
103334
+ }
103335
+ }
103336
+ Debug.assert(j === resolutions.length);
103337
+ return result;
103338
+ }
103221
103339
  function canReuseProjectReferences() {
103222
103340
  return !forEachProjectReference(
103223
103341
  oldProgram.getProjectReferences(),
@@ -103348,7 +103466,7 @@ ${lanes.join("\n")}
103348
103466
  for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) {
103349
103467
  const moduleNames = getModuleNames(newSourceFile);
103350
103468
  const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);
103351
- const resolutionsChanged = hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, oldSourceFile, moduleResolutionIsEqualTo);
103469
+ const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo);
103352
103470
  if (resolutionsChanged) {
103353
103471
  structureIsReused = 1 /* SafeModules */;
103354
103472
  newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions);
@@ -103356,8 +103474,8 @@ ${lanes.join("\n")}
103356
103474
  newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
103357
103475
  }
103358
103476
  const typesReferenceDirectives = newSourceFile.typeReferenceDirectives;
103359
- const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFile);
103360
- const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, oldSourceFile, typeDirectiveIsEqualTo);
103477
+ const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile);
103478
+ const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo);
103361
103479
  if (typeReferenceResolutionsChanged) {
103362
103480
  structureIsReused = 1 /* SafeModules */;
103363
103481
  newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions);
@@ -103428,7 +103546,10 @@ ${lanes.join("\n")}
103428
103546
  return host.fileExists(f);
103429
103547
  },
103430
103548
  useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
103431
- getProgramBuildInfo: () => program.getProgramBuildInfo && program.getProgramBuildInfo(),
103549
+ getBuildInfo: (bundle) => {
103550
+ var _a3;
103551
+ return (_a3 = program.getBuildInfo) == null ? void 0 : _a3.call(program, bundle);
103552
+ },
103432
103553
  getSourceFileFromReference: (file, ref) => program.getSourceFileFromReference(file, ref),
103433
103554
  redirectTargetsMap,
103434
103555
  getFileIncludeReasons: program.getFileIncludeReasons,
@@ -103500,17 +103621,17 @@ ${lanes.join("\n")}
103500
103621
  function getTypeChecker() {
103501
103622
  return typeChecker || (typeChecker = createTypeChecker(program));
103502
103623
  }
103503
- function emit(sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers, forceDtsEmit) {
103624
+ function emit(sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit) {
103504
103625
  var _a3, _b2;
103505
103626
  (_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Emit, "emit", { path: sourceFile == null ? void 0 : sourceFile.path }, true);
103506
- const result = runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers, forceDtsEmit));
103627
+ const result = runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit));
103507
103628
  (_b2 = tracing) == null ? void 0 : _b2.pop();
103508
103629
  return result;
103509
103630
  }
103510
103631
  function isEmitBlocked(emitFileName) {
103511
103632
  return hasEmitBlockingDiagnostics.has(toPath3(emitFileName));
103512
103633
  }
103513
- function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit) {
103634
+ function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnly, customTransformers, forceDtsEmit) {
103514
103635
  if (!forceDtsEmit) {
103515
103636
  const result = handleNoEmitOptions(program2, sourceFile, writeFileCallback, cancellationToken);
103516
103637
  if (result)
@@ -103522,8 +103643,8 @@ ${lanes.join("\n")}
103522
103643
  emitResolver,
103523
103644
  getEmitHost(writeFileCallback),
103524
103645
  sourceFile,
103525
- getTransformers(options, customTransformers, emitOnlyDtsFiles),
103526
- emitOnlyDtsFiles,
103646
+ getTransformers(options, customTransformers, emitOnly),
103647
+ emitOnly,
103527
103648
  false,
103528
103649
  forceDtsEmit
103529
103650
  );
@@ -104337,12 +104458,12 @@ ${lanes.join("\n")}
104337
104458
  if (!typeDirectives) {
104338
104459
  return;
104339
104460
  }
104340
- const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeDirectives, file);
104461
+ const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file);
104341
104462
  for (let index = 0; index < typeDirectives.length; index++) {
104342
104463
  const ref = file.typeReferenceDirectives[index];
104343
104464
  const resolvedTypeReferenceDirective = resolutions[index];
104344
104465
  const fileName = toFileNameLowerCase(ref.fileName);
104345
- setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
104466
+ setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective, getModeForFileReference(ref, file.impliedNodeFormat));
104346
104467
  const mode = ref.resolutionMode || file.impliedNodeFormat;
104347
104468
  if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) {
104348
104469
  programDiagnostics.add(createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
@@ -104442,7 +104563,7 @@ ${lanes.join("\n")}
104442
104563
  const optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a3 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a3.commandLine.options : void 0) || options;
104443
104564
  for (let index = 0; index < moduleNames.length; index++) {
104444
104565
  const resolution = resolutions[index];
104445
- setResolvedModule(file, moduleNames[index], resolution, getModeForResolutionAtIndex(file, index));
104566
+ setResolvedModule(file, moduleNames[index].text, resolution, getModeForUsageLocation(file, moduleNames[index]));
104446
104567
  if (!resolution) {
104447
104568
  continue;
104448
104569
  }
@@ -105307,10 +105428,10 @@ ${lanes.join("\n")}
105307
105428
  }
105308
105429
  }
105309
105430
  function getModuleNames({ imports, moduleAugmentations }) {
105310
- const res = imports.map((i) => i.text);
105431
+ const res = imports.map((i) => i);
105311
105432
  for (const aug of moduleAugmentations) {
105312
105433
  if (aug.kind === 10 /* StringLiteral */) {
105313
- res.push(aug.text);
105434
+ res.push(aug);
105314
105435
  }
105315
105436
  }
105316
105437
  return res;
@@ -105475,7 +105596,8 @@ ${lanes.join("\n")}
105475
105596
  var _a2, _b, _c;
105476
105597
  const fileInfos = new Map();
105477
105598
  const options = newProgram.getCompilerOptions();
105478
- const referencedMap = options.module !== 0 /* None */ && !outFile(options) ? createManyToManyPathMap() : void 0;
105599
+ const isOutFile = outFile(options);
105600
+ const referencedMap = options.module !== 0 /* None */ && !isOutFile ? createManyToManyPathMap() : void 0;
105479
105601
  const exportedModulesMap = referencedMap ? createManyToManyPathMap() : void 0;
105480
105602
  const useOldState = canReuseOldState(referencedMap, oldState);
105481
105603
  newProgram.getTypeChecker();
@@ -105499,7 +105621,7 @@ ${lanes.join("\n")}
105499
105621
  fileInfos.set(sourceFile.resolvedPath, {
105500
105622
  version: version2,
105501
105623
  signature,
105502
- affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || void 0,
105624
+ affectsGlobalScope: !isOutFile ? isFileAffectingGlobalScope(sourceFile) || void 0 : void 0,
105503
105625
  impliedFormat: sourceFile.impliedNodeFormat
105504
105626
  });
105505
105627
  }
@@ -105729,10 +105851,46 @@ ${lanes.join("\n")}
105729
105851
 
105730
105852
  // src/compiler/builder.ts
105731
105853
  var BuilderFileEmit = /* @__PURE__ */ ((BuilderFileEmit2) => {
105732
- BuilderFileEmit2[BuilderFileEmit2["DtsOnly"] = 0] = "DtsOnly";
105733
- BuilderFileEmit2[BuilderFileEmit2["Full"] = 1] = "Full";
105854
+ BuilderFileEmit2[BuilderFileEmit2["None"] = 0] = "None";
105855
+ BuilderFileEmit2[BuilderFileEmit2["Js"] = 1] = "Js";
105856
+ BuilderFileEmit2[BuilderFileEmit2["JsMap"] = 2] = "JsMap";
105857
+ BuilderFileEmit2[BuilderFileEmit2["JsInlineMap"] = 4] = "JsInlineMap";
105858
+ BuilderFileEmit2[BuilderFileEmit2["Dts"] = 8] = "Dts";
105859
+ BuilderFileEmit2[BuilderFileEmit2["DtsMap"] = 16] = "DtsMap";
105860
+ BuilderFileEmit2[BuilderFileEmit2["AllJs"] = 7] = "AllJs";
105861
+ BuilderFileEmit2[BuilderFileEmit2["AllDts"] = 24] = "AllDts";
105862
+ BuilderFileEmit2[BuilderFileEmit2["All"] = 31] = "All";
105734
105863
  return BuilderFileEmit2;
105735
105864
  })(BuilderFileEmit || {});
105865
+ function getBuilderFileEmit(options) {
105866
+ let result = 1 /* Js */;
105867
+ if (options.sourceMap)
105868
+ result = result | 2 /* JsMap */;
105869
+ if (options.inlineSourceMap)
105870
+ result = result | 4 /* JsInlineMap */;
105871
+ if (getEmitDeclarations(options))
105872
+ result = result | 8 /* Dts */;
105873
+ if (options.declarationMap)
105874
+ result = result | 16 /* DtsMap */;
105875
+ if (options.emitDeclarationOnly)
105876
+ result = result & 24 /* AllDts */;
105877
+ return result;
105878
+ }
105879
+ function getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) {
105880
+ const oldEmitKind = oldOptionsOrEmitKind && (isNumber(oldOptionsOrEmitKind) ? oldOptionsOrEmitKind : getBuilderFileEmit(oldOptionsOrEmitKind));
105881
+ const emitKind = isNumber(optionsOrEmitKind) ? optionsOrEmitKind : getBuilderFileEmit(optionsOrEmitKind);
105882
+ if (oldEmitKind === emitKind)
105883
+ return 0 /* None */;
105884
+ if (!oldEmitKind || !emitKind)
105885
+ return emitKind;
105886
+ const diff = oldEmitKind ^ emitKind;
105887
+ let result = 0 /* None */;
105888
+ if (diff & 7 /* AllJs */)
105889
+ result = emitKind & 7 /* AllJs */;
105890
+ if (diff & 24 /* AllDts */)
105891
+ result = result | emitKind & 24 /* AllDts */;
105892
+ return result;
105893
+ }
105736
105894
  function hasSameKeys(map1, map2) {
105737
105895
  return map1 === map2 || map1 !== void 0 && map2 !== void 0 && map1.size === map2.size && !forEachKey(map1, (key) => !map2.has(key));
105738
105896
  }
@@ -105746,7 +105904,7 @@ ${lanes.join("\n")}
105746
105904
  if (!outFilePath) {
105747
105905
  state.semanticDiagnosticsPerFile = new Map();
105748
105906
  } else if (compilerOptions.composite && (oldState == null ? void 0 : oldState.outSignature) && outFilePath === outFile(oldState == null ? void 0 : oldState.compilerOptions)) {
105749
- state.outSignature = oldState == null ? void 0 : oldState.outSignature;
105907
+ state.outSignature = oldState.outSignature && getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldState.outSignature);
105750
105908
  }
105751
105909
  state.changedFilesSet = new Set();
105752
105910
  state.latestChangedDtsFile = compilerOptions.composite ? oldState == null ? void 0 : oldState.latestChangedDtsFile : void 0;
@@ -105756,22 +105914,24 @@ ${lanes.join("\n")}
105756
105914
  const canCopyEmitSignatures = compilerOptions.composite && (oldState == null ? void 0 : oldState.emitSignatures) && !outFilePath && !compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
105757
105915
  if (useOldState) {
105758
105916
  (_a2 = oldState.changedFilesSet) == null ? void 0 : _a2.forEach((value) => state.changedFilesSet.add(value));
105759
- if (!outFilePath && oldState.affectedFilesPendingEmit) {
105760
- state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
105761
- state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new Map(oldState.affectedFilesPendingEmitKind);
105762
- state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
105917
+ if (!outFilePath && ((_b = oldState.affectedFilesPendingEmit) == null ? void 0 : _b.size)) {
105918
+ state.affectedFilesPendingEmit = new Map(oldState.affectedFilesPendingEmit);
105763
105919
  state.seenAffectedFiles = new Set();
105764
105920
  }
105921
+ state.programEmitPending = oldState.programEmitPending;
105922
+ } else {
105923
+ state.buildInfoEmitPending = true;
105765
105924
  }
105766
105925
  const referencedMap = state.referencedMap;
105767
105926
  const oldReferencedMap = useOldState ? oldState.referencedMap : void 0;
105768
105927
  const copyDeclarationFileDiagnostics = canCopySemanticDiagnostics && !compilerOptions.skipLibCheck === !oldCompilerOptions.skipLibCheck;
105769
105928
  const copyLibFileDiagnostics = copyDeclarationFileDiagnostics && !compilerOptions.skipDefaultLibCheck === !oldCompilerOptions.skipDefaultLibCheck;
105770
105929
  state.fileInfos.forEach((info, sourceFilePath) => {
105930
+ var _a3;
105771
105931
  let oldInfo;
105772
105932
  let newReferences;
105773
105933
  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))) {
105774
- state.changedFilesSet.add(sourceFilePath);
105934
+ addFileToChangeSet(state, sourceFilePath);
105775
105935
  } else if (canCopySemanticDiagnostics) {
105776
105936
  const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
105777
105937
  if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics)
@@ -105789,20 +105949,50 @@ ${lanes.join("\n")}
105789
105949
  }
105790
105950
  if (canCopyEmitSignatures) {
105791
105951
  const oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
105792
- if (oldEmitSignature)
105793
- (state.emitSignatures || (state.emitSignatures = new Map())).set(sourceFilePath, oldEmitSignature);
105952
+ if (oldEmitSignature) {
105953
+ ((_a3 = state.emitSignatures) != null ? _a3 : state.emitSignatures = new Map()).set(sourceFilePath, getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldEmitSignature));
105954
+ }
105794
105955
  }
105795
105956
  });
105796
- if (useOldState && forEachEntry(oldState.fileInfos, (info, sourceFilePath) => info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath))) {
105797
- BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, void 0).forEach((file) => state.changedFilesSet.add(file.resolvedPath));
105798
- } else if (oldCompilerOptions && !outFilePath && compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
105799
- newProgram.getSourceFiles().forEach((f) => addToAffectedFilesPendingEmit(state, f.resolvedPath, 1 /* Full */));
105800
- Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
105801
- state.seenAffectedFiles = state.seenAffectedFiles || new Set();
105802
- }
105803
- state.buildInfoEmitPending = !useOldState || state.changedFilesSet.size !== (((_b = oldState.changedFilesSet) == null ? void 0 : _b.size) || 0);
105957
+ if (useOldState && forEachEntry(oldState.fileInfos, (info, sourceFilePath) => (outFilePath || info.affectsGlobalScope) && !state.fileInfos.has(sourceFilePath))) {
105958
+ BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, void 0).forEach((file) => addFileToChangeSet(state, file.resolvedPath));
105959
+ } else if (oldCompilerOptions) {
105960
+ const pendingEmitKind = compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions) ? getBuilderFileEmit(compilerOptions) : getPendingEmitKind(compilerOptions, oldCompilerOptions);
105961
+ if (pendingEmitKind !== 0 /* None */) {
105962
+ if (!outFilePath) {
105963
+ newProgram.getSourceFiles().forEach((f) => {
105964
+ if (!state.changedFilesSet.has(f.resolvedPath)) {
105965
+ addToAffectedFilesPendingEmit(
105966
+ state,
105967
+ f.resolvedPath,
105968
+ pendingEmitKind
105969
+ );
105970
+ }
105971
+ });
105972
+ Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
105973
+ state.seenAffectedFiles = state.seenAffectedFiles || new Set();
105974
+ state.buildInfoEmitPending = true;
105975
+ } else {
105976
+ state.programEmitPending = state.programEmitPending ? state.programEmitPending | pendingEmitKind : pendingEmitKind;
105977
+ }
105978
+ }
105979
+ }
105980
+ if (outFilePath && !state.changedFilesSet.size) {
105981
+ if (useOldState)
105982
+ state.bundle = oldState.bundle;
105983
+ if (some(newProgram.getProjectReferences(), (ref) => !!ref.prepend))
105984
+ state.programEmitPending = getBuilderFileEmit(compilerOptions);
105985
+ }
105804
105986
  return state;
105805
105987
  }
105988
+ function addFileToChangeSet(state, path) {
105989
+ state.changedFilesSet.add(path);
105990
+ state.buildInfoEmitPending = true;
105991
+ state.programEmitPending = void 0;
105992
+ }
105993
+ function getEmitSignatureFromOldSignature(options, oldOptions, oldEmitSignature) {
105994
+ return !!options.declarationMap === !!oldOptions.declarationMap ? oldEmitSignature : isString(oldEmitSignature) ? [oldEmitSignature] : oldEmitSignature[0];
105995
+ }
105806
105996
  function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
105807
105997
  if (!diagnostics.length)
105808
105998
  return emptyArray;
@@ -105836,11 +106026,9 @@ ${lanes.join("\n")}
105836
106026
  const outFilePath = outFile(state.compilerOptions);
105837
106027
  Debug.assert(!state.changedFilesSet.size || outFilePath);
105838
106028
  return {
105839
- affectedFilesPendingEmit: state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice(),
105840
- affectedFilesPendingEmitKind: state.affectedFilesPendingEmitKind && new Map(state.affectedFilesPendingEmitKind),
105841
- affectedFilesPendingEmitIndex: state.affectedFilesPendingEmitIndex,
106029
+ affectedFilesPendingEmit: state.affectedFilesPendingEmit && new Map(state.affectedFilesPendingEmit),
105842
106030
  seenEmittedFiles: state.seenEmittedFiles && new Map(state.seenEmittedFiles),
105843
- programEmitComplete: state.programEmitComplete,
106031
+ programEmitPending: state.programEmitPending,
105844
106032
  emitSignatures: state.emitSignatures && new Map(state.emitSignatures),
105845
106033
  outSignature: state.outSignature,
105846
106034
  latestChangedDtsFile: state.latestChangedDtsFile,
@@ -105850,10 +106038,8 @@ ${lanes.join("\n")}
105850
106038
  }
105851
106039
  function restoreBuilderProgramEmitState(state, savedEmitState) {
105852
106040
  state.affectedFilesPendingEmit = savedEmitState.affectedFilesPendingEmit;
105853
- state.affectedFilesPendingEmitKind = savedEmitState.affectedFilesPendingEmitKind;
105854
- state.affectedFilesPendingEmitIndex = savedEmitState.affectedFilesPendingEmitIndex;
105855
106041
  state.seenEmittedFiles = savedEmitState.seenEmittedFiles;
105856
- state.programEmitComplete = savedEmitState.programEmitComplete;
106042
+ state.programEmitPending = savedEmitState.programEmitPending;
105857
106043
  state.emitSignatures = savedEmitState.emitSignatures;
105858
106044
  state.outSignature = savedEmitState.outSignature;
105859
106045
  state.latestChangedDtsFile = savedEmitState.latestChangedDtsFile;
@@ -105875,6 +106061,7 @@ ${lanes.join("\n")}
105875
106061
  const affectedFile = affectedFiles[affectedFilesIndex];
105876
106062
  if (!seenAffectedFiles.has(affectedFile.resolvedPath)) {
105877
106063
  state.affectedFilesIndex = affectedFilesIndex;
106064
+ addToAffectedFilesPendingEmit(state, affectedFile.resolvedPath, getBuilderFileEmit(state.compilerOptions));
105878
106065
  handleDtsMayChangeOfAffectedFile(
105879
106066
  state,
105880
106067
  affectedFile,
@@ -105917,29 +106104,38 @@ ${lanes.join("\n")}
105917
106104
  state.seenAffectedFiles = new Set();
105918
106105
  }
105919
106106
  }
105920
- function clearAffectedFilesPendingEmit(state) {
105921
- state.affectedFilesPendingEmit = void 0;
105922
- state.affectedFilesPendingEmitKind = void 0;
105923
- state.affectedFilesPendingEmitIndex = void 0;
106107
+ function clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles) {
106108
+ var _a2;
106109
+ if (!((_a2 = state.affectedFilesPendingEmit) == null ? void 0 : _a2.size))
106110
+ return;
106111
+ if (!emitOnlyDtsFiles)
106112
+ return state.affectedFilesPendingEmit = void 0;
106113
+ state.affectedFilesPendingEmit.forEach((emitKind, path) => {
106114
+ const pending = emitKind & 7 /* AllJs */;
106115
+ if (!pending)
106116
+ state.affectedFilesPendingEmit.delete(path);
106117
+ else
106118
+ state.affectedFilesPendingEmit.set(path, pending);
106119
+ });
105924
106120
  }
105925
- function getNextAffectedFilePendingEmit(state) {
105926
- const { affectedFilesPendingEmit } = state;
105927
- if (affectedFilesPendingEmit) {
105928
- const seenEmittedFiles = state.seenEmittedFiles || (state.seenEmittedFiles = new Map());
105929
- for (let i = state.affectedFilesPendingEmitIndex; i < affectedFilesPendingEmit.length; i++) {
105930
- const affectedFile = Debug.checkDefined(state.program).getSourceFileByPath(affectedFilesPendingEmit[i]);
105931
- if (affectedFile && sourceFileMayBeEmitted(affectedFile, state.program)) {
105932
- const seenKind = seenEmittedFiles.get(affectedFile.resolvedPath);
105933
- const emitKind = Debug.checkDefined(Debug.checkDefined(state.affectedFilesPendingEmitKind).get(affectedFile.resolvedPath));
105934
- if (seenKind === void 0 || seenKind < emitKind) {
105935
- state.affectedFilesPendingEmitIndex = i;
105936
- return { affectedFile, emitKind };
105937
- }
105938
- }
106121
+ function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) {
106122
+ var _a2;
106123
+ if (!((_a2 = state.affectedFilesPendingEmit) == null ? void 0 : _a2.size))
106124
+ return void 0;
106125
+ return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path) => {
106126
+ var _a3;
106127
+ const affectedFile = state.program.getSourceFileByPath(path);
106128
+ if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
106129
+ state.affectedFilesPendingEmit.delete(path);
106130
+ return void 0;
105939
106131
  }
105940
- clearAffectedFilesPendingEmit(state);
105941
- }
105942
- return void 0;
106132
+ const seenKind = (_a3 = state.seenEmittedFiles) == null ? void 0 : _a3.get(affectedFile.resolvedPath);
106133
+ let pendingKind = getPendingEmitKind(emitKind, seenKind);
106134
+ if (emitOnlyDtsFiles)
106135
+ pendingKind = pendingKind & 24 /* AllDts */;
106136
+ if (pendingKind)
106137
+ return { affectedFile, emitKind: pendingKind };
106138
+ });
105943
106139
  }
105944
106140
  function removeDiagnosticsOfLibraryFiles(state) {
105945
106141
  if (!state.cleanedDiagnosticsOfLibFiles) {
@@ -105993,7 +106189,7 @@ ${lanes.join("\n")}
105993
106189
  !host.disableUseFileVersionAsSignature
105994
106190
  );
105995
106191
  if (getEmitDeclarations(state.compilerOptions)) {
105996
- addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */);
106192
+ addToAffectedFilesPendingEmit(state, path, state.compilerOptions.declarationMap ? 24 /* AllDts */ : 8 /* Dts */);
105997
106193
  }
105998
106194
  }
105999
106195
  }
@@ -106099,33 +106295,6 @@ ${lanes.join("\n")}
106099
106295
  );
106100
106296
  return void 0;
106101
106297
  }
106102
- function doneWithAffectedFile(state, affected, emitKind, isPendingEmit, isBuildInfoEmit) {
106103
- if (isBuildInfoEmit) {
106104
- state.buildInfoEmitPending = false;
106105
- } else if (affected === state.program) {
106106
- state.changedFilesSet.clear();
106107
- state.programEmitComplete = true;
106108
- } else {
106109
- state.seenAffectedFiles.add(affected.resolvedPath);
106110
- state.buildInfoEmitPending = true;
106111
- if (emitKind !== void 0) {
106112
- (state.seenEmittedFiles || (state.seenEmittedFiles = new Map())).set(affected.resolvedPath, emitKind);
106113
- }
106114
- if (isPendingEmit) {
106115
- state.affectedFilesPendingEmitIndex++;
106116
- } else {
106117
- state.affectedFilesIndex++;
106118
- }
106119
- }
106120
- }
106121
- function toAffectedFileResult(state, result, affected) {
106122
- doneWithAffectedFile(state, affected);
106123
- return { result, affected };
106124
- }
106125
- function toAffectedFileEmitResult(state, result, affected, emitKind, isPendingEmit, isBuildInfoEmit) {
106126
- doneWithAffectedFile(state, affected, emitKind, isPendingEmit, isBuildInfoEmit);
106127
- return { result, affected };
106128
- }
106129
106298
  function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) {
106130
106299
  return concatenate(
106131
106300
  getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken),
@@ -106149,49 +106318,50 @@ ${lanes.join("\n")}
106149
106318
  function isProgramBundleEmitBuildInfo(info) {
106150
106319
  return !!outFile(info.options || {});
106151
106320
  }
106152
- function getProgramBuildInfo(state, getCanonicalFileName) {
106153
- const outFilePath = outFile(state.compilerOptions);
106154
- if (outFilePath && !state.compilerOptions.composite)
106155
- return;
106321
+ function getBuildInfo2(state, getCanonicalFileName, bundle) {
106322
+ var _a2, _b, _c;
106156
106323
  const currentDirectory = Debug.checkDefined(state.program).getCurrentDirectory();
106157
106324
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
106158
106325
  const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
106159
- if (outFilePath) {
106160
- const fileNames2 = [];
106161
- const fileInfos2 = [];
106162
- state.program.getRootFileNames().forEach((f) => {
106163
- const sourceFile = state.program.getSourceFile(f);
106164
- if (!sourceFile)
106165
- return;
106166
- fileNames2.push(relativeToBuildInfo(sourceFile.resolvedPath));
106167
- fileInfos2.push(sourceFile.version);
106326
+ const fileNames = [];
106327
+ const fileNameToFileId = new Map();
106328
+ if (outFile(state.compilerOptions)) {
106329
+ const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
106330
+ toFileId(key);
106331
+ return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
106168
106332
  });
106169
- const result2 = {
106170
- fileNames: fileNames2,
106333
+ const program2 = {
106334
+ fileNames,
106171
106335
  fileInfos: fileInfos2,
106172
- options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
106336
+ options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
106173
106337
  outSignature: state.outSignature,
106174
- latestChangedDtsFile
106338
+ latestChangedDtsFile,
106339
+ pendingEmit: !state.programEmitPending ? void 0 : state.programEmitPending === getBuilderFileEmit(state.compilerOptions) ? false : state.programEmitPending
106340
+ };
106341
+ const { js, dts, commonSourceDirectory, sourceFiles } = bundle;
106342
+ state.bundle = bundle = {
106343
+ commonSourceDirectory,
106344
+ sourceFiles,
106345
+ js: js || (!state.compilerOptions.emitDeclarationOnly ? (_a2 = state.bundle) == null ? void 0 : _a2.js : void 0),
106346
+ dts: dts || (getEmitDeclarations(state.compilerOptions) ? (_b = state.bundle) == null ? void 0 : _b.dts : void 0)
106175
106347
  };
106176
- return result2;
106348
+ return createBuildInfo(program2, bundle);
106177
106349
  }
106178
- const fileNames = [];
106179
- const fileNameToFileId = new Map();
106180
106350
  let fileIdsList;
106181
106351
  let fileNamesToFileIdListId;
106182
106352
  let emitSignatures;
106183
106353
  const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
106184
- var _a2, _b;
106354
+ var _a3, _b2;
106185
106355
  const fileId = toFileId(key);
106186
106356
  Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
106187
- const oldSignature = (_a2 = state.oldSignatures) == null ? void 0 : _a2.get(key);
106357
+ const oldSignature = (_a3 = state.oldSignatures) == null ? void 0 : _a3.get(key);
106188
106358
  const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;
106189
106359
  if (state.compilerOptions.composite) {
106190
106360
  const file = state.program.getSourceFileByPath(key);
106191
106361
  if (!isJsonSourceFile(file) && sourceFileMayBeEmitted(file, state.program)) {
106192
- const emitSignature = (_b = state.emitSignatures) == null ? void 0 : _b.get(key);
106362
+ const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key);
106193
106363
  if (emitSignature !== actualSignature) {
106194
- (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : [fileId, emitSignature]);
106364
+ (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature]);
106195
106365
  }
106196
106366
  }
106197
106367
  }
@@ -106207,8 +106377,8 @@ ${lanes.join("\n")}
106207
106377
  let exportedModulesMap;
106208
106378
  if (state.exportedModulesMap) {
106209
106379
  exportedModulesMap = mapDefined(arrayFrom(state.exportedModulesMap.keys()).sort(compareStringsCaseSensitive), (key) => {
106210
- var _a2;
106211
- const oldValue = (_a2 = state.oldExportedModulesMap) == null ? void 0 : _a2.get(key);
106380
+ var _a3;
106381
+ const oldValue = (_a3 = state.oldExportedModulesMap) == null ? void 0 : _a3.get(key);
106212
106382
  if (oldValue === void 0)
106213
106383
  return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
106214
106384
  if (oldValue)
@@ -106229,16 +106399,17 @@ ${lanes.join("\n")}
106229
106399
  }
106230
106400
  }
106231
106401
  let affectedFilesPendingEmit;
106232
- if (state.affectedFilesPendingEmit) {
106402
+ if ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.size) {
106403
+ const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
106233
106404
  const seenFiles = new Set();
106234
- for (const path of state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(compareStringsCaseSensitive)) {
106405
+ for (const path of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
106235
106406
  if (tryAddToSet(seenFiles, path)) {
106236
106407
  const file = state.program.getSourceFileByPath(path);
106237
106408
  if (!sourceFileMayBeEmitted(file, state.program))
106238
106409
  continue;
106239
- const fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
106410
+ const fileId = toFileId(path), pendingEmit = state.affectedFilesPendingEmit.get(path);
106240
106411
  (affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(
106241
- emitKind === 1 /* Full */ ? fileId : [fileId]
106412
+ pendingEmit === fullEmitForOptions ? fileId : pendingEmit === 8 /* Dts */ ? [fileId] : [fileId, pendingEmit]
106242
106413
  );
106243
106414
  }
106244
106415
  }
@@ -106249,10 +106420,10 @@ ${lanes.join("\n")}
106249
106420
  (changeFileSet || (changeFileSet = [])).push(toFileId(path));
106250
106421
  }
106251
106422
  }
106252
- const result = {
106423
+ const program = {
106253
106424
  fileNames,
106254
106425
  fileInfos,
106255
- options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsMultiFileEmitBuildInfo"),
106426
+ options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
106256
106427
  fileIdsList,
106257
106428
  referencedMap,
106258
106429
  exportedModulesMap,
@@ -106262,7 +106433,7 @@ ${lanes.join("\n")}
106262
106433
  emitSignatures,
106263
106434
  latestChangedDtsFile
106264
106435
  };
106265
- return result;
106436
+ return createBuildInfo(program, bundle);
106266
106437
  function relativeToBuildInfoEnsuringAbsolutePath(path) {
106267
106438
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
106268
106439
  }
@@ -106287,20 +106458,20 @@ ${lanes.join("\n")}
106287
106458
  }
106288
106459
  return fileIdListId;
106289
106460
  }
106290
- function convertToProgramBuildInfoCompilerOptions(options, optionKey) {
106291
- let result2;
106461
+ function convertToProgramBuildInfoCompilerOptions(options) {
106462
+ let result;
106292
106463
  const { optionsNameMap } = getOptionsNameMap();
106293
106464
  for (const name of getOwnKeys(options).sort(compareStringsCaseSensitive)) {
106294
106465
  const optionInfo = optionsNameMap.get(name.toLowerCase());
106295
- if (optionInfo == null ? void 0 : optionInfo[optionKey]) {
106296
- (result2 || (result2 = {}))[name] = convertToReusableCompilerOptionValue(
106466
+ if (optionInfo == null ? void 0 : optionInfo.affectsBuildInfo) {
106467
+ (result || (result = {}))[name] = convertToReusableCompilerOptionValue(
106297
106468
  optionInfo,
106298
106469
  options[name],
106299
106470
  relativeToBuildInfoEnsuringAbsolutePath
106300
106471
  );
106301
106472
  }
106302
106473
  }
106303
- return result2;
106474
+ return result;
106304
106475
  }
106305
106476
  }
106306
106477
  function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
@@ -106407,7 +106578,7 @@ ${lanes.join("\n")}
106407
106578
  const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
106408
106579
  const computeHash = maybeBind(host, host.createHash);
106409
106580
  const state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
106410
- newProgram.getProgramBuildInfo = () => getProgramBuildInfo(state, getCanonicalFileName);
106581
+ newProgram.getBuildInfo = (bundle) => getBuildInfo2(state, getCanonicalFileName, bundle);
106411
106582
  newProgram = void 0;
106412
106583
  oldProgram = void 0;
106413
106584
  oldState = void 0;
@@ -106440,50 +106611,70 @@ ${lanes.join("\n")}
106440
106611
  return emitSkippedWithNoDiagnostics;
106441
106612
  }
106442
106613
  function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
106614
+ var _a2, _b, _c, _d, _e;
106443
106615
  let affected = getNextAffectedFile(state, cancellationToken, computeHash, getCanonicalFileName, host);
106444
- let emitKind = 1 /* Full */;
106445
- let isPendingEmitFile = false;
106616
+ const programEmitKind = getBuilderFileEmit(state.compilerOptions);
106617
+ let emitKind = emitOnlyDtsFiles ? programEmitKind & 24 /* AllDts */ : programEmitKind;
106446
106618
  if (!affected) {
106447
106619
  if (!outFile(state.compilerOptions)) {
106448
- const pendingAffectedFile = getNextAffectedFilePendingEmit(state);
106620
+ const pendingAffectedFile = getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles);
106449
106621
  if (!pendingAffectedFile) {
106450
- if (!state.buildInfoEmitPending) {
106622
+ if (!state.buildInfoEmitPending)
106451
106623
  return void 0;
106452
- }
106453
- const affected2 = Debug.checkDefined(state.program);
106454
- return toAffectedFileEmitResult(
106455
- state,
106456
- affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken),
106457
- affected2,
106458
- 1 /* Full */,
106459
- false,
106460
- true
106461
- );
106624
+ const affected2 = state.program;
106625
+ const result2 = affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken);
106626
+ state.buildInfoEmitPending = false;
106627
+ return { result: result2, affected: affected2 };
106462
106628
  }
106463
106629
  ({ affectedFile: affected, emitKind } = pendingAffectedFile);
106464
- isPendingEmitFile = true;
106465
106630
  } else {
106466
- const program = Debug.checkDefined(state.program);
106467
- if (state.programEmitComplete)
106631
+ if (!state.programEmitPending)
106632
+ return void 0;
106633
+ emitKind = state.programEmitPending;
106634
+ if (emitOnlyDtsFiles)
106635
+ emitKind = emitKind & 24 /* AllDts */;
106636
+ if (!emitKind)
106468
106637
  return void 0;
106469
- affected = program;
106638
+ affected = state.program;
106470
106639
  }
106471
106640
  }
106472
- return toAffectedFileEmitResult(
106473
- state,
106474
- Debug.checkDefined(state.program).emit(
106475
- affected === state.program ? void 0 : affected,
106476
- getEmitDeclarations(state.compilerOptions) ? getWriteFileCallback(writeFile2, customTransformers) : writeFile2 || maybeBind(host, host.writeFile),
106477
- cancellationToken,
106478
- emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */,
106479
- customTransformers
106480
- ),
106481
- affected,
106482
- emitKind,
106483
- isPendingEmitFile
106641
+ let emitOnly;
106642
+ if (emitKind & 7 /* AllJs */)
106643
+ emitOnly = 0 /* Js */;
106644
+ if (emitKind & 24 /* AllDts */)
106645
+ emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0;
106646
+ if (affected === state.program) {
106647
+ state.programEmitPending = state.changedFilesSet.size ? getPendingEmitKind(programEmitKind, emitKind) : state.programEmitPending ? getPendingEmitKind(state.programEmitPending, emitKind) : void 0;
106648
+ }
106649
+ const result = state.program.emit(
106650
+ affected === state.program ? void 0 : affected,
106651
+ getWriteFileCallback(writeFile2, customTransformers),
106652
+ cancellationToken,
106653
+ emitOnly,
106654
+ customTransformers
106484
106655
  );
106656
+ if (affected !== state.program) {
106657
+ const affectedSourceFile = affected;
106658
+ state.seenAffectedFiles.add(affectedSourceFile.resolvedPath);
106659
+ if (state.affectedFilesIndex !== void 0)
106660
+ state.affectedFilesIndex++;
106661
+ state.buildInfoEmitPending = true;
106662
+ const existing = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedSourceFile.resolvedPath)) || 0 /* None */;
106663
+ ((_b = state.seenEmittedFiles) != null ? _b : state.seenEmittedFiles = new Map()).set(affectedSourceFile.resolvedPath, emitKind | existing);
106664
+ const existingPending = ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.get(affectedSourceFile.resolvedPath)) || programEmitKind;
106665
+ const pendingKind = getPendingEmitKind(existingPending, emitKind | existing);
106666
+ if (pendingKind)
106667
+ ((_d = state.affectedFilesPendingEmit) != null ? _d : state.affectedFilesPendingEmit = new Map()).set(affectedSourceFile.resolvedPath, pendingKind);
106668
+ else
106669
+ (_e = state.affectedFilesPendingEmit) == null ? void 0 : _e.delete(affectedSourceFile.resolvedPath);
106670
+ } else {
106671
+ state.changedFilesSet.clear();
106672
+ }
106673
+ return { result, affected };
106485
106674
  }
106486
106675
  function getWriteFileCallback(writeFile2, customTransformers) {
106676
+ if (!getEmitDeclarations(state.compilerOptions))
106677
+ return writeFile2 || maybeBind(host, host.writeFile);
106487
106678
  return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
106488
106679
  var _a2, _b, _c, _d, _e, _f, _g;
106489
106680
  if (isDeclarationFileName(fileName)) {
@@ -106522,21 +106713,16 @@ ${lanes.join("\n")}
106522
106713
  }
106523
106714
  if (state.compilerOptions.composite) {
106524
106715
  const filePath = sourceFiles[0].resolvedPath;
106525
- const oldSignature = (_f = state.emitSignatures) == null ? void 0 : _f.get(filePath);
106526
- emitSignature != null ? emitSignature : emitSignature = computeSignature(text, computeHash, data);
106527
- if (emitSignature === oldSignature)
106716
+ emitSignature = handleNewSignature((_f = state.emitSignatures) == null ? void 0 : _f.get(filePath), emitSignature);
106717
+ if (!emitSignature)
106528
106718
  return;
106529
106719
  ((_g = state.emitSignatures) != null ? _g : state.emitSignatures = new Map()).set(filePath, emitSignature);
106530
- state.hasChangedEmitSignature = true;
106531
- state.latestChangedDtsFile = fileName;
106532
106720
  }
106533
106721
  } else if (state.compilerOptions.composite) {
106534
- const newSignature = computeSignature(text, computeHash, data);
106535
- if (newSignature === state.outSignature)
106722
+ const newSignature = handleNewSignature(state.outSignature, void 0);
106723
+ if (!newSignature)
106536
106724
  return;
106537
106725
  state.outSignature = newSignature;
106538
- state.hasChangedEmitSignature = true;
106539
- state.latestChangedDtsFile = fileName;
106540
106726
  }
106541
106727
  }
106542
106728
  if (writeFile2)
@@ -106545,10 +106731,25 @@ ${lanes.join("\n")}
106545
106731
  host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
106546
106732
  else
106547
106733
  state.program.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
106734
+ function handleNewSignature(oldSignatureFormat, newSignature) {
106735
+ const oldSignature = !oldSignatureFormat || isString(oldSignatureFormat) ? oldSignatureFormat : oldSignatureFormat[0];
106736
+ newSignature != null ? newSignature : newSignature = computeSignature(text, computeHash, data);
106737
+ if (newSignature === oldSignature) {
106738
+ if (oldSignatureFormat === oldSignature)
106739
+ return void 0;
106740
+ else if (data)
106741
+ data.differsOnlyInMap = true;
106742
+ else
106743
+ data = { differsOnlyInMap: true };
106744
+ } else {
106745
+ state.hasChangedEmitSignature = true;
106746
+ state.latestChangedDtsFile = fileName;
106747
+ }
106748
+ return newSignature;
106749
+ }
106548
106750
  };
106549
106751
  }
106550
106752
  function emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
106551
- var _a2;
106552
106753
  if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {
106553
106754
  assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile);
106554
106755
  }
@@ -106574,16 +106775,13 @@ ${lanes.join("\n")}
106574
106775
  emittedFiles,
106575
106776
  sourceMaps
106576
106777
  };
106577
- } else if ((_a2 = state.affectedFilesPendingEmitKind) == null ? void 0 : _a2.size) {
106578
- Debug.assert(kind === 0 /* SemanticDiagnosticsBuilderProgram */);
106579
- if (!emitOnlyDtsFiles || every(state.affectedFilesPendingEmit, (path, index) => index < state.affectedFilesPendingEmitIndex || state.affectedFilesPendingEmitKind.get(path) === 0 /* DtsOnly */)) {
106580
- clearAffectedFilesPendingEmit(state);
106581
- }
106778
+ } else {
106779
+ clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles);
106582
106780
  }
106583
106781
  }
106584
106782
  return Debug.checkDefined(state.program).emit(
106585
106783
  targetSourceFile,
106586
- getEmitDeclarations(state.compilerOptions) ? getWriteFileCallback(writeFile2, customTransformers) : writeFile2 || maybeBind(host, host.writeFile),
106784
+ getWriteFileCallback(writeFile2, customTransformers),
106587
106785
  cancellationToken,
106588
106786
  emitOnlyDtsFiles,
106589
106787
  customTransformers
@@ -106592,27 +106790,25 @@ ${lanes.join("\n")}
106592
106790
  function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
106593
106791
  while (true) {
106594
106792
  const affected = getNextAffectedFile(state, cancellationToken, computeHash, getCanonicalFileName, host);
106595
- if (!affected) {
106793
+ let result;
106794
+ if (!affected)
106596
106795
  return void 0;
106597
- } else if (affected === state.program) {
106598
- return toAffectedFileResult(
106599
- state,
106600
- state.program.getSemanticDiagnostics(void 0, cancellationToken),
106601
- affected
106602
- );
106603
- }
106604
- if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */ || state.compilerOptions.noEmit || state.compilerOptions.noEmitOnError) {
106605
- addToAffectedFilesPendingEmit(state, affected.resolvedPath, 1 /* Full */);
106606
- }
106607
- if (ignoreSourceFile && ignoreSourceFile(affected)) {
106608
- doneWithAffectedFile(state, affected);
106609
- continue;
106796
+ else if (affected !== state.program) {
106797
+ const affectedSourceFile = affected;
106798
+ if (!ignoreSourceFile || !ignoreSourceFile(affectedSourceFile)) {
106799
+ result = getSemanticDiagnosticsOfFile(state, affectedSourceFile, cancellationToken);
106800
+ }
106801
+ state.seenAffectedFiles.add(affectedSourceFile.resolvedPath);
106802
+ state.affectedFilesIndex++;
106803
+ state.buildInfoEmitPending = true;
106804
+ if (!result)
106805
+ continue;
106806
+ } else {
106807
+ result = state.program.getSemanticDiagnostics(void 0, cancellationToken);
106808
+ state.changedFilesSet.clear();
106809
+ state.programEmitPending = getBuilderFileEmit(state.compilerOptions);
106610
106810
  }
106611
- return toAffectedFileResult(
106612
- state,
106613
- getSemanticDiagnosticsOfFile(state, affected, cancellationToken),
106614
- affected
106615
- );
106811
+ return { result, affected };
106616
106812
  }
106617
106813
  }
106618
106814
  function getSemanticDiagnostics(sourceFile, cancellationToken) {
@@ -106635,46 +106831,49 @@ ${lanes.join("\n")}
106635
106831
  }
106636
106832
  }
106637
106833
  function addToAffectedFilesPendingEmit(state, affectedFilePendingEmit, kind) {
106638
- if (!state.affectedFilesPendingEmit)
106639
- state.affectedFilesPendingEmit = [];
106640
- if (!state.affectedFilesPendingEmitKind)
106641
- state.affectedFilesPendingEmitKind = new Map();
106642
- const existingKind = state.affectedFilesPendingEmitKind.get(affectedFilePendingEmit);
106643
- state.affectedFilesPendingEmit.push(affectedFilePendingEmit);
106644
- state.affectedFilesPendingEmitKind.set(affectedFilePendingEmit, existingKind || kind);
106645
- if (state.affectedFilesPendingEmitIndex === void 0) {
106646
- state.affectedFilesPendingEmitIndex = 0;
106647
- }
106648
- }
106649
- function toBuilderStateFileInfo(fileInfo) {
106834
+ var _a2, _b;
106835
+ const existingKind = ((_a2 = state.affectedFilesPendingEmit) == null ? void 0 : _a2.get(affectedFilePendingEmit)) || 0 /* None */;
106836
+ ((_b = state.affectedFilesPendingEmit) != null ? _b : state.affectedFilesPendingEmit = new Map()).set(affectedFilePendingEmit, existingKind | kind);
106837
+ }
106838
+ function toBuilderStateFileInfoForMultiEmit(fileInfo) {
106650
106839
  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 };
106651
106840
  }
106652
- function toBuilderFileEmit(value) {
106653
- return isNumber(value) ? 1 /* Full */ : 0 /* DtsOnly */;
106841
+ function toBuilderFileEmit(value, fullEmitForOptions) {
106842
+ return isNumber(value) ? fullEmitForOptions : value[1] || 8 /* Dts */;
106843
+ }
106844
+ function toProgramEmitPending(value, options) {
106845
+ return !value ? getBuilderFileEmit(options || {}) : value;
106654
106846
  }
106655
- function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
106847
+ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host) {
106656
106848
  var _a2, _b, _c, _d;
106849
+ const program = buildInfo.program;
106657
106850
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
106658
106851
  const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
106659
106852
  let state;
106660
- let filePaths;
106853
+ const filePaths = (_a2 = program.fileNames) == null ? void 0 : _a2.map(toPath3);
106661
106854
  let filePathsSetList;
106662
106855
  const latestChangedDtsFile = program.latestChangedDtsFile ? toAbsolutePath(program.latestChangedDtsFile) : void 0;
106663
106856
  if (isProgramBundleEmitBuildInfo(program)) {
106857
+ const fileInfos = new Map();
106858
+ program.fileInfos.forEach((fileInfo, index) => {
106859
+ const path = toFilePath(index + 1);
106860
+ fileInfos.set(path, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
106861
+ });
106664
106862
  state = {
106665
- fileInfos: new Map(),
106863
+ fileInfos,
106666
106864
  compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
106667
106865
  latestChangedDtsFile,
106668
- outSignature: program.outSignature
106866
+ outSignature: program.outSignature,
106867
+ programEmitPending: program.pendingEmit === void 0 ? void 0 : toProgramEmitPending(program.pendingEmit, program.options),
106868
+ bundle: buildInfo.bundle
106669
106869
  };
106670
106870
  } else {
106671
- filePaths = (_a2 = program.fileNames) == null ? void 0 : _a2.map(toPath3);
106672
106871
  filePathsSetList = (_b = program.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
106673
106872
  const fileInfos = new Map();
106674
106873
  const emitSignatures = ((_c = program.options) == null ? void 0 : _c.composite) && !outFile(program.options) ? new Map() : void 0;
106675
106874
  program.fileInfos.forEach((fileInfo, index) => {
106676
106875
  const path = toFilePath(index + 1);
106677
- const stateFileInfo = toBuilderStateFileInfo(fileInfo);
106876
+ const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
106678
106877
  fileInfos.set(path, stateFileInfo);
106679
106878
  if (emitSignatures && stateFileInfo.signature)
106680
106879
  emitSignatures.set(path, stateFileInfo.signature);
@@ -106682,9 +106881,15 @@ ${lanes.join("\n")}
106682
106881
  (_d = program.emitSignatures) == null ? void 0 : _d.forEach((value) => {
106683
106882
  if (isNumber(value))
106684
106883
  emitSignatures.delete(toFilePath(value));
106685
- else
106686
- emitSignatures.set(toFilePath(value[0]), value[1]);
106884
+ else {
106885
+ const key = toFilePath(value[0]);
106886
+ emitSignatures.set(
106887
+ key,
106888
+ !isString(value[1]) && !value[1].length ? [emitSignatures.get(key)] : value[1]
106889
+ );
106890
+ }
106687
106891
  });
106892
+ const fullEmitForOptions = program.affectedFilesPendingEmit ? getBuilderFileEmit(program.options || {}) : void 0;
106688
106893
  state = {
106689
106894
  fileInfos,
106690
106895
  compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
@@ -106692,9 +106897,7 @@ ${lanes.join("\n")}
106692
106897
  exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
106693
106898
  semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && arrayToMap(program.semanticDiagnosticsPerFile, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => isNumber(value) ? emptyArray : value[1]),
106694
106899
  hasReusableDiagnostic: true,
106695
- affectedFilesPendingEmit: map(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0])),
106696
- affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && arrayToMap(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), toBuilderFileEmit),
106697
- affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
106900
+ affectedFilesPendingEmit: program.affectedFilesPendingEmit && arrayToMap(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)),
106698
106901
  changedFilesSet: new Set(map(program.changeFileSet, toFilePath)),
106699
106902
  latestChangedDtsFile,
106700
106903
  emitSignatures: (emitSignatures == null ? void 0 : emitSignatures.size) ? emitSignatures : void 0
@@ -106903,7 +107106,7 @@ ${lanes.join("\n")}
106903
107106
  function getResolvedModule2(resolution) {
106904
107107
  return resolution.resolvedModule;
106905
107108
  }
106906
- function getResolvedTypeReferenceDirective(resolution) {
107109
+ function getResolvedTypeReferenceDirective2(resolution) {
106907
107110
  return resolution.resolvedTypeReferenceDirective;
106908
107111
  }
106909
107112
  function isInDirectoryPath(dir, file) {
@@ -107040,11 +107243,12 @@ ${lanes.join("\n")}
107040
107243
  getResolutionWithResolvedFileName,
107041
107244
  shouldRetryResolution,
107042
107245
  reusedNames,
107246
+ resolutionInfo,
107043
107247
  logChanges,
107044
107248
  containingSourceFile,
107045
107249
  containingSourceFileMode
107046
107250
  }) {
107047
- var _a2, _b, _c;
107251
+ var _a2, _b, _c, _d;
107048
107252
  const path = resolutionHost.toPath(containingFile);
107049
107253
  const resolutionsInFile = cache.get(path) || cache.set(path, createModeAwareCache()).get(path);
107050
107254
  const dirPath = getDirectoryPath(path);
@@ -107062,9 +107266,9 @@ ${lanes.join("\n")}
107062
107266
  const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
107063
107267
  const seenNamesInFile = createModeAwareCache();
107064
107268
  let i = 0;
107065
- for (const entry of names) {
107066
- const name = isString(entry) ? entry : entry.fileName.toLowerCase();
107067
- const mode = !isString(entry) ? getModeForFileReference(entry, containingSourceFileMode) : containingSourceFile ? getModeForResolutionAtIndex(containingSourceFile, i) : void 0;
107269
+ for (const entry of containingSourceFile && resolutionInfo ? resolutionInfo.names : names) {
107270
+ const name = getResolutionName(entry);
107271
+ const mode = !isString(entry) ? isStringLiteralLike(entry) ? getModeForUsageLocation(containingSourceFile, entry) : getModeForFileReference(entry, containingSourceFileMode) : containingSourceFile ? getModeForResolutionAtIndex(containingSourceFile, i) : void 0;
107068
107272
  i++;
107069
107273
  let resolution = resolutionsInFile.get(name, mode);
107070
107274
  if (!seenNamesInFile.has(name, mode) && unmatchedRedirects || !resolution || resolution.isInvalidated || hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution)) {
@@ -107119,12 +107323,22 @@ ${lanes.join("\n")}
107119
107323
  seenNamesInFile.set(name, mode, true);
107120
107324
  resolvedModules.push(getResolutionWithResolvedFileName(resolution));
107121
107325
  }
107122
- resolutionsInFile.forEach((resolution, name, mode) => {
107123
- if (!seenNamesInFile.has(name, mode) && !contains(reusedNames, name)) {
107124
- stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
107125
- resolutionsInFile.delete(name, mode);
107126
- }
107127
- });
107326
+ if (containingSourceFile && resolutionInfo) {
107327
+ (_d = resolutionInfo.reusedNames) == null ? void 0 : _d.forEach((entry) => seenNamesInFile.set(
107328
+ getResolutionName(entry),
107329
+ !isString(entry) && isStringLiteralLike(entry) ? getModeForUsageLocation(containingSourceFile, entry) : getModeForFileReference(entry, containingSourceFile.impliedNodeFormat),
107330
+ true
107331
+ ));
107332
+ reusedNames = void 0;
107333
+ }
107334
+ if (resolutionsInFile.size() !== seenNamesInFile.size()) {
107335
+ resolutionsInFile.forEach((resolution, name, mode) => {
107336
+ if (!seenNamesInFile.has(name, mode) && !contains(reusedNames, name)) {
107337
+ stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
107338
+ resolutionsInFile.delete(name, mode);
107339
+ }
107340
+ });
107341
+ }
107128
107342
  return resolvedModules;
107129
107343
  function resolutionIsEqualTo(oldResolution, newResolution) {
107130
107344
  if (oldResolution === newResolution) {
@@ -107144,7 +107358,7 @@ ${lanes.join("\n")}
107144
107358
  return oldResult.resolvedFileName === newResult.resolvedFileName;
107145
107359
  }
107146
107360
  }
107147
- function resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode) {
107361
+ function resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode, resolutionInfo) {
107148
107362
  return resolveNamesWithLocalCache({
107149
107363
  names: typeDirectiveNames,
107150
107364
  containingFile,
@@ -107152,12 +107366,13 @@ ${lanes.join("\n")}
107152
107366
  cache: resolvedTypeReferenceDirectives,
107153
107367
  perDirectoryCacheWithRedirects: perDirectoryResolvedTypeReferenceDirectives,
107154
107368
  loader: resolveTypeReferenceDirective2,
107155
- getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective,
107369
+ getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2,
107156
107370
  shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0,
107157
- containingSourceFileMode: containingFileMode
107371
+ containingSourceFileMode: containingFileMode,
107372
+ resolutionInfo
107158
107373
  });
107159
107374
  }
107160
- function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, containingSourceFile) {
107375
+ function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, containingSourceFile, resolutionInfo) {
107161
107376
  return resolveNamesWithLocalCache({
107162
107377
  names: moduleNames,
107163
107378
  containingFile,
@@ -107168,6 +107383,7 @@ ${lanes.join("\n")}
107168
107383
  getResolutionWithResolvedFileName: getResolvedModule2,
107169
107384
  shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
107170
107385
  reusedNames,
107386
+ resolutionInfo,
107171
107387
  logChanges: logChangesWhenResolvingModule,
107172
107388
  containingSourceFile
107173
107389
  });
@@ -107444,7 +107660,7 @@ ${lanes.join("\n")}
107444
107660
  }
107445
107661
  function removeResolutionsOfFile(filePath) {
107446
107662
  removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule2);
107447
- removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective);
107663
+ removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective2);
107448
107664
  }
107449
107665
  function invalidateResolutions(resolutions, canInvalidate) {
107450
107666
  if (!resolutions)
@@ -108050,13 +108266,44 @@ ${lanes.join("\n")}
108050
108266
  storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit
108051
108267
  };
108052
108268
  }
108269
+ function getSourceFileVersionAsHashFromText(host, text) {
108270
+ if (text.match(sourceMapCommentRegExpDontCareLineStart)) {
108271
+ let lineEnd = text.length;
108272
+ let lineStart = lineEnd;
108273
+ for (let pos = lineEnd - 1; pos >= 0; pos--) {
108274
+ const ch = text.charCodeAt(pos);
108275
+ switch (ch) {
108276
+ case 10 /* lineFeed */:
108277
+ if (pos && text.charCodeAt(pos - 1) === 13 /* carriageReturn */) {
108278
+ pos--;
108279
+ }
108280
+ case 13 /* carriageReturn */:
108281
+ break;
108282
+ default:
108283
+ if (ch < 127 /* maxAsciiCharacter */ || !isLineBreak(ch)) {
108284
+ lineStart = pos;
108285
+ continue;
108286
+ }
108287
+ break;
108288
+ }
108289
+ const line = text.substring(lineStart, lineEnd);
108290
+ if (line.match(sourceMapCommentRegExp)) {
108291
+ text = text.substring(0, lineStart);
108292
+ break;
108293
+ } else if (!line.match(whitespaceOrMapCommentRegExp)) {
108294
+ break;
108295
+ }
108296
+ lineEnd = lineStart;
108297
+ }
108298
+ }
108299
+ return (host.createHash || generateDjb2Hash)(text);
108300
+ }
108053
108301
  function setGetSourceFileAsHashVersioned(compilerHost, host) {
108054
108302
  const originalGetSourceFile = compilerHost.getSourceFile;
108055
- const computeHash = maybeBind(host, host.createHash) || generateDjb2Hash;
108056
108303
  compilerHost.getSourceFile = (...args) => {
108057
108304
  const result = originalGetSourceFile.call(compilerHost, ...args);
108058
108305
  if (result) {
108059
- result.version = computeHash(result.text);
108306
+ result.version = getSourceFileVersionAsHashFromText(host, result.text);
108060
108307
  }
108061
108308
  return result;
108062
108309
  };
@@ -108178,7 +108425,7 @@ ${lanes.join("\n")}
108178
108425
  }
108179
108426
  if (!buildInfo || buildInfo.version !== version || !buildInfo.program)
108180
108427
  return void 0;
108181
- return createBuilderProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
108428
+ return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
108182
108429
  }
108183
108430
  function createIncrementalCompilerHost(options, system = sys) {
108184
108431
  const host = createCompilerHostWorker(options, void 0, system);
@@ -108299,8 +108546,8 @@ ${lanes.join("\n")}
108299
108546
  configFileName ? getDirectoryPath(getNormalizedAbsolutePath(configFileName, currentDirectory)) : currentDirectory,
108300
108547
  false
108301
108548
  );
108302
- compilerHost.resolveModuleNames = host.resolveModuleNames ? (...args) => host.resolveModuleNames(...args) : (moduleNames, containingFile, reusedNames, redirectedReference, _options, sourceFile) => resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, sourceFile);
108303
- compilerHost.resolveTypeReferenceDirectives = host.resolveTypeReferenceDirectives ? (...args) => host.resolveTypeReferenceDirectives(...args) : (typeDirectiveNames, containingFile, redirectedReference, _options, containingFileMode) => resolutionCache.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode);
108549
+ compilerHost.resolveModuleNames = host.resolveModuleNames ? (...args) => host.resolveModuleNames(...args) : (moduleNames, containingFile, reusedNames, redirectedReference, _options, sourceFile, resolutionInfo) => resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, sourceFile, resolutionInfo);
108550
+ compilerHost.resolveTypeReferenceDirectives = host.resolveTypeReferenceDirectives ? (...args) => host.resolveTypeReferenceDirectives(...args) : (typeDirectiveNames, containingFile, redirectedReference, _options, containingFileMode, resolutionInfo) => resolutionCache.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode, resolutionInfo);
108304
108551
  compilerHost.getModuleResolutionCache = host.resolveModuleNames ? maybeBind(host, host.getModuleResolutionCache) : () => resolutionCache.getModuleResolutionCache();
108305
108552
  const userProvidedResolution = !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;
108306
108553
  const customHasInvalidatedResolutions = userProvidedResolution ? maybeBind(host, host.hasInvalidatedResolutions) || returnTrue : returnFalse;
@@ -108863,13 +109110,14 @@ ${lanes.join("\n")}
108863
109110
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithSelf"] = 6] = "OutOfDateWithSelf";
108864
109111
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithUpstream"] = 7] = "OutOfDateWithUpstream";
108865
109112
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateBuildInfo"] = 8] = "OutOfDateBuildInfo";
108866
- UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 9] = "UpstreamOutOfDate";
108867
- UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 10] = "UpstreamBlocked";
108868
- UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 11] = "ComputingUpstream";
108869
- UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 12] = "TsVersionOutputOfDate";
108870
- UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 13] = "UpToDateWithInputFileText";
108871
- UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 14] = "ContainerOnly";
108872
- UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 15] = "ForceBuild";
109113
+ UpToDateStatusType2[UpToDateStatusType2["OutOfDateOptions"] = 9] = "OutOfDateOptions";
109114
+ UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 10] = "UpstreamOutOfDate";
109115
+ UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 11] = "UpstreamBlocked";
109116
+ UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 12] = "ComputingUpstream";
109117
+ UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 13] = "TsVersionOutputOfDate";
109118
+ UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 14] = "UpToDateWithInputFileText";
109119
+ UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 15] = "ContainerOnly";
109120
+ UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 16] = "ForceBuild";
108873
109121
  return UpToDateStatusType2;
108874
109122
  })(UpToDateStatusType || {});
108875
109123
  function resolveConfigFileProjectName(project) {
@@ -108961,14 +109209,14 @@ ${lanes.join("\n")}
108961
109209
  const typeReferenceDirectiveResolutionCache = !compilerHost.resolveTypeReferenceDirectives ? createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, void 0, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache()) : void 0;
108962
109210
  if (!compilerHost.resolveModuleNames) {
108963
109211
  const loader = (moduleName, resolverMode, containingFile, redirectedReference) => resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference, resolverMode).resolvedModule;
108964
- compilerHost.resolveModuleNames = (moduleNames, containingFile, _reusedNames, redirectedReference, _options, containingSourceFile) => loadWithModeAwareCache(Debug.checkEachDefined(moduleNames), Debug.checkDefined(containingSourceFile), containingFile, redirectedReference, loader);
109212
+ compilerHost.resolveModuleNames = (moduleNames, containingFile, _reusedNames, redirectedReference, _options, containingSourceFile, resolutionInfo) => loadWithModeAwareCache(Debug.checkEachDefined(moduleNames), Debug.checkDefined(containingSourceFile), containingFile, redirectedReference, resolutionInfo, loader);
108965
109213
  compilerHost.getModuleResolutionCache = () => moduleResolutionCache;
108966
109214
  }
108967
109215
  if (!compilerHost.resolveTypeReferenceDirectives) {
108968
109216
  const loader = (moduleName, containingFile, redirectedReference, containingFileMode) => resolveTypeReferenceDirective(moduleName, containingFile, state.projectCompilerOptions, compilerHost, redirectedReference, state.typeReferenceDirectiveResolutionCache, containingFileMode).resolvedTypeReferenceDirective;
108969
109217
  compilerHost.resolveTypeReferenceDirectives = (typeReferenceDirectiveNames, containingFile, redirectedReference, _options, containingFileMode) => loadWithTypeDirectiveCache(Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader);
108970
109218
  }
108971
- compilerHost.getBuildInfo = (fileName, configFilePath) => getBuildInfo2(state, fileName, toResolvedConfigFilePath(state, configFilePath), void 0);
109219
+ compilerHost.getBuildInfo = (fileName, configFilePath) => getBuildInfo3(state, fileName, toResolvedConfigFilePath(state, configFilePath), void 0);
108972
109220
  const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(hostWithWatch, options);
108973
109221
  const state = {
108974
109222
  host,
@@ -109460,7 +109708,7 @@ ${lanes.join("\n")}
109460
109708
  reportDeclarationDiagnostics,
109461
109709
  void 0,
109462
109710
  void 0,
109463
- (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, buildInfo: data == null ? void 0 : data.buildInfo }),
109711
+ (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }),
109464
109712
  cancellationToken,
109465
109713
  false,
109466
109714
  customTransformers || ((_b = (_a2 = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a2, project))
@@ -109489,13 +109737,16 @@ ${lanes.join("\n")}
109489
109737
  const isIncremental = isIncrementalCompilation(options);
109490
109738
  let outputTimeStampMap;
109491
109739
  let now;
109492
- outputFiles.forEach(({ name, text, writeByteOrderMark, buildInfo }) => {
109740
+ outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => {
109493
109741
  const path = toPath2(state, name);
109494
109742
  emittedOutputs.set(toPath2(state, name), name);
109495
- if (buildInfo)
109496
- setBuildInfo(state, buildInfo, projectPath, options, resultFlags);
109743
+ if (data == null ? void 0 : data.buildInfo)
109744
+ setBuildInfo(state, data.buildInfo, projectPath, options, resultFlags);
109745
+ const modifiedTime = (data == null ? void 0 : data.differsOnlyInMap) ? getModifiedTime(state.host, name) : void 0;
109497
109746
  writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
109498
- if (!isIncremental && state.watch) {
109747
+ if (data == null ? void 0 : data.differsOnlyInMap)
109748
+ state.host.setModifiedTime(name, modifiedTime);
109749
+ else if (!isIncremental && state.watch) {
109499
109750
  (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
109500
109751
  }
109501
109752
  });
@@ -109599,14 +109850,14 @@ ${lanes.join("\n")}
109599
109850
  const emittedOutputs = new Map();
109600
109851
  let resultFlags = 2 /* DeclarationOutputUnchanged */;
109601
109852
  const existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo || void 0;
109602
- outputFiles.forEach(({ name, text, writeByteOrderMark, buildInfo }) => {
109853
+ outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => {
109603
109854
  var _a3, _b2;
109604
109855
  emittedOutputs.set(toPath2(state, name), name);
109605
- if (buildInfo) {
109606
- if (((_a3 = buildInfo.program) == null ? void 0 : _a3.outSignature) !== ((_b2 = existingBuildInfo == null ? void 0 : existingBuildInfo.program) == null ? void 0 : _b2.outSignature)) {
109856
+ if (data == null ? void 0 : data.buildInfo) {
109857
+ if (((_a3 = data.buildInfo.program) == null ? void 0 : _a3.outSignature) !== ((_b2 = existingBuildInfo == null ? void 0 : existingBuildInfo.program) == null ? void 0 : _b2.outSignature)) {
109607
109858
  resultFlags &= ~2 /* DeclarationOutputUnchanged */;
109608
109859
  }
109609
- setBuildInfo(state, buildInfo, projectPath, config.options, resultFlags);
109860
+ setBuildInfo(state, data.buildInfo, projectPath, config.options, resultFlags);
109610
109861
  }
109611
109862
  writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
109612
109863
  });
@@ -109706,7 +109957,7 @@ ${lanes.join("\n")}
109706
109957
  }
109707
109958
  continue;
109708
109959
  }
109709
- if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 13 /* UpToDateWithInputFileText */) {
109960
+ if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 14 /* UpToDateWithInputFileText */) {
109710
109961
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
109711
109962
  return {
109712
109963
  kind: 2 /* UpdateOutputFileStamps */,
@@ -109718,7 +109969,7 @@ ${lanes.join("\n")}
109718
109969
  };
109719
109970
  }
109720
109971
  }
109721
- if (status.type === 10 /* UpstreamBlocked */) {
109972
+ if (status.type === 11 /* UpstreamBlocked */) {
109722
109973
  verboseReportProjectStatus(state, project, status);
109723
109974
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
109724
109975
  projectPendingBuild.delete(projectPath);
@@ -109732,7 +109983,7 @@ ${lanes.join("\n")}
109732
109983
  }
109733
109984
  continue;
109734
109985
  }
109735
- if (status.type === 14 /* ContainerOnly */) {
109986
+ if (status.type === 15 /* ContainerOnly */) {
109736
109987
  verboseReportProjectStatus(state, project, status);
109737
109988
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
109738
109989
  projectPendingBuild.delete(projectPath);
@@ -109894,7 +110145,7 @@ ${lanes.join("\n")}
109894
110145
  const existing = state.buildInfoCache.get(resolvedConfigPath);
109895
110146
  return (existing == null ? void 0 : existing.path) === path ? existing : void 0;
109896
110147
  }
109897
- function getBuildInfo2(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
110148
+ function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
109898
110149
  const path = toPath2(state, buildInfoPath);
109899
110150
  const existing = state.buildInfoCache.get(resolvedConfigPath);
109900
110151
  if (existing !== void 0 && existing.path === path) {
@@ -109919,31 +110170,31 @@ ${lanes.join("\n")}
109919
110170
  var _a2, _b;
109920
110171
  if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
109921
110172
  return {
109922
- type: 14 /* ContainerOnly */
110173
+ type: 15 /* ContainerOnly */
109923
110174
  };
109924
110175
  }
109925
110176
  let referenceStatuses;
109926
110177
  const force = !!state.options.force;
109927
110178
  if (project.projectReferences) {
109928
- state.projectStatus.set(resolvedPath, { type: 11 /* ComputingUpstream */ });
110179
+ state.projectStatus.set(resolvedPath, { type: 12 /* ComputingUpstream */ });
109929
110180
  for (const ref of project.projectReferences) {
109930
110181
  const resolvedRef = resolveProjectReferencePath(ref);
109931
110182
  const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
109932
110183
  const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
109933
110184
  const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
109934
- if (refStatus.type === 11 /* ComputingUpstream */ || refStatus.type === 14 /* ContainerOnly */) {
110185
+ if (refStatus.type === 12 /* ComputingUpstream */ || refStatus.type === 15 /* ContainerOnly */) {
109935
110186
  continue;
109936
110187
  }
109937
- if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 10 /* UpstreamBlocked */) {
110188
+ if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 11 /* UpstreamBlocked */) {
109938
110189
  return {
109939
- type: 10 /* UpstreamBlocked */,
110190
+ type: 11 /* UpstreamBlocked */,
109940
110191
  upstreamProjectName: ref.path,
109941
- upstreamProjectBlocked: refStatus.type === 10 /* UpstreamBlocked */
110192
+ upstreamProjectBlocked: refStatus.type === 11 /* UpstreamBlocked */
109942
110193
  };
109943
110194
  }
109944
110195
  if (refStatus.type !== 1 /* UpToDate */) {
109945
110196
  return {
109946
- type: 9 /* UpstreamOutOfDate */,
110197
+ type: 10 /* UpstreamOutOfDate */,
109947
110198
  upstreamProjectName: ref.path
109948
110199
  };
109949
110200
  }
@@ -109952,7 +110203,7 @@ ${lanes.join("\n")}
109952
110203
  }
109953
110204
  }
109954
110205
  if (force)
109955
- return { type: 15 /* ForceBuild */ };
110206
+ return { type: 16 /* ForceBuild */ };
109956
110207
  const { host } = state;
109957
110208
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
109958
110209
  let oldestOutputFileName;
@@ -109976,7 +110227,7 @@ ${lanes.join("\n")}
109976
110227
  missingOutputFileName: buildInfoPath
109977
110228
  };
109978
110229
  }
109979
- const buildInfo = getBuildInfo2(state, buildInfoPath, resolvedPath, buildInfoTime);
110230
+ const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime);
109980
110231
  if (!buildInfo) {
109981
110232
  return {
109982
110233
  type: 5 /* ErrorReadingFile */,
@@ -109985,7 +110236,7 @@ ${lanes.join("\n")}
109985
110236
  }
109986
110237
  if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== version) {
109987
110238
  return {
109988
- type: 12 /* TsVersionOutputOfDate */,
110239
+ type: 13 /* TsVersionOutputOfDate */,
109989
110240
  version: buildInfo.version
109990
110241
  };
109991
110242
  }
@@ -109996,6 +110247,12 @@ ${lanes.join("\n")}
109996
110247
  buildInfoFile: buildInfoPath
109997
110248
  };
109998
110249
  }
110250
+ if (!project.options.noEmit && getPendingEmitKind(project.options, buildInfo.program.options || {})) {
110251
+ return {
110252
+ type: 9 /* OutOfDateOptions */,
110253
+ buildInfoFile: buildInfoPath
110254
+ };
110255
+ }
109999
110256
  buildInfoProgram = buildInfo.program;
110000
110257
  }
110001
110258
  oldestOutputFileTime = buildInfoTime;
@@ -110020,7 +110277,7 @@ ${lanes.join("\n")}
110020
110277
  buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
110021
110278
  version2 = buildInfoVersionMap.get(toPath2(state, inputFile));
110022
110279
  const text = version2 ? state.readFileWithCache(inputFile) : void 0;
110023
- currentVersion = text && (host.createHash || generateDjb2Hash)(text);
110280
+ currentVersion = text && getSourceFileVersionAsHashFromText(host, text);
110024
110281
  if (version2 && version2 === currentVersion)
110025
110282
  pseudoInputUpToDate = true;
110026
110283
  }
@@ -110117,7 +110374,7 @@ ${lanes.join("\n")}
110117
110374
  };
110118
110375
  }
110119
110376
  return {
110120
- type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 13 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
110377
+ type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 14 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
110121
110378
  newestInputFileTime,
110122
110379
  newestInputFileName,
110123
110380
  oldestOutputFileName
@@ -110236,7 +110493,7 @@ ${lanes.join("\n")}
110236
110493
  }
110237
110494
  break;
110238
110495
  }
110239
- case 13 /* UpToDateWithInputFileText */:
110496
+ case 14 /* UpToDateWithInputFileText */:
110240
110497
  case 2 /* UpToDateWithUpstreamTypes */:
110241
110498
  case 3 /* OutOfDateWithPrepend */:
110242
110499
  if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {
@@ -110247,7 +110504,7 @@ ${lanes.join("\n")}
110247
110504
  });
110248
110505
  }
110249
110506
  break;
110250
- case 10 /* UpstreamBlocked */:
110507
+ case 11 /* UpstreamBlocked */:
110251
110508
  if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {
110252
110509
  clearProjectStatus(state, nextProjectPath);
110253
110510
  }
@@ -110653,6 +110910,13 @@ ${lanes.join("\n")}
110653
110910
  relName(state, configFileName),
110654
110911
  relName(state, status.buildInfoFile)
110655
110912
  );
110913
+ case 9 /* OutOfDateOptions */:
110914
+ return reportStatus(
110915
+ state,
110916
+ Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,
110917
+ relName(state, configFileName),
110918
+ relName(state, status.buildInfoFile)
110919
+ );
110656
110920
  case 1 /* UpToDate */:
110657
110921
  if (status.newestInputFileTime !== void 0) {
110658
110922
  return reportStatus(
@@ -110677,20 +110941,20 @@ ${lanes.join("\n")}
110677
110941
  Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,
110678
110942
  relName(state, configFileName)
110679
110943
  );
110680
- case 13 /* UpToDateWithInputFileText */:
110944
+ case 14 /* UpToDateWithInputFileText */:
110681
110945
  return reportStatus(
110682
110946
  state,
110683
110947
  Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,
110684
110948
  relName(state, configFileName)
110685
110949
  );
110686
- case 9 /* UpstreamOutOfDate */:
110950
+ case 10 /* UpstreamOutOfDate */:
110687
110951
  return reportStatus(
110688
110952
  state,
110689
110953
  Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,
110690
110954
  relName(state, configFileName),
110691
110955
  relName(state, status.upstreamProjectName)
110692
110956
  );
110693
- case 10 /* UpstreamBlocked */:
110957
+ case 11 /* UpstreamBlocked */:
110694
110958
  return reportStatus(
110695
110959
  state,
110696
110960
  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,
@@ -110704,7 +110968,7 @@ ${lanes.join("\n")}
110704
110968
  relName(state, configFileName),
110705
110969
  status.reason
110706
110970
  );
110707
- case 12 /* TsVersionOutputOfDate */:
110971
+ case 13 /* TsVersionOutputOfDate */:
110708
110972
  return reportStatus(
110709
110973
  state,
110710
110974
  Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
@@ -110712,14 +110976,14 @@ ${lanes.join("\n")}
110712
110976
  status.version,
110713
110977
  version
110714
110978
  );
110715
- case 15 /* ForceBuild */:
110979
+ case 16 /* ForceBuild */:
110716
110980
  return reportStatus(
110717
110981
  state,
110718
110982
  Diagnostics.Project_0_is_being_forcibly_rebuilt,
110719
110983
  relName(state, configFileName)
110720
110984
  );
110721
- case 14 /* ContainerOnly */:
110722
- case 11 /* ComputingUpstream */:
110985
+ case 15 /* ContainerOnly */:
110986
+ case 12 /* ComputingUpstream */:
110723
110987
  break;
110724
110988
  default:
110725
110989
  assertType(status);
@@ -111179,6 +111443,7 @@ ${lanes.join("\n")}
111179
111443
  ElementFlags: () => ElementFlags,
111180
111444
  EmitFlags: () => EmitFlags,
111181
111445
  EmitHint: () => EmitHint,
111446
+ EmitOnly: () => EmitOnly,
111182
111447
  EndOfLineState: () => EndOfLineState,
111183
111448
  EnumKind: () => EnumKind,
111184
111449
  ExitStatus: () => ExitStatus,
@@ -111470,6 +111735,7 @@ ${lanes.join("\n")}
111470
111735
  createBindingHelper: () => createBindingHelper,
111471
111736
  createBlock: () => createBlock,
111472
111737
  createBreak: () => createBreak,
111738
+ createBuildInfo: () => createBuildInfo,
111473
111739
  createBuilderProgram: () => createBuilderProgram,
111474
111740
  createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo,
111475
111741
  createBuilderStatusReporter: () => createBuilderStatusReporter,
@@ -111949,6 +112215,7 @@ ${lanes.join("\n")}
111949
112215
  getBuildInfoText: () => getBuildInfoText,
111950
112216
  getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder,
111951
112217
  getBuilderCreationParameters: () => getBuilderCreationParameters,
112218
+ getBuilderFileEmit: () => getBuilderFileEmit,
111952
112219
  getCheckFlags: () => getCheckFlags,
111953
112220
  getClassExtendsHeritageElement: () => getClassExtendsHeritageElement,
111954
112221
  getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol,
@@ -112215,6 +112482,7 @@ ${lanes.join("\n")}
112215
112482
  getPathUpdater: () => getPathUpdater,
112216
112483
  getPathsBasePath: () => getPathsBasePath,
112217
112484
  getPatternFromSpec: () => getPatternFromSpec,
112485
+ getPendingEmitKind: () => getPendingEmitKind,
112218
112486
  getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter,
112219
112487
  getPossibleGenericSignatures: () => getPossibleGenericSignatures,
112220
112488
  getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension,
@@ -112245,9 +112513,12 @@ ${lanes.join("\n")}
112245
112513
  getRenameLocation: () => getRenameLocation,
112246
112514
  getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
112247
112515
  getResolutionDiagnostic: () => getResolutionDiagnostic,
112516
+ getResolutionMode: () => getResolutionMode,
112248
112517
  getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause,
112518
+ getResolutionName: () => getResolutionName,
112249
112519
  getResolvedExternalModuleName: () => getResolvedExternalModuleName,
112250
112520
  getResolvedModule: () => getResolvedModule,
112521
+ getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective,
112251
112522
  getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement,
112252
112523
  getRestParameterElementType: () => getRestParameterElementType,
112253
112524
  getRightMostAssignedExpression: () => getRightMostAssignedExpression,
@@ -112272,6 +112543,7 @@ ${lanes.join("\n")}
112272
112543
  getSourceFileOfNode: () => getSourceFileOfNode,
112273
112544
  getSourceFilePathInNewDir: () => getSourceFilePathInNewDir,
112274
112545
  getSourceFilePathInNewDirWorker: () => getSourceFilePathInNewDirWorker,
112546
+ getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText,
112275
112547
  getSourceFilesToEmit: () => getSourceFilesToEmit,
112276
112548
  getSourceMapRange: () => getSourceMapRange,
112277
112549
  getSourceMapper: () => getSourceMapper,
@@ -112844,6 +113116,7 @@ ${lanes.join("\n")}
112844
113116
  isOmittedExpression: () => isOmittedExpression,
112845
113117
  isOptionalChain: () => isOptionalChain,
112846
113118
  isOptionalChainRoot: () => isOptionalChainRoot,
113119
+ isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag,
112847
113120
  isOptionalTypeNode: () => isOptionalTypeNode,
112848
113121
  isOuterExpression: () => isOuterExpression,
112849
113122
  isOutermostOptionalChain: () => isOutermostOptionalChain,
@@ -113328,6 +113601,8 @@ ${lanes.join("\n")}
113328
113601
  sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics,
113329
113602
  sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions,
113330
113603
  sourceFileMayBeEmitted: () => sourceFileMayBeEmitted,
113604
+ sourceMapCommentRegExp: () => sourceMapCommentRegExp,
113605
+ sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart,
113331
113606
  spacePart: () => spacePart,
113332
113607
  spanMap: () => spanMap,
113333
113608
  spreadArrayHelper: () => spreadArrayHelper,
@@ -113389,11 +113664,12 @@ ${lanes.join("\n")}
113389
113664
  timestamp: () => timestamp,
113390
113665
  toArray: () => toArray,
113391
113666
  toBuilderFileEmit: () => toBuilderFileEmit,
113392
- toBuilderStateFileInfo: () => toBuilderStateFileInfo,
113667
+ toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit,
113393
113668
  toEditorSettings: () => toEditorSettings,
113394
113669
  toFileNameLowerCase: () => toFileNameLowerCase,
113395
113670
  toLowerCase: () => toLowerCase,
113396
113671
  toPath: () => toPath,
113672
+ toProgramEmitPending: () => toProgramEmitPending,
113397
113673
  tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword,
113398
113674
  tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan,
113399
113675
  tokenToString: () => tokenToString,
@@ -113630,6 +113906,7 @@ ${lanes.join("\n")}
113630
113906
  walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions,
113631
113907
  walkUpParenthesizedTypes: () => walkUpParenthesizedTypes,
113632
113908
  walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,
113909
+ whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,
113633
113910
  writeCommentRange: () => writeCommentRange,
113634
113911
  writeFile: () => writeFile,
113635
113912
  writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
@@ -125197,12 +125474,24 @@ ${lanes.join("\n")}
125197
125474
  return transformJSDocFunctionType(node);
125198
125475
  case 180 /* TypeReference */:
125199
125476
  return transformJSDocTypeReference(node);
125477
+ case 325 /* JSDocTypeLiteral */:
125478
+ return transformJSDocTypeLiteral(node);
125200
125479
  default:
125201
125480
  const visited = visitEachChild(node, transformJSDocType, nullTransformationContext);
125202
125481
  setEmitFlags(visited, 1 /* SingleLine */);
125203
125482
  return visited;
125204
125483
  }
125205
125484
  }
125485
+ function transformJSDocTypeLiteral(node) {
125486
+ const typeNode = factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (tag) => factory.createPropertySignature(
125487
+ void 0,
125488
+ isIdentifier(tag.name) ? tag.name : tag.name.right,
125489
+ isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0,
125490
+ tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
125491
+ )));
125492
+ setEmitFlags(typeNode, 1 /* SingleLine */);
125493
+ return typeNode;
125494
+ }
125206
125495
  function transformJSDocOptionalType(node) {
125207
125496
  return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("undefined", emptyArray)]);
125208
125497
  }
@@ -152468,8 +152757,8 @@ ${options.prefix}` : "\n" : options.prefix
152468
152757
  const path = this.toPath(file);
152469
152758
  return !this.isWatchedMissingFile(path) && this.directoryStructureHost.fileExists(file);
152470
152759
  }
152471
- resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, _options, containingSourceFile) {
152472
- return this.resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, containingSourceFile);
152760
+ resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, _options, containingSourceFile, resolutionInfo) {
152761
+ return this.resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, containingSourceFile, resolutionInfo);
152473
152762
  }
152474
152763
  getModuleResolutionCache() {
152475
152764
  return this.resolutionCache.getModuleResolutionCache();
@@ -152477,8 +152766,8 @@ ${options.prefix}` : "\n" : options.prefix
152477
152766
  getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile, resolutionMode) {
152478
152767
  return this.resolutionCache.getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile, resolutionMode);
152479
152768
  }
152480
- resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, _options, containingFileMode) {
152481
- return this.resolutionCache.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode);
152769
+ resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, _options, containingFileMode, resolutionInfo) {
152770
+ return this.resolutionCache.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference, containingFileMode, resolutionInfo);
152482
152771
  }
152483
152772
  directoryExists(path) {
152484
152773
  return this.directoryStructureHost.directoryExists(path);