typescript 5.5.0-dev.20240506 → 5.5.0-dev.20240507

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/lib/tsc.js +265 -155
  2. package/lib/typescript.js +267 -157
  3. package/package.json +2 -2
package/lib/typescript.js CHANGED
@@ -2364,7 +2364,7 @@ module.exports = __toCommonJS(typescript_exports);
2364
2364
 
2365
2365
  // src/compiler/corePublic.ts
2366
2366
  var versionMajorMinor = "5.5";
2367
- var version = `${versionMajorMinor}.0-dev.20240506`;
2367
+ var version = `${versionMajorMinor}.0-dev.20240507`;
2368
2368
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2369
2369
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2370
2370
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6355,7 +6355,7 @@ var FileIncludeKind = /* @__PURE__ */ ((FileIncludeKind2) => {
6355
6355
  return FileIncludeKind2;
6356
6356
  })(FileIncludeKind || {});
6357
6357
  var FilePreprocessingDiagnosticsKind = /* @__PURE__ */ ((FilePreprocessingDiagnosticsKind2) => {
6358
- FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingReferencedDiagnostic"] = 0] = "FilePreprocessingReferencedDiagnostic";
6358
+ FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingLibReferenceDiagnostic"] = 0] = "FilePreprocessingLibReferenceDiagnostic";
6359
6359
  FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingFileExplainingDiagnostic"] = 1] = "FilePreprocessingFileExplainingDiagnostic";
6360
6360
  FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["ResolutionDiagnostics"] = 2] = "ResolutionDiagnostics";
6361
6361
  return FilePreprocessingDiagnosticsKind2;
@@ -67311,7 +67311,7 @@ function createTypeChecker(host) {
67311
67311
  for (let i = 0; i < paramCount; i++) {
67312
67312
  const sourceType = i === restIndex ? getRestOrAnyTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
67313
67313
  const targetType = i === restIndex ? getRestOrAnyTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
67314
- if (sourceType && targetType) {
67314
+ if (sourceType && targetType && (sourceType !== targetType || checkMode & 8 /* StrictArity */)) {
67315
67315
  const sourceSig = checkMode & 3 /* Callback */ || isInstantiatedGenericParameter(source, i) ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
67316
67316
  const targetSig = checkMode & 3 /* Callback */ || isInstantiatedGenericParameter(target, i) ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
67317
67317
  const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && getTypeFacts(sourceType, 50331648 /* IsUndefinedOrNull */) === getTypeFacts(targetType, 50331648 /* IsUndefinedOrNull */);
@@ -119249,13 +119249,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119249
119249
  }
119250
119250
  }
119251
119251
  function emitComputedPropertyName(node) {
119252
- const savedPrivateNameTempFlags = privateNameTempFlags;
119253
- const savedReservedMemberNames = reservedPrivateNames;
119254
- popPrivateNameGenerationScope();
119255
119252
  writePunctuation("[");
119256
119253
  emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName);
119257
119254
  writePunctuation("]");
119258
- pushPrivateNameGenerationScope(savedPrivateNameTempFlags, savedReservedMemberNames);
119259
119255
  }
119260
119256
  function emitTypeParameter(node) {
119261
119257
  emitModifierList(node, node.modifiers);
@@ -119316,15 +119312,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119316
119312
  writeTrailingSemicolon();
119317
119313
  }
119318
119314
  function emitMethodSignature(node) {
119319
- pushNameGenerationScope(node);
119320
119315
  emitModifierList(node, node.modifiers);
119321
119316
  emit(node.name);
119322
119317
  emit(node.questionToken);
119323
- emitTypeParameters(node, node.typeParameters);
119324
- emitParameters(node, node.parameters);
119325
- emitTypeAnnotation(node.type);
119326
- writeTrailingSemicolon();
119327
- popNameGenerationScope(node);
119318
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
119328
119319
  }
119329
119320
  function emitMethodDeclaration(node) {
119330
119321
  emitDecoratorsAndModifiers(
@@ -119336,11 +119327,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119336
119327
  emit(node.asteriskToken);
119337
119328
  emit(node.name);
119338
119329
  emit(node.questionToken);
119339
- emitSignatureAndBody(node, emitSignatureHead);
119330
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
119340
119331
  }
119341
119332
  function emitClassStaticBlockDeclaration(node) {
119342
119333
  writeKeyword("static");
119334
+ pushNameGenerationScope(node);
119343
119335
  emitBlockFunctionBody(node.body);
119336
+ popNameGenerationScope(node);
119344
119337
  }
119345
119338
  function emitConstructor(node) {
119346
119339
  emitDecoratorsAndModifiers(
@@ -119350,7 +119343,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119350
119343
  false
119351
119344
  );
119352
119345
  writeKeyword("constructor");
119353
- emitSignatureAndBody(node, emitSignatureHead);
119346
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
119354
119347
  }
119355
119348
  function emitAccessorDeclaration(node) {
119356
119349
  const pos = emitDecoratorsAndModifiers(
@@ -119363,25 +119356,15 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119363
119356
  emitTokenWithComment(token, pos, writeKeyword, node);
119364
119357
  writeSpace();
119365
119358
  emit(node.name);
119366
- emitSignatureAndBody(node, emitSignatureHead);
119359
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
119367
119360
  }
119368
119361
  function emitCallSignature(node) {
119369
- pushNameGenerationScope(node);
119370
- emitTypeParameters(node, node.typeParameters);
119371
- emitParameters(node, node.parameters);
119372
- emitTypeAnnotation(node.type);
119373
- writeTrailingSemicolon();
119374
- popNameGenerationScope(node);
119362
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
119375
119363
  }
119376
119364
  function emitConstructSignature(node) {
119377
- pushNameGenerationScope(node);
119378
119365
  writeKeyword("new");
119379
119366
  writeSpace();
119380
- emitTypeParameters(node, node.typeParameters);
119381
- emitParameters(node, node.parameters);
119382
- emitTypeAnnotation(node.type);
119383
- writeTrailingSemicolon();
119384
- popNameGenerationScope(node);
119367
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
119385
119368
  }
119386
119369
  function emitIndexSignature(node) {
119387
119370
  emitDecoratorsAndModifiers(
@@ -119419,14 +119402,17 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119419
119402
  emitTypeArguments(node, node.typeArguments);
119420
119403
  }
119421
119404
  function emitFunctionType(node) {
119422
- pushNameGenerationScope(node);
119405
+ emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
119406
+ }
119407
+ function emitFunctionTypeHead(node) {
119423
119408
  emitTypeParameters(node, node.typeParameters);
119424
119409
  emitParametersForArrow(node, node.parameters);
119425
119410
  writeSpace();
119426
119411
  writePunctuation("=>");
119412
+ }
119413
+ function emitFunctionTypeBody(node) {
119427
119414
  writeSpace();
119428
119415
  emit(node.type);
119429
- popNameGenerationScope(node);
119430
119416
  }
119431
119417
  function emitJSDocFunctionType(node) {
119432
119418
  writeKeyword("function");
@@ -119447,17 +119433,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119447
119433
  writePunctuation("=");
119448
119434
  }
119449
119435
  function emitConstructorType(node) {
119450
- pushNameGenerationScope(node);
119451
119436
  emitModifierList(node, node.modifiers);
119452
119437
  writeKeyword("new");
119453
119438
  writeSpace();
119454
- emitTypeParameters(node, node.typeParameters);
119455
- emitParameters(node, node.parameters);
119456
- writeSpace();
119457
- writePunctuation("=>");
119458
- writeSpace();
119459
- emit(node.type);
119460
- popNameGenerationScope(node);
119439
+ emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
119461
119440
  }
119462
119441
  function emitTypeQuery(node) {
119463
119442
  writeKeyword("typeof");
@@ -119466,16 +119445,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119466
119445
  emitTypeArguments(node, node.typeArguments);
119467
119446
  }
119468
119447
  function emitTypeLiteral(node) {
119469
- pushPrivateNameGenerationScope(
119470
- 0 /* Auto */,
119471
- /*newReservedMemberNames*/
119472
- void 0
119473
- );
119448
+ pushNameGenerationScope(node);
119449
+ forEach(node.members, generateMemberNames);
119474
119450
  writePunctuation("{");
119475
119451
  const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineTypeLiteralMembers */ : 32897 /* MultiLineTypeLiteralMembers */;
119476
119452
  emitList(node, node.members, flags | 524288 /* NoSpaceIfEmpty */);
119477
119453
  writePunctuation("}");
119478
- popPrivateNameGenerationScope();
119454
+ popNameGenerationScope(node);
119479
119455
  }
119480
119456
  function emitArrayType(node) {
119481
119457
  emit(node.elementType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType);
@@ -119647,11 +119623,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119647
119623
  emitExpressionList(node, elements, 8914 /* ArrayLiteralExpressionElements */ | preferNewLine, parenthesizer.parenthesizeExpressionForDisallowedComma);
119648
119624
  }
119649
119625
  function emitObjectLiteralExpression(node) {
119650
- pushPrivateNameGenerationScope(
119651
- 0 /* Auto */,
119652
- /*newReservedMemberNames*/
119653
- void 0
119654
- );
119626
+ pushNameGenerationScope(node);
119655
119627
  forEach(node.properties, generateMemberNames);
119656
119628
  const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
119657
119629
  if (indentedFlag) {
@@ -119663,7 +119635,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119663
119635
  if (indentedFlag) {
119664
119636
  decreaseIndent();
119665
119637
  }
119666
- popPrivateNameGenerationScope();
119638
+ popNameGenerationScope(node);
119667
119639
  }
119668
119640
  function emitPropertyAccessExpression(node) {
119669
119641
  emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
@@ -119778,7 +119750,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119778
119750
  }
119779
119751
  function emitArrowFunction(node) {
119780
119752
  emitModifierList(node, node.modifiers);
119781
- emitSignatureAndBody(node, emitArrowFunctionHead);
119753
+ emitSignatureAndBody(node, emitArrowFunctionHead, emitArrowFunctionBody);
119782
119754
  }
119783
119755
  function emitArrowFunctionHead(node) {
119784
119756
  emitTypeParameters(node, node.typeParameters);
@@ -119787,6 +119759,14 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119787
119759
  writeSpace();
119788
119760
  emit(node.equalsGreaterThanToken);
119789
119761
  }
119762
+ function emitArrowFunctionBody(node) {
119763
+ if (isBlock(node.body)) {
119764
+ emitBlockFunctionBody(node.body);
119765
+ } else {
119766
+ writeSpace();
119767
+ emitExpression(node.body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
119768
+ }
119769
+ }
119790
119770
  function emitDeleteExpression(node) {
119791
119771
  emitTokenWithComment(91 /* DeleteKeyword */, node.pos, writeKeyword, node);
119792
119772
  writeSpace();
@@ -120334,35 +120314,33 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120334
120314
  emit(node.asteriskToken);
120335
120315
  writeSpace();
120336
120316
  emitIdentifierName(node.name);
120337
- emitSignatureAndBody(node, emitSignatureHead);
120317
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
120338
120318
  }
120339
- function emitSignatureAndBody(node, emitSignatureHead2) {
120319
+ function emitSignatureAndBody(node, emitSignatureHead2, emitBody) {
120320
+ const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
120321
+ if (indentedFlag) {
120322
+ increaseIndent();
120323
+ }
120324
+ pushNameGenerationScope(node);
120325
+ forEach(node.parameters, generateNames);
120326
+ emitSignatureHead2(node);
120327
+ emitBody(node);
120328
+ popNameGenerationScope(node);
120329
+ if (indentedFlag) {
120330
+ decreaseIndent();
120331
+ }
120332
+ }
120333
+ function emitFunctionBody(node) {
120340
120334
  const body = node.body;
120341
120335
  if (body) {
120342
- if (isBlock(body)) {
120343
- const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
120344
- if (indentedFlag) {
120345
- increaseIndent();
120346
- }
120347
- pushNameGenerationScope(node);
120348
- forEach(node.parameters, generateNames);
120349
- generateNames(node.body);
120350
- emitSignatureHead2(node);
120351
- emitBlockFunctionBody(body);
120352
- popNameGenerationScope(node);
120353
- if (indentedFlag) {
120354
- decreaseIndent();
120355
- }
120356
- } else {
120357
- emitSignatureHead2(node);
120358
- writeSpace();
120359
- emitExpression(body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
120360
- }
120336
+ emitBlockFunctionBody(body);
120361
120337
  } else {
120362
- emitSignatureHead2(node);
120363
120338
  writeTrailingSemicolon();
120364
120339
  }
120365
120340
  }
120341
+ function emitEmptyFunctionBody(_node) {
120342
+ writeTrailingSemicolon();
120343
+ }
120366
120344
  function emitSignatureHead(node) {
120367
120345
  emitTypeParameters(node, node.typeParameters);
120368
120346
  emitParameters(node, node.parameters);
@@ -120391,6 +120369,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120391
120369
  return true;
120392
120370
  }
120393
120371
  function emitBlockFunctionBody(body) {
120372
+ generateNames(body);
120394
120373
  onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(body);
120395
120374
  writeSpace();
120396
120375
  writePunctuation("{");
@@ -120431,12 +120410,6 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120431
120410
  emitClassDeclarationOrExpression(node);
120432
120411
  }
120433
120412
  function emitClassDeclarationOrExpression(node) {
120434
- pushPrivateNameGenerationScope(
120435
- 0 /* Auto */,
120436
- /*newReservedMemberNames*/
120437
- void 0
120438
- );
120439
- forEach(node.members, generateMemberNames);
120440
120413
  emitDecoratorsAndModifiers(
120441
120414
  node,
120442
120415
  node.modifiers,
@@ -120456,19 +120429,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120456
120429
  emitList(node, node.heritageClauses, 0 /* ClassHeritageClauses */);
120457
120430
  writeSpace();
120458
120431
  writePunctuation("{");
120432
+ pushNameGenerationScope(node);
120433
+ forEach(node.members, generateMemberNames);
120459
120434
  emitList(node, node.members, 129 /* ClassMembers */);
120435
+ popNameGenerationScope(node);
120460
120436
  writePunctuation("}");
120461
120437
  if (indentedFlag) {
120462
120438
  decreaseIndent();
120463
120439
  }
120464
- popPrivateNameGenerationScope();
120465
120440
  }
120466
120441
  function emitInterfaceDeclaration(node) {
120467
- pushPrivateNameGenerationScope(
120468
- 0 /* Auto */,
120469
- /*newReservedMemberNames*/
120470
- void 0
120471
- );
120472
120442
  emitDecoratorsAndModifiers(
120473
120443
  node,
120474
120444
  node.modifiers,
@@ -120482,9 +120452,11 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120482
120452
  emitList(node, node.heritageClauses, 512 /* HeritageClauses */);
120483
120453
  writeSpace();
120484
120454
  writePunctuation("{");
120455
+ pushNameGenerationScope(node);
120456
+ forEach(node.members, generateMemberNames);
120485
120457
  emitList(node, node.members, 129 /* InterfaceMembers */);
120458
+ popNameGenerationScope(node);
120486
120459
  writePunctuation("}");
120487
- popPrivateNameGenerationScope();
120488
120460
  }
120489
120461
  function emitTypeAliasDeclaration(node) {
120490
120462
  emitDecoratorsAndModifiers(
@@ -121865,6 +121837,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121865
121837
  return getLiteralText(node, currentSourceFile, flags);
121866
121838
  }
121867
121839
  function pushNameGenerationScope(node) {
121840
+ privateNameTempFlagsStack.push(privateNameTempFlags);
121841
+ privateNameTempFlags = 0 /* Auto */;
121842
+ reservedPrivateNamesStack.push(reservedPrivateNames);
121868
121843
  if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {
121869
121844
  return;
121870
121845
  }
@@ -121875,6 +121850,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121875
121850
  reservedNamesStack.push(reservedNames);
121876
121851
  }
121877
121852
  function popNameGenerationScope(node) {
121853
+ privateNameTempFlags = privateNameTempFlagsStack.pop();
121854
+ reservedPrivateNames = reservedPrivateNamesStack.pop();
121878
121855
  if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {
121879
121856
  return;
121880
121857
  }
@@ -121888,16 +121865,6 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121888
121865
  }
121889
121866
  reservedNames.add(name);
121890
121867
  }
121891
- function pushPrivateNameGenerationScope(newPrivateNameTempFlags, newReservedMemberNames) {
121892
- privateNameTempFlagsStack.push(privateNameTempFlags);
121893
- privateNameTempFlags = newPrivateNameTempFlags;
121894
- reservedPrivateNamesStack.push(reservedNames);
121895
- reservedPrivateNames = newReservedMemberNames;
121896
- }
121897
- function popPrivateNameGenerationScope() {
121898
- privateNameTempFlags = privateNameTempFlagsStack.pop();
121899
- reservedPrivateNames = reservedPrivateNamesStack.pop();
121900
- }
121901
121868
  function reservePrivateNameInNestedScopes(name) {
121902
121869
  if (!reservedPrivateNames || reservedPrivateNames === lastOrUndefined(reservedPrivateNamesStack)) {
121903
121870
  reservedPrivateNames = /* @__PURE__ */ new Set();
@@ -121997,7 +121964,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121997
121964
  case 303 /* PropertyAssignment */:
121998
121965
  case 304 /* ShorthandPropertyAssignment */:
121999
121966
  case 172 /* PropertyDeclaration */:
121967
+ case 171 /* PropertySignature */:
122000
121968
  case 174 /* MethodDeclaration */:
121969
+ case 173 /* MethodSignature */:
122001
121970
  case 177 /* GetAccessor */:
122002
121971
  case 178 /* SetAccessor */:
122003
121972
  generateNameIfNeeded(node.name);
@@ -122031,7 +122000,28 @@ function createPrinter(printerOptions = {}, handlers = {}) {
122031
122000
  return isFileLevelUniqueNameInCurrentFile(name, privateName) && !isReservedName(name, privateName) && !generatedNames.has(name);
122032
122001
  }
122033
122002
  function isReservedName(name, privateName) {
122034
- return privateName ? !!(reservedPrivateNames == null ? void 0 : reservedPrivateNames.has(name)) : !!(reservedNames == null ? void 0 : reservedNames.has(name));
122003
+ let set;
122004
+ let stack;
122005
+ if (privateName) {
122006
+ set = reservedPrivateNames;
122007
+ stack = reservedPrivateNamesStack;
122008
+ } else {
122009
+ set = reservedNames;
122010
+ stack = reservedNamesStack;
122011
+ }
122012
+ if (set == null ? void 0 : set.has(name)) {
122013
+ return true;
122014
+ }
122015
+ for (let i = stack.length - 1; i >= 0; i--) {
122016
+ if (set === stack[i]) {
122017
+ continue;
122018
+ }
122019
+ set = stack[i];
122020
+ if (set == null ? void 0 : set.has(name)) {
122021
+ return true;
122022
+ }
122023
+ }
122024
+ return false;
122035
122025
  }
122036
122026
  function isFileLevelUniqueNameInCurrentFile(name, _isPrivate) {
122037
122027
  return currentSourceFile ? isFileLevelUniqueName(currentSourceFile, name, hasGlobalName) : true;
@@ -123876,10 +123866,12 @@ function getLibraryNameFromLibFileName(libFileName) {
123876
123866
  }
123877
123867
  return "@typescript/lib-" + path;
123878
123868
  }
123869
+ function getLibNameFromLibReference(libReference) {
123870
+ return toFileNameLowerCase(libReference.fileName);
123871
+ }
123879
123872
  function getLibFileNameFromLibReference(libReference) {
123880
- const libName = toFileNameLowerCase(libReference.fileName);
123881
- const libFileName = libMap.get(libName);
123882
- return { libName, libFileName };
123873
+ const libName = getLibNameFromLibReference(libReference);
123874
+ return libMap.get(libName);
123883
123875
  }
123884
123876
  function isReferencedFile(reason) {
123885
123877
  switch (reason == null ? void 0 : reason.kind) {
@@ -124126,6 +124118,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124126
124118
  let classifiableNames;
124127
124119
  const ambientModuleNameToUnmodifiedFileName = /* @__PURE__ */ new Map();
124128
124120
  let fileReasons = createMultiMap();
124121
+ let filesWithReferencesProcessed;
124122
+ let fileReasonsToChain;
124123
+ let reasonToRelatedInfo;
124129
124124
  const cachedBindAndCheckDiagnosticsForFile = {};
124130
124125
  const cachedDeclarationDiagnosticsForFile = {};
124131
124126
  let resolvedTypeReferenceDirectives = createModeAwareCache();
@@ -124157,6 +124152,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124157
124152
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
124158
124153
  const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
124159
124154
  const programDiagnostics = createDiagnosticCollection();
124155
+ let lazyProgramDiagnosticExplainingFile = [];
124160
124156
  const currentDirectory = host.getCurrentDirectory();
124161
124157
  const supportedExtensions = getSupportedExtensions(options);
124162
124158
  const supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
@@ -124363,6 +124359,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124363
124359
  files = stableSort(processingDefaultLibFiles, compareDefaultLibFiles).concat(processingOtherFiles);
124364
124360
  processingDefaultLibFiles = void 0;
124365
124361
  processingOtherFiles = void 0;
124362
+ filesWithReferencesProcessed = void 0;
124366
124363
  }
124367
124364
  if (oldProgram && host.onReleaseOldSourceFile) {
124368
124365
  const oldSourceFiles = oldProgram.getSourceFiles();
@@ -124485,24 +124482,64 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124485
124482
  writeFile: writeFile2
124486
124483
  };
124487
124484
  onProgramCreateComplete();
124488
- fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
124489
- switch (diagnostic.kind) {
124490
- case 1 /* FilePreprocessingFileExplainingDiagnostic */:
124491
- return programDiagnostics.add(createDiagnosticExplainingFile(diagnostic.file && getSourceFileByPath(diagnostic.file), diagnostic.fileProcessingReason, diagnostic.diagnostic, diagnostic.args || emptyArray));
124492
- case 0 /* FilePreprocessingReferencedDiagnostic */:
124493
- const { file, pos, end } = getReferencedFileLocation(program, diagnostic.reason);
124494
- return programDiagnostics.add(createFileDiagnostic(file, Debug.checkDefined(pos), Debug.checkDefined(end) - pos, diagnostic.diagnostic, ...diagnostic.args || emptyArray));
124495
- case 2 /* ResolutionDiagnostics */:
124496
- return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d));
124497
- default:
124498
- Debug.assertNever(diagnostic);
124499
- }
124500
- });
124501
124485
  verifyCompilerOptions();
124502
124486
  mark("afterProgram");
124503
124487
  measure("Program", "beforeProgram", "afterProgram");
124504
124488
  (_p = tracing) == null ? void 0 : _p.pop();
124505
124489
  return program;
124490
+ function updateAndGetProgramDiagnostics() {
124491
+ if (lazyProgramDiagnosticExplainingFile) {
124492
+ fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
124493
+ switch (diagnostic.kind) {
124494
+ case 1 /* FilePreprocessingFileExplainingDiagnostic */:
124495
+ return programDiagnostics.add(
124496
+ createDiagnosticExplainingFile(
124497
+ diagnostic.file && getSourceFileByPath(diagnostic.file),
124498
+ diagnostic.fileProcessingReason,
124499
+ diagnostic.diagnostic,
124500
+ diagnostic.args || emptyArray
124501
+ )
124502
+ );
124503
+ case 0 /* FilePreprocessingLibReferenceDiagnostic */:
124504
+ return programDiagnostics.add(filePreprocessingLibreferenceDiagnostic(diagnostic));
124505
+ case 2 /* ResolutionDiagnostics */:
124506
+ return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d));
124507
+ default:
124508
+ Debug.assertNever(diagnostic);
124509
+ }
124510
+ });
124511
+ lazyProgramDiagnosticExplainingFile.forEach(
124512
+ ({ file, diagnostic, args }) => programDiagnostics.add(
124513
+ createDiagnosticExplainingFile(
124514
+ file,
124515
+ /*fileProcessingReason*/
124516
+ void 0,
124517
+ diagnostic,
124518
+ args
124519
+ )
124520
+ )
124521
+ );
124522
+ lazyProgramDiagnosticExplainingFile = void 0;
124523
+ fileReasonsToChain = void 0;
124524
+ reasonToRelatedInfo = void 0;
124525
+ }
124526
+ return programDiagnostics;
124527
+ }
124528
+ function filePreprocessingLibreferenceDiagnostic({ reason }) {
124529
+ const { file, pos, end } = getReferencedFileLocation(program, reason);
124530
+ const libReference = file.libReferenceDirectives[reason.index];
124531
+ const libName = getLibNameFromLibReference(libReference);
124532
+ const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts");
124533
+ const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity);
124534
+ return createFileDiagnostic(
124535
+ file,
124536
+ Debug.checkDefined(pos),
124537
+ Debug.checkDefined(end) - pos,
124538
+ suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0,
124539
+ libName,
124540
+ suggestion
124541
+ );
124542
+ }
124506
124543
  function getResolvedModule(file, moduleName, mode) {
124507
124544
  var _a2;
124508
124545
  return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode);
@@ -125195,7 +125232,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125195
125232
  if (skipTypeChecking(sourceFile, options, program)) {
125196
125233
  return emptyArray;
125197
125234
  }
125198
- const programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
125235
+ const programDiagnosticsInFile = updateAndGetProgramDiagnostics().getDiagnostics(sourceFile.fileName);
125199
125236
  if (!((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) {
125200
125237
  return programDiagnosticsInFile;
125201
125238
  }
@@ -125542,16 +125579,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125542
125579
  }
125543
125580
  function getOptionsDiagnostics() {
125544
125581
  return sortAndDeduplicateDiagnostics(concatenate(
125545
- programDiagnostics.getGlobalDiagnostics(),
125582
+ updateAndGetProgramDiagnostics().getGlobalDiagnostics(),
125546
125583
  getOptionsDiagnosticsOfConfigFile()
125547
125584
  ));
125548
125585
  }
125549
125586
  function getOptionsDiagnosticsOfConfigFile() {
125550
125587
  if (!options.configFile)
125551
125588
  return emptyArray;
125552
- let diagnostics = programDiagnostics.getDiagnostics(options.configFile.fileName);
125589
+ let diagnostics = updateAndGetProgramDiagnostics().getDiagnostics(options.configFile.fileName);
125553
125590
  forEachResolvedProjectReference2((resolvedRef) => {
125554
- diagnostics = concatenate(diagnostics, programDiagnostics.getDiagnostics(resolvedRef.sourceFile.fileName));
125591
+ diagnostics = concatenate(diagnostics, updateAndGetProgramDiagnostics().getDiagnostics(resolvedRef.sourceFile.fileName));
125555
125592
  });
125556
125593
  return diagnostics;
125557
125594
  }
@@ -125725,7 +125762,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125725
125762
  }
125726
125763
  function getLibFileFromReference(ref) {
125727
125764
  var _a2;
125728
- const { libFileName } = getLibFileNameFromLibReference(ref);
125765
+ const libFileName = getLibFileNameFromLibReference(ref);
125729
125766
  const actualFileName = libFileName && ((_a2 = resolvedLibReferences == null ? void 0 : resolvedLibReferences.get(libFileName)) == null ? void 0 : _a2.actual);
125730
125767
  return actualFileName !== void 0 ? getSourceFile(actualFileName) : void 0;
125731
125768
  }
@@ -125863,8 +125900,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125863
125900
  const originalFileName = fileName;
125864
125901
  if (filesByName.has(path)) {
125865
125902
  const file2 = filesByName.get(path);
125866
- addFileIncludeReason(file2 || void 0, reason);
125867
- if (file2 && !(options.forceConsistentCasingInFileNames === false)) {
125903
+ const addedReason = addFileIncludeReason(
125904
+ file2 || void 0,
125905
+ reason,
125906
+ /*checkExisting*/
125907
+ true
125908
+ );
125909
+ if (file2 && addedReason && !(options.forceConsistentCasingInFileNames === false)) {
125868
125910
  const checkedName = file2.fileName;
125869
125911
  const isRedirect = toPath3(checkedName) !== toPath3(fileName);
125870
125912
  if (isRedirect) {
@@ -125927,7 +125969,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125927
125969
  const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path, toPath3(fileName), originalFileName, sourceFileOptions);
125928
125970
  redirectTargetsMap.add(fileFromPackageId.path, fileName);
125929
125971
  addFileToFilesByName(dupFile, path, fileName, redirectedPath);
125930
- addFileIncludeReason(dupFile, reason);
125972
+ addFileIncludeReason(
125973
+ dupFile,
125974
+ reason,
125975
+ /*checkExisting*/
125976
+ false
125977
+ );
125931
125978
  sourceFileToPackageName.set(path, packageIdToPackageName(packageId));
125932
125979
  processingOtherFiles.push(dupFile);
125933
125980
  return dupFile;
@@ -125945,7 +125992,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125945
125992
  file.originalFileName = originalFileName;
125946
125993
  file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;
125947
125994
  file.packageJsonScope = sourceFileOptions.packageJsonScope;
125948
- addFileIncludeReason(file, reason);
125995
+ addFileIncludeReason(
125996
+ file,
125997
+ reason,
125998
+ /*checkExisting*/
125999
+ false
126000
+ );
125949
126001
  if (host.useCaseSensitiveFileNames()) {
125950
126002
  const pathLowerCase = toFileNameLowerCase(path);
125951
126003
  const existingFile = filesByNameIgnoreCase.get(pathLowerCase);
@@ -125969,12 +126021,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125969
126021
  } else {
125970
126022
  processingOtherFiles.push(file);
125971
126023
  }
126024
+ (filesWithReferencesProcessed ?? (filesWithReferencesProcessed = /* @__PURE__ */ new Set())).add(file.path);
125972
126025
  }
125973
126026
  return file;
125974
126027
  }
125975
- function addFileIncludeReason(file, reason) {
125976
- if (file)
126028
+ function addFileIncludeReason(file, reason, checkExisting) {
126029
+ if (file && (!checkExisting || !isReferencedFile(reason) || !(filesWithReferencesProcessed == null ? void 0 : filesWithReferencesProcessed.has(reason.file)))) {
125977
126030
  fileReasons.add(file.path, reason);
126031
+ return true;
126032
+ }
126033
+ return false;
125978
126034
  }
125979
126035
  function addFileToFilesByName(file, path, fileName, redirectedPath) {
125980
126036
  if (redirectedPath) {
@@ -126204,7 +126260,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126204
126260
  }
126205
126261
  function processLibReferenceDirectives(file) {
126206
126262
  forEach(file.libReferenceDirectives, (libReference, index) => {
126207
- const { libName, libFileName } = getLibFileNameFromLibReference(libReference);
126263
+ const libFileName = getLibFileNameFromLibReference(libReference);
126208
126264
  if (libFileName) {
126209
126265
  processRootFile(
126210
126266
  pathForLibFile(libFileName),
@@ -126215,15 +126271,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126215
126271
  { kind: 7 /* LibReferenceDirective */, file: file.path, index }
126216
126272
  );
126217
126273
  } else {
126218
- const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts");
126219
- const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity);
126220
- const diagnostic = suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0;
126221
- const args = suggestion ? [libName, suggestion] : [libName];
126222
126274
  (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({
126223
- kind: 0 /* FilePreprocessingReferencedDiagnostic */,
126224
- reason: { kind: 7 /* LibReferenceDirective */, file: file.path, index },
126225
- diagnostic,
126226
- args
126275
+ kind: 0 /* FilePreprocessingLibReferenceDiagnostic */,
126276
+ reason: { kind: 7 /* LibReferenceDirective */, file: file.path, index }
126227
126277
  });
126228
126278
  }
126229
126279
  });
@@ -126284,7 +126334,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126284
126334
  if (!sourceFile.isDeclarationFile) {
126285
126335
  const absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
126286
126336
  if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
126287
- addProgramDiagnosticExplainingFile(
126337
+ addLazyProgramDiagnosticExplainingFile(
126288
126338
  sourceFile,
126289
126339
  Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,
126290
126340
  [sourceFile.fileName, rootDirectory]
@@ -126414,7 +126464,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126414
126464
  const rootPaths = new Set(rootNames.map(toPath3));
126415
126465
  for (const file of files) {
126416
126466
  if (sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path)) {
126417
- addProgramDiagnosticExplainingFile(
126467
+ addLazyProgramDiagnosticExplainingFile(
126418
126468
  file,
126419
126469
  Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,
126420
126470
  [file.fileName, options.configFilePath || ""]
@@ -126777,31 +126827,90 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126777
126827
  });
126778
126828
  }
126779
126829
  function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) {
126780
- var _a2;
126830
+ let seenReasons;
126831
+ const reasons = file && fileReasons.get(file.path);
126781
126832
  let fileIncludeReasons;
126782
126833
  let relatedInfo;
126783
126834
  let locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0;
126784
- if (file)
126785
- (_a2 = fileReasons.get(file.path)) == null ? void 0 : _a2.forEach(processReason);
126835
+ let fileIncludeReasonDetails;
126836
+ let redirectInfo;
126837
+ let cachedChain = file && (fileReasonsToChain == null ? void 0 : fileReasonsToChain.get(file.path));
126838
+ let chain;
126839
+ if (cachedChain) {
126840
+ if (cachedChain.fileIncludeReasonDetails) {
126841
+ seenReasons = new Set(reasons);
126842
+ reasons == null ? void 0 : reasons.forEach(populateRelatedInfo);
126843
+ } else {
126844
+ reasons == null ? void 0 : reasons.forEach(processReason);
126845
+ }
126846
+ redirectInfo = cachedChain.redirectInfo;
126847
+ } else {
126848
+ reasons == null ? void 0 : reasons.forEach(processReason);
126849
+ redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, getCompilerOptionsForFile(file));
126850
+ }
126786
126851
  if (fileProcessingReason)
126787
126852
  processReason(fileProcessingReason);
126788
- if (locationReason && (fileIncludeReasons == null ? void 0 : fileIncludeReasons.length) === 1)
126789
- fileIncludeReasons = void 0;
126853
+ const processedExtraReason = (seenReasons == null ? void 0 : seenReasons.size) !== (reasons == null ? void 0 : reasons.length);
126854
+ if (locationReason && (seenReasons == null ? void 0 : seenReasons.size) === 1)
126855
+ seenReasons = void 0;
126856
+ if (seenReasons && cachedChain) {
126857
+ if (cachedChain.details && !processedExtraReason) {
126858
+ chain = chainDiagnosticMessages(cachedChain.details, diagnostic, ...args || emptyArray);
126859
+ } else if (cachedChain.fileIncludeReasonDetails) {
126860
+ if (!processedExtraReason) {
126861
+ if (!cachedFileIncludeDetailsHasProcessedExtraReason()) {
126862
+ fileIncludeReasonDetails = cachedChain.fileIncludeReasonDetails;
126863
+ } else {
126864
+ fileIncludeReasons = cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length);
126865
+ }
126866
+ } else {
126867
+ if (!cachedFileIncludeDetailsHasProcessedExtraReason()) {
126868
+ fileIncludeReasons = [...cachedChain.fileIncludeReasonDetails.next, fileIncludeReasons[0]];
126869
+ } else {
126870
+ fileIncludeReasons = append(cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length), fileIncludeReasons[0]);
126871
+ }
126872
+ }
126873
+ }
126874
+ }
126875
+ if (!chain) {
126876
+ if (!fileIncludeReasonDetails)
126877
+ fileIncludeReasonDetails = seenReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon);
126878
+ chain = chainDiagnosticMessages(
126879
+ redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails,
126880
+ diagnostic,
126881
+ ...args || emptyArray
126882
+ );
126883
+ }
126884
+ if (file) {
126885
+ if (cachedChain) {
126886
+ if (!cachedChain.fileIncludeReasonDetails || !processedExtraReason && fileIncludeReasonDetails) {
126887
+ cachedChain.fileIncludeReasonDetails = fileIncludeReasonDetails;
126888
+ }
126889
+ } else {
126890
+ (fileReasonsToChain ?? (fileReasonsToChain = /* @__PURE__ */ new Map())).set(file.path, cachedChain = { fileIncludeReasonDetails, redirectInfo });
126891
+ }
126892
+ if (!cachedChain.details && !processedExtraReason)
126893
+ cachedChain.details = chain.next;
126894
+ }
126790
126895
  const location = locationReason && getReferencedFileLocation(program, locationReason);
126791
- const fileIncludeReasonDetails = fileIncludeReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon);
126792
- const optionsForFile = file && getCompilerOptionsForFile(file) || options;
126793
- const redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, optionsForFile);
126794
- const chain = chainDiagnosticMessages(redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, diagnostic, ...args || emptyArray);
126795
126896
  return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo);
126796
126897
  function processReason(reason) {
126797
- (fileIncludeReasons || (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason));
126898
+ if (seenReasons == null ? void 0 : seenReasons.has(reason))
126899
+ return;
126900
+ (seenReasons ?? (seenReasons = /* @__PURE__ */ new Set())).add(reason);
126901
+ (fileIncludeReasons ?? (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason));
126902
+ populateRelatedInfo(reason);
126903
+ }
126904
+ function populateRelatedInfo(reason) {
126798
126905
  if (!locationReason && isReferencedFile(reason)) {
126799
126906
  locationReason = reason;
126800
126907
  } else if (locationReason !== reason) {
126801
- relatedInfo = append(relatedInfo, fileIncludeReasonToRelatedInformation(reason));
126908
+ relatedInfo = append(relatedInfo, getFileIncludeReasonToRelatedInformation(reason));
126802
126909
  }
126803
- if (reason === fileProcessingReason)
126804
- fileProcessingReason = void 0;
126910
+ }
126911
+ function cachedFileIncludeDetailsHasProcessedExtraReason() {
126912
+ var _a2;
126913
+ return ((_a2 = cachedChain.fileIncludeReasonDetails.next) == null ? void 0 : _a2.length) !== (reasons == null ? void 0 : reasons.length);
126805
126914
  }
126806
126915
  }
126807
126916
  function addFilePreprocessingFileExplainingDiagnostic(file, fileProcessingReason, diagnostic, args) {
@@ -126813,14 +126922,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126813
126922
  args
126814
126923
  });
126815
126924
  }
126816
- function addProgramDiagnosticExplainingFile(file, diagnostic, args) {
126817
- programDiagnostics.add(createDiagnosticExplainingFile(
126818
- file,
126819
- /*fileProcessingReason*/
126820
- void 0,
126821
- diagnostic,
126822
- args
126823
- ));
126925
+ function addLazyProgramDiagnosticExplainingFile(file, diagnostic, args) {
126926
+ lazyProgramDiagnosticExplainingFile.push({ file, diagnostic, args });
126927
+ }
126928
+ function getFileIncludeReasonToRelatedInformation(reason) {
126929
+ let relatedInfo = reasonToRelatedInfo == null ? void 0 : reasonToRelatedInfo.get(reason);
126930
+ if (relatedInfo === void 0)
126931
+ (reasonToRelatedInfo ?? (reasonToRelatedInfo = /* @__PURE__ */ new Map())).set(reason, relatedInfo = fileIncludeReasonToRelatedInformation(reason) ?? false);
126932
+ return relatedInfo || void 0;
126824
126933
  }
126825
126934
  function fileIncludeReasonToRelatedInformation(reason) {
126826
126935
  if (isReferencedFile(reason)) {
@@ -131121,6 +131230,7 @@ function createWatchProgram(host) {
131121
131230
  });
131122
131231
  parsedConfigs = void 0;
131123
131232
  }
131233
+ builderProgram = void 0;
131124
131234
  }
131125
131235
  function getResolutionCache() {
131126
131236
  return resolutionCache;
@@ -149274,7 +149384,7 @@ var invalidOperationsInSyntacticMode = [
149274
149384
  "findRenameLocations",
149275
149385
  "getApplicableRefactors"
149276
149386
  ];
149277
- function createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()), syntaxOnlyOrLanguageServiceMode) {
149387
+ function createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory(), host.jsDocParsingMode), syntaxOnlyOrLanguageServiceMode) {
149278
149388
  var _a;
149279
149389
  let languageServiceMode;
149280
149390
  if (syntaxOnlyOrLanguageServiceMode === void 0) {