@typescript-deploys/pr-build 5.5.0-pr-58396-2 → 5.5.0-pr-58398-2

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 +487 -402
  2. package/lib/typescript.js +495 -419
  3. package/package.json +1 -1
package/lib/typescript.js CHANGED
@@ -919,8 +919,6 @@ __export(typescript_exports, {
919
919
  getNameOfDeclaration: () => getNameOfDeclaration,
920
920
  getNameOfExpando: () => getNameOfExpando,
921
921
  getNameOfJSDocTypedef: () => getNameOfJSDocTypedef,
922
- getNameOfModuleKind: () => getNameOfModuleKind,
923
- getNameOfModuleResolutionKind: () => getNameOfModuleResolutionKind,
924
922
  getNameOfScriptTarget: () => getNameOfScriptTarget,
925
923
  getNameOrArgument: () => getNameOrArgument,
926
924
  getNameTable: () => getNameTable,
@@ -1929,7 +1927,6 @@ __export(typescript_exports, {
1929
1927
  moduleOptionDeclaration: () => moduleOptionDeclaration,
1930
1928
  moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo,
1931
1929
  moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter,
1932
- moduleResolutionOptionDeclaration: () => moduleResolutionOptionDeclaration,
1933
1930
  moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations,
1934
1931
  moduleResolutionSupportsPackageJsonExportsAndImports: () => moduleResolutionSupportsPackageJsonExportsAndImports,
1935
1932
  moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules,
@@ -1987,6 +1984,7 @@ __export(typescript_exports, {
1987
1984
  or: () => or,
1988
1985
  orderedRemoveItem: () => orderedRemoveItem,
1989
1986
  orderedRemoveItemAt: () => orderedRemoveItemAt,
1987
+ packageIdIsEqual: () => packageIdIsEqual,
1990
1988
  packageIdToPackageName: () => packageIdToPackageName,
1991
1989
  packageIdToString: () => packageIdToString,
1992
1990
  paramHelper: () => paramHelper,
@@ -2366,7 +2364,7 @@ module.exports = __toCommonJS(typescript_exports);
2366
2364
 
2367
2365
  // src/compiler/corePublic.ts
2368
2366
  var versionMajorMinor = "5.5";
2369
- var version = `${versionMajorMinor}.0-insiders.20240501`;
2367
+ var version = `${versionMajorMinor}.0-insiders.20240502`;
2370
2368
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2371
2369
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2372
2370
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6357,7 +6355,7 @@ var FileIncludeKind = /* @__PURE__ */ ((FileIncludeKind2) => {
6357
6355
  return FileIncludeKind2;
6358
6356
  })(FileIncludeKind || {});
6359
6357
  var FilePreprocessingDiagnosticsKind = /* @__PURE__ */ ((FilePreprocessingDiagnosticsKind2) => {
6360
- FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingReferencedDiagnostic"] = 0] = "FilePreprocessingReferencedDiagnostic";
6358
+ FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingLibreferenceDiagnostic"] = 0] = "FilePreprocessingLibreferenceDiagnostic";
6361
6359
  FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingFileExplainingDiagnostic"] = 1] = "FilePreprocessingFileExplainingDiagnostic";
6362
6360
  FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["ResolutionDiagnostics"] = 2] = "ResolutionDiagnostics";
6363
6361
  return FilePreprocessingDiagnosticsKind2;
@@ -6604,8 +6602,7 @@ var CheckFlags = /* @__PURE__ */ ((CheckFlags2) => {
6604
6602
  CheckFlags2[CheckFlags2["Mapped"] = 262144] = "Mapped";
6605
6603
  CheckFlags2[CheckFlags2["StripOptional"] = 524288] = "StripOptional";
6606
6604
  CheckFlags2[CheckFlags2["Unresolved"] = 1048576] = "Unresolved";
6607
- CheckFlags2[CheckFlags2["SyntheticInterface"] = 2097152] = "SyntheticInterface";
6608
- CheckFlags2[CheckFlags2["SyntheticMember"] = 6] = "SyntheticMember";
6605
+ CheckFlags2[CheckFlags2["Synthetic"] = 6] = "Synthetic";
6609
6606
  CheckFlags2[CheckFlags2["Discriminant"] = 192] = "Discriminant";
6610
6607
  CheckFlags2[CheckFlags2["Partial"] = 48] = "Partial";
6611
6608
  return CheckFlags2;
@@ -21209,7 +21206,7 @@ function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) {
21209
21206
  const flags = getCombinedModifierFlags(declaration);
21210
21207
  return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~7 /* AccessibilityModifier */;
21211
21208
  }
21212
- if (getCheckFlags(s) & 6 /* SyntheticMember */) {
21209
+ if (getCheckFlags(s) & 6 /* Synthetic */) {
21213
21210
  const checkFlags = s.links.checkFlags;
21214
21211
  const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 2 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 1 /* Public */ : 4 /* Protected */;
21215
21212
  const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 256 /* Static */ : 0;
@@ -22084,19 +22081,7 @@ function getStrictOptionValue(compilerOptions, flag) {
22084
22081
  return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag];
22085
22082
  }
22086
22083
  function getNameOfScriptTarget(scriptTarget) {
22087
- const entries = [...targetOptionDeclaration.type].reverse();
22088
- return forEach(entries, ([key, value]) => value === scriptTarget ? key : void 0);
22089
- }
22090
- function getNameOfModuleKind(moduleKind) {
22091
- const entries = [...moduleOptionDeclaration.type].reverse();
22092
- return forEach(entries, ([key, value]) => value === moduleKind ? key : void 0);
22093
- }
22094
- function getNameOfModuleResolutionKind(moduleResolution) {
22095
- if (moduleResolution === 2 /* Node10 */) {
22096
- return "node10";
22097
- }
22098
- const entries = [...moduleResolutionOptionDeclaration.type].reverse();
22099
- return forEach(entries, ([key, value]) => value === moduleResolution ? key : void 0);
22084
+ return forEachEntry(targetOptionDeclaration.type, (value, key) => value === scriptTarget ? key : void 0);
22100
22085
  }
22101
22086
  function getEmitStandardClassFields(compilerOptions) {
22102
22087
  return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */;
@@ -40433,25 +40418,6 @@ var moduleOptionDeclaration = {
40433
40418
  description: Diagnostics.Specify_what_module_code_is_generated,
40434
40419
  defaultValueDescription: void 0
40435
40420
  };
40436
- var moduleResolutionOptionDeclaration = {
40437
- name: "moduleResolution",
40438
- type: new Map(Object.entries({
40439
- // N.B. The first entry specifies the value shown in `tsc --init`
40440
- node10: 2 /* Node10 */,
40441
- node: 2 /* Node10 */,
40442
- classic: 1 /* Classic */,
40443
- node16: 3 /* Node16 */,
40444
- nodenext: 99 /* NodeNext */,
40445
- bundler: 100 /* Bundler */
40446
- })),
40447
- deprecatedKeys: /* @__PURE__ */ new Set(["node"]),
40448
- affectsSourceFile: true,
40449
- affectsModuleResolution: true,
40450
- paramType: Diagnostics.STRATEGY,
40451
- category: Diagnostics.Modules,
40452
- description: Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,
40453
- defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node
40454
- };
40455
40421
  var commandOptionsWithoutBuild = [
40456
40422
  // CommandLine only options
40457
40423
  {
@@ -40893,7 +40859,25 @@ var commandOptionsWithoutBuild = [
40893
40859
  defaultValueDescription: false
40894
40860
  },
40895
40861
  // Module Resolution
40896
- moduleResolutionOptionDeclaration,
40862
+ {
40863
+ name: "moduleResolution",
40864
+ type: new Map(Object.entries({
40865
+ // N.B. The first entry specifies the value shown in `tsc --init`
40866
+ node10: 2 /* Node10 */,
40867
+ node: 2 /* Node10 */,
40868
+ classic: 1 /* Classic */,
40869
+ node16: 3 /* Node16 */,
40870
+ nodenext: 99 /* NodeNext */,
40871
+ bundler: 100 /* Bundler */
40872
+ })),
40873
+ deprecatedKeys: /* @__PURE__ */ new Set(["node"]),
40874
+ affectsSourceFile: true,
40875
+ affectsModuleResolution: true,
40876
+ paramType: Diagnostics.STRATEGY,
40877
+ category: Diagnostics.Modules,
40878
+ description: Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,
40879
+ defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node
40880
+ },
40897
40881
  {
40898
40882
  name: "baseUrl",
40899
40883
  type: "string",
@@ -50265,7 +50249,6 @@ function isInstantiatedModule(node, preserveConstEnums) {
50265
50249
  return moduleState === 1 /* Instantiated */ || preserveConstEnums && moduleState === 2 /* ConstEnumOnly */;
50266
50250
  }
50267
50251
  function createTypeChecker(host) {
50268
- var _a;
50269
50252
  var deferredDiagnosticsCallbacks = [];
50270
50253
  var addLazyDiagnostic = (arg) => {
50271
50254
  deferredDiagnosticsCallbacks.push(arg);
@@ -50292,7 +50275,6 @@ function createTypeChecker(host) {
50292
50275
  var compilerOptions = host.getCompilerOptions();
50293
50276
  var languageVersion = getEmitScriptTarget(compilerOptions);
50294
50277
  var moduleKind = getEmitModuleKind(compilerOptions);
50295
- var moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions);
50296
50278
  var legacyDecorators = !!compilerOptions.experimentalDecorators;
50297
50279
  var useDefineForClassFields = getUseDefineForClassFields(compilerOptions);
50298
50280
  var emitStandardClassFields = getEmitStandardClassFields(compilerOptions);
@@ -50305,7 +50287,6 @@ function createTypeChecker(host) {
50305
50287
  var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
50306
50288
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
50307
50289
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
50308
- var noUncheckedIndexedAccess = compilerOptions.noUncheckedIndexedAccess;
50309
50290
  var checkBinaryExpression = createCheckBinaryExpression();
50310
50291
  var emitResolver = createResolver();
50311
50292
  var nodeBuilder = createNodeBuilder();
@@ -51273,32 +51254,6 @@ function createTypeChecker(host) {
51273
51254
  [".jsx", ".jsx"],
51274
51255
  [".json", ".json"]
51275
51256
  ];
51276
- var typeScriptSettingsSymbol = createSymbol(64 /* Interface */, "TypeScriptSettings", 2097152 /* SyntheticInterface */);
51277
- typeScriptSettingsSymbol.declarations = [];
51278
- typeScriptSettingsSymbol.members = createSymbolTable([
51279
- createProperty("version", getStringLiteralType(version), 8 /* Readonly */),
51280
- createProperty("versionMajorMinor", getStringLiteralType(versionMajorMinor), 8 /* Readonly */),
51281
- createProperty("locale", compilerOptions.locale ? getStringLiteralType(compilerOptions.locale) : undefinedType, 8 /* Readonly */),
51282
- createProperty("target", getStringLiteralType(getNameOfScriptTarget(languageVersion) ?? ""), 8 /* Readonly */),
51283
- createProperty("module", getStringLiteralType(getNameOfModuleKind(moduleKind) ?? ""), 8 /* Readonly */),
51284
- createProperty("moduleResolution", getStringLiteralType(getNameOfModuleResolutionKind(moduleResolutionKind) ?? ""), 8 /* Readonly */),
51285
- createProperty("customConditions", createTupleType(
51286
- ((_a = compilerOptions.customConditions) == null ? void 0 : _a.map((cond) => getStringLiteralType(cond))) ?? emptyArray,
51287
- /*elementFlags*/
51288
- void 0,
51289
- /*readonly*/
51290
- true
51291
- ), 8 /* Readonly */),
51292
- createProperty("esModuleInterop", getESModuleInterop(compilerOptions) ? trueType : falseType, 8 /* Readonly */),
51293
- createProperty("exactOptionalPropertyTypes", exactOptionalPropertyTypes ? trueType : falseType, 8 /* Readonly */),
51294
- createProperty("noImplicitAny", noImplicitAny ? trueType : falseType, 8 /* Readonly */),
51295
- createProperty("noUncheckedIndexedAccess", noUncheckedIndexedAccess ? trueType : falseType, 8 /* Readonly */),
51296
- createProperty("strictBindCallApply", strictBindCallApply ? trueType : falseType, 8 /* Readonly */),
51297
- createProperty("strictFunctionTypes", strictFunctionTypes ? trueType : falseType, 8 /* Readonly */),
51298
- createProperty("strictNullChecks", strictNullChecks ? trueType : falseType, 8 /* Readonly */),
51299
- createProperty("useDefineForClassFields", useDefineForClassFields ? trueType : falseType, 8 /* Readonly */)
51300
- ]);
51301
- globals.set(typeScriptSettingsSymbol.escapedName, typeScriptSettingsSymbol);
51302
51257
  initializeTypeChecker();
51303
51258
  return checker;
51304
51259
  function getCachedType(key) {
@@ -51473,8 +51428,8 @@ function createTypeChecker(host) {
51473
51428
  symbol.links.type = type;
51474
51429
  return symbol;
51475
51430
  }
51476
- function createProperty(name, type, checkFlags) {
51477
- const symbol = createSymbol(4 /* Property */, name, checkFlags);
51431
+ function createProperty(name, type) {
51432
+ const symbol = createSymbol(4 /* Property */, name);
51478
51433
  symbol.links.type = type;
51479
51434
  return symbol;
51480
51435
  }
@@ -51656,9 +51611,9 @@ function createTypeChecker(host) {
51656
51611
  });
51657
51612
  }
51658
51613
  function mergeModuleAugmentation(moduleName) {
51659
- var _a2, _b, _c;
51614
+ var _a, _b, _c;
51660
51615
  const moduleAugmentation = moduleName.parent;
51661
- if (((_a2 = moduleAugmentation.symbol.declarations) == null ? void 0 : _a2[0]) !== moduleAugmentation) {
51616
+ if (((_a = moduleAugmentation.symbol.declarations) == null ? void 0 : _a[0]) !== moduleAugmentation) {
51662
51617
  Debug.assert(moduleAugmentation.symbol.declarations.length > 1);
51663
51618
  return;
51664
51619
  }
@@ -51971,7 +51926,7 @@ function createTypeChecker(host) {
51971
51926
  }
51972
51927
  function onSuccessfullyResolvedSymbol(errorLocation, result, meaning, lastLocation, associatedDeclarationForContainingInitializerOrBindingName, withinDeferredContext) {
51973
51928
  addLazyDiagnostic(() => {
51974
- var _a2;
51929
+ var _a;
51975
51930
  const name = result.escapedName;
51976
51931
  const isInExternalModule = lastLocation && isSourceFile(lastLocation) && isExternalOrCommonJsModule(lastLocation);
51977
51932
  if (errorLocation && (meaning & 2 /* BlockScopedVariable */ || (meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 111551 /* Value */) === 111551 /* Value */)) {
@@ -52011,7 +51966,7 @@ function createTypeChecker(host) {
52011
51966
  const isGlobal = getSymbol2(globals, name, meaning) === result;
52012
51967
  const nonValueSymbol = isGlobal && isSourceFile(lastLocation) && lastLocation.locals && getSymbol2(lastLocation.locals, name, ~111551 /* Value */);
52013
51968
  if (nonValueSymbol) {
52014
- const importDecl = (_a2 = nonValueSymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 276 /* ImportSpecifier */ || d.kind === 273 /* ImportClause */ || d.kind === 274 /* NamespaceImport */ || d.kind === 271 /* ImportEqualsDeclaration */);
51969
+ const importDecl = (_a = nonValueSymbol.declarations) == null ? void 0 : _a.find((d) => d.kind === 276 /* ImportSpecifier */ || d.kind === 273 /* ImportClause */ || d.kind === 274 /* NamespaceImport */ || d.kind === 271 /* ImportEqualsDeclaration */);
52015
51970
  if (importDecl && !isTypeOnlyImportDeclaration(importDecl)) {
52016
51971
  error2(importDecl, Diagnostics.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled, unescapeLeadingUnderscores(name));
52017
51972
  }
@@ -52262,12 +52217,12 @@ function createTypeChecker(host) {
52262
52217
  return false;
52263
52218
  }
52264
52219
  function checkResolvedBlockScopedVariable(result, errorLocation) {
52265
- var _a2;
52220
+ var _a;
52266
52221
  Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
52267
52222
  if (result.flags & (16 /* Function */ | 1 /* FunctionScopedVariable */ | 67108864 /* Assignment */) && result.flags & 32 /* Class */) {
52268
52223
  return;
52269
52224
  }
52270
- const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find(
52225
+ const declaration = (_a = result.declarations) == null ? void 0 : _a.find(
52271
52226
  (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */
52272
52227
  );
52273
52228
  if (declaration === void 0)
@@ -52449,14 +52404,14 @@ function createTypeChecker(host) {
52449
52404
  }
52450
52405
  }
52451
52406
  function getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias) {
52452
- var _a2;
52407
+ var _a;
52453
52408
  let exportDefaultSymbol;
52454
52409
  if (isShorthandAmbientModuleSymbol(moduleSymbol)) {
52455
52410
  exportDefaultSymbol = moduleSymbol;
52456
52411
  } else {
52457
52412
  exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias);
52458
52413
  }
52459
- const file = (_a2 = moduleSymbol.declarations) == null ? void 0 : _a2.find(isSourceFile);
52414
+ const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);
52460
52415
  const specifier = getModuleSpecifierForImportOrExport(node);
52461
52416
  if (!specifier) {
52462
52417
  return exportDefaultSymbol;
@@ -52522,8 +52477,8 @@ function createTypeChecker(host) {
52522
52477
  }
52523
52478
  }
52524
52479
  function reportNonDefaultExport(moduleSymbol, node) {
52525
- var _a2, _b, _c;
52526
- if ((_a2 = moduleSymbol.exports) == null ? void 0 : _a2.has(node.symbol.escapedName)) {
52480
+ var _a, _b, _c;
52481
+ if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has(node.symbol.escapedName)) {
52527
52482
  error2(
52528
52483
  node.name,
52529
52484
  Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,
@@ -52536,8 +52491,8 @@ function createTypeChecker(host) {
52536
52491
  if (exportStar) {
52537
52492
  const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find(
52538
52493
  (decl) => {
52539
- var _a3, _b2;
52540
- return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a3 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a3.exports) == null ? void 0 : _b2.has("default" /* Default */)));
52494
+ var _a2, _b2;
52495
+ return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */)));
52541
52496
  }
52542
52497
  );
52543
52498
  if (defaultExport) {
@@ -52604,11 +52559,11 @@ function createTypeChecker(host) {
52604
52559
  return result;
52605
52560
  }
52606
52561
  function getExportOfModule(symbol, name, specifier, dontResolveAlias) {
52607
- var _a2;
52562
+ var _a;
52608
52563
  if (symbol.flags & 1536 /* Module */) {
52609
52564
  const exportSymbol = getExportsOfSymbol(symbol).get(name.escapedText);
52610
52565
  const resolved = resolveSymbol(exportSymbol, dontResolveAlias);
52611
- const exportStarDeclaration = (_a2 = getSymbolLinks(symbol).typeOnlyExportStarMap) == null ? void 0 : _a2.get(name.escapedText);
52566
+ const exportStarDeclaration = (_a = getSymbolLinks(symbol).typeOnlyExportStarMap) == null ? void 0 : _a.get(name.escapedText);
52612
52567
  markSymbolOfAliasDeclarationIfTypeOnly(
52613
52568
  specifier,
52614
52569
  exportSymbol,
@@ -52630,7 +52585,7 @@ function createTypeChecker(host) {
52630
52585
  }
52631
52586
  }
52632
52587
  function getExternalModuleMember(node, specifier, dontResolveAlias = false) {
52633
- var _a2;
52588
+ var _a;
52634
52589
  const moduleSpecifier = getExternalModuleRequireArgument(node) || node.moduleSpecifier;
52635
52590
  const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier);
52636
52591
  const name = !isPropertyAccessExpression(specifier) && specifier.propertyName || specifier.name;
@@ -52664,7 +52619,7 @@ function createTypeChecker(host) {
52664
52619
  symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
52665
52620
  let symbolFromModule = getExportOfModule(targetSymbol, name, specifier, dontResolveAlias);
52666
52621
  if (symbolFromModule === void 0 && name.escapedText === "default" /* Default */) {
52667
- const file = (_a2 = moduleSymbol.declarations) == null ? void 0 : _a2.find(isSourceFile);
52622
+ const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);
52668
52623
  if (isOnlyImportableAsDefault(moduleSpecifier) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) {
52669
52624
  symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
52670
52625
  }
@@ -52678,7 +52633,7 @@ function createTypeChecker(host) {
52678
52633
  }
52679
52634
  }
52680
52635
  function errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name) {
52681
- var _a2;
52636
+ var _a;
52682
52637
  const moduleName = getFullyQualifiedName(moduleSymbol, node);
52683
52638
  const declarationName = declarationNameToString(name);
52684
52639
  const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol);
@@ -52689,7 +52644,7 @@ function createTypeChecker(host) {
52689
52644
  addRelatedInfo(diagnostic, createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName));
52690
52645
  }
52691
52646
  } else {
52692
- if ((_a2 = moduleSymbol.exports) == null ? void 0 : _a2.has("default" /* Default */)) {
52647
+ if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) {
52693
52648
  error2(
52694
52649
  name,
52695
52650
  Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,
@@ -52702,8 +52657,8 @@ function createTypeChecker(host) {
52702
52657
  }
52703
52658
  }
52704
52659
  function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) {
52705
- var _a2, _b;
52706
- const localSymbol = (_b = (_a2 = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a2.locals) == null ? void 0 : _b.get(name.escapedText);
52660
+ var _a, _b;
52661
+ const localSymbol = (_b = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(name.escapedText);
52707
52662
  const exports2 = moduleSymbol.exports;
52708
52663
  if (localSymbol) {
52709
52664
  const exportedEqualsSymbol = exports2 == null ? void 0 : exports2.get("export=" /* ExportEquals */);
@@ -52970,9 +52925,9 @@ function createTypeChecker(host) {
52970
52925
  return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty);
52971
52926
  }
52972
52927
  function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) {
52973
- var _a2;
52928
+ var _a;
52974
52929
  if (target && (aliasDeclarationLinks.typeOnlyDeclaration === void 0 || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) {
52975
- const exportSymbol = ((_a2 = target.exports) == null ? void 0 : _a2.get("export=" /* ExportEquals */)) ?? target;
52930
+ const exportSymbol = ((_a = target.exports) == null ? void 0 : _a.get("export=" /* ExportEquals */)) ?? target;
52976
52931
  const typeOnly = exportSymbol.declarations && find(exportSymbol.declarations, isTypeOnlyImportOrExportDeclaration);
52977
52932
  aliasDeclarationLinks.typeOnlyDeclaration = typeOnly ?? getSymbolLinks(exportSymbol).typeOnlyDeclaration ?? false;
52978
52933
  }
@@ -53269,7 +53224,7 @@ function createTypeChecker(host) {
53269
53224
  return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0;
53270
53225
  }
53271
53226
  function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
53272
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
53227
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
53273
53228
  if (startsWith(moduleReference, "@types/")) {
53274
53229
  const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
53275
53230
  const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
@@ -53284,13 +53239,13 @@ function createTypeChecker(host) {
53284
53239
  return ambientModule;
53285
53240
  }
53286
53241
  const currentSourceFile = getSourceFileOfNode(location);
53287
- const contextSpecifier = isStringLiteralLike(location) ? location : ((_a2 = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a2.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isInJSFile(location) && isJSDocImportTag(location) ? location.moduleSpecifier : void 0) || (isVariableDeclaration(location) && location.initializer && isRequireCall(
53242
+ const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isInJSFile(location) && isJSDocImportTag(location) ? location.moduleSpecifier : void 0) || (isVariableDeclaration(location) && location.initializer && isRequireCall(
53288
53243
  location.initializer,
53289
53244
  /*requireStringLiteralLikeArgument*/
53290
53245
  true
53291
53246
  ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, isImportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression) || ((_f = findAncestor(location, isExportDeclaration)) == null ? void 0 : _f.moduleSpecifier);
53292
53247
  const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) : host.getDefaultResolutionModeForFile(currentSourceFile);
53293
- const moduleResolutionKind2 = getEmitModuleResolutionKind(compilerOptions);
53248
+ const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions);
53294
53249
  const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule;
53295
53250
  const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile);
53296
53251
  const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName);
@@ -53326,7 +53281,7 @@ function createTypeChecker(host) {
53326
53281
  moduleReference
53327
53282
  );
53328
53283
  }
53329
- if (moduleResolutionKind2 === 3 /* Node16 */ || moduleResolutionKind2 === 99 /* NodeNext */) {
53284
+ if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
53330
53285
  const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
53331
53286
  const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
53332
53287
  if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
@@ -53430,8 +53385,8 @@ function createTypeChecker(host) {
53430
53385
  error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);
53431
53386
  } else {
53432
53387
  const isExtensionlessRelativePathImport = pathIsRelative(moduleReference) && !hasExtension(moduleReference);
53433
- const resolutionIsNode16OrNext = moduleResolutionKind2 === 3 /* Node16 */ || moduleResolutionKind2 === 99 /* NodeNext */;
53434
- if (!getResolveJsonModule(compilerOptions) && fileExtensionIs(moduleReference, ".json" /* Json */) && moduleResolutionKind2 !== 1 /* Classic */ && hasJsonModuleEmitEnabled(compilerOptions)) {
53388
+ const resolutionIsNode16OrNext = moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */;
53389
+ if (!getResolveJsonModule(compilerOptions) && fileExtensionIs(moduleReference, ".json" /* Json */) && moduleResolutionKind !== 1 /* Classic */ && hasJsonModuleEmitEnabled(compilerOptions)) {
53435
53390
  error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
53436
53391
  } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
53437
53392
  const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
@@ -53517,7 +53472,7 @@ function createTypeChecker(host) {
53517
53472
  return links.cjsExportMerged = merged;
53518
53473
  }
53519
53474
  function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) {
53520
- var _a2;
53475
+ var _a;
53521
53476
  const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
53522
53477
  if (!dontResolveAlias && symbol) {
53523
53478
  if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 307 /* SourceFile */)) {
@@ -53533,7 +53488,7 @@ function createTypeChecker(host) {
53533
53488
  if (defaultOnlyType) {
53534
53489
  return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent);
53535
53490
  }
53536
- const targetFile = (_a2 = moduleSymbol == null ? void 0 : moduleSymbol.declarations) == null ? void 0 : _a2.find(isSourceFile);
53491
+ const targetFile = (_a = moduleSymbol == null ? void 0 : moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);
53537
53492
  const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getEmitSyntaxForModuleSpecifierExpression(reference), host.getImpliedNodeFormatForEmit(targetFile));
53538
53493
  if (getESModuleInterop(compilerOptions) || isEsmCjsRef) {
53539
53494
  let sigs = getSignaturesOfStructuredType(type, 0 /* Call */);
@@ -53742,8 +53697,8 @@ function createTypeChecker(host) {
53742
53697
  return getMergedSymbol(symbol.parent && getLateBoundSymbol(symbol.parent));
53743
53698
  }
53744
53699
  function getFunctionExpressionParentSymbolOrSymbol(symbol) {
53745
- var _a2, _b;
53746
- return ((_a2 = symbol.valueDeclaration) == null ? void 0 : _a2.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */ ? getSymbolOfNode(symbol.valueDeclaration.parent) || symbol : symbol;
53700
+ var _a, _b;
53701
+ return ((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */ ? getSymbolOfNode(symbol.valueDeclaration.parent) || symbol : symbol;
53747
53702
  }
53748
53703
  function getAlternativeContainingModules(symbol, enclosingDeclaration) {
53749
53704
  const containingFile = getSourceFileOfNode(enclosingDeclaration);
@@ -53897,11 +53852,11 @@ function createTypeChecker(host) {
53897
53852
  return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);
53898
53853
  }
53899
53854
  function createType(flags) {
53900
- var _a2;
53855
+ var _a;
53901
53856
  const result = new Type29(checker, flags);
53902
53857
  typeCount++;
53903
53858
  result.id = typeCount;
53904
- (_a2 = tracing) == null ? void 0 : _a2.recordType(result);
53859
+ (_a = tracing) == null ? void 0 : _a.recordType(result);
53905
53860
  return result;
53906
53861
  }
53907
53862
  function createTypeWithSymbol(flags, symbol) {
@@ -54320,7 +54275,7 @@ function createTypeChecker(host) {
54320
54275
  }
54321
54276
  return { accessibility: 0 /* Accessible */, aliasesToMakeVisible };
54322
54277
  function getIsDeclarationVisible(declaration) {
54323
- var _a2, _b;
54278
+ var _a, _b;
54324
54279
  if (!isDeclarationVisible(declaration)) {
54325
54280
  const anyImportSyntax = getAnyImportSyntax(declaration);
54326
54281
  if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 32 /* Export */) && // import clause without export
@@ -54332,7 +54287,7 @@ function createTypeChecker(host) {
54332
54287
  } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 32 /* Export */) && isDeclarationVisible(declaration.parent)) {
54333
54288
  return addVisibleAlias(declaration, declaration);
54334
54289
  } else if (isBindingElement(declaration)) {
54335
- if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a2 = declaration.parent) == null ? void 0 : _a2.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) {
54290
+ if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) {
54336
54291
  return addVisibleAlias(declaration, declaration.parent.parent.parent.parent);
54337
54292
  } else if (symbol.flags & 2 /* BlockScopedVariable */) {
54338
54293
  const variableStatement = findAncestor(declaration, isVariableStatement);
@@ -54651,7 +54606,7 @@ function createTypeChecker(host) {
54651
54606
  return typeNode;
54652
54607
  }
54653
54608
  function typeToTypeNodeWorker(type, context) {
54654
- var _a2, _b;
54609
+ var _a, _b;
54655
54610
  if (cancellationToken && cancellationToken.throwIfCancellationRequested) {
54656
54611
  cancellationToken.throwIfCancellationRequested();
54657
54612
  }
@@ -54785,7 +54740,7 @@ function createTypeChecker(host) {
54785
54740
  if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) {
54786
54741
  context.encounteredError = true;
54787
54742
  }
54788
- (_b = (_a2 = context.tracker).reportInaccessibleThisError) == null ? void 0 : _b.call(_a2);
54743
+ (_b = (_a = context.tracker).reportInaccessibleThisError) == null ? void 0 : _b.call(_a);
54789
54744
  }
54790
54745
  context.approximateLength += 4;
54791
54746
  return factory.createThisTypeNode();
@@ -54950,9 +54905,9 @@ function createTypeChecker(host) {
54950
54905
  return factory.createConditionalTypeNode(checkTypeNode, extendsTypeNode, trueTypeNode, falseTypeNode);
54951
54906
  }
54952
54907
  function typeToTypeNodeOrCircularityElision(type2) {
54953
- var _a3, _b2, _c;
54908
+ var _a2, _b2, _c;
54954
54909
  if (type2.flags & 1048576 /* Union */) {
54955
- if ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(getTypeId(type2))) {
54910
+ if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(getTypeId(type2))) {
54956
54911
  if (!(context.flags & 131072 /* AllowAnonymousIdentifier */)) {
54957
54912
  context.encounteredError = true;
54958
54913
  (_c = (_b2 = context.tracker) == null ? void 0 : _b2.reportCyclicStructureError) == null ? void 0 : _c.call(_b2);
@@ -54970,13 +54925,13 @@ function createTypeChecker(host) {
54970
54925
  return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2);
54971
54926
  }
54972
54927
  function createMappedTypeNodeFromType(type2) {
54973
- var _a3;
54928
+ var _a2;
54974
54929
  Debug.assert(!!(type2.flags & 524288 /* Object */));
54975
54930
  const readonlyToken = type2.declaration.readonlyToken ? factory.createToken(type2.declaration.readonlyToken.kind) : void 0;
54976
54931
  const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0;
54977
54932
  let appropriateConstraintTypeNode;
54978
54933
  let newTypeVariable;
54979
- const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a3 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a3.flags) & 4194304 /* Index */);
54934
+ const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */);
54980
54935
  if (isMappedTypeWithKeyofConstraintDeclaration(type2)) {
54981
54936
  if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
54982
54937
  const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T"));
@@ -55035,7 +54990,7 @@ function createTypeChecker(host) {
55035
54990
  return result;
55036
54991
  }
55037
54992
  function createAnonymousTypeNode(type2) {
55038
- var _a3, _b2;
54993
+ var _a2, _b2;
55039
54994
  const typeId = type2.id;
55040
54995
  const symbol = type2.symbol;
55041
54996
  if (symbol) {
@@ -55049,7 +55004,7 @@ function createTypeChecker(host) {
55049
55004
  return typeNode;
55050
55005
  }
55051
55006
  }
55052
- if ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId)) {
55007
+ if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(typeId)) {
55053
55008
  return createElidedInformationPlaceholder(context);
55054
55009
  }
55055
55010
  return visitAndTransformType(type2, createTypeNodeFromObjectType);
@@ -55079,19 +55034,19 @@ function createTypeChecker(host) {
55079
55034
  return createTypeNodeFromObjectType(type2);
55080
55035
  }
55081
55036
  function shouldWriteTypeOfFunctionSymbol() {
55082
- var _a4;
55037
+ var _a3;
55083
55038
  const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method
55084
55039
  some(symbol.declarations, (declaration) => isStatic(declaration));
55085
55040
  const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol
55086
55041
  forEach(symbol.declarations, (declaration) => declaration.parent.kind === 307 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */));
55087
55042
  if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
55088
- return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a4 = context.visitedTypes) == null ? void 0 : _a4.has(typeId))) && // it is type of the symbol uses itself recursively
55043
+ return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively
55089
55044
  (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration));
55090
55045
  }
55091
55046
  }
55092
55047
  }
55093
55048
  function visitAndTransformType(type2, transform2) {
55094
- var _a3, _b2, _c;
55049
+ var _a2, _b2, _c;
55095
55050
  const typeId = type2.id;
55096
55051
  const isConstructorObject = getObjectFlags(type2) & 16 /* Anonymous */ && type2.symbol && type2.symbol.flags & 32 /* Class */;
55097
55052
  const id = getObjectFlags(type2) & 4 /* Reference */ && type2.node ? "N" + getNodeId(type2.node) : type2.flags & 16777216 /* Conditional */ ? "N" + getNodeId(type2.root.node) : type2.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type2.symbol) : void 0;
@@ -55106,7 +55061,7 @@ function createTypeChecker(host) {
55106
55061
  if (links) {
55107
55062
  links.serializedTypes || (links.serializedTypes = /* @__PURE__ */ new Map());
55108
55063
  }
55109
- const cachedResult = (_a3 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a3.get(key);
55064
+ const cachedResult = (_a2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a2.get(key);
55110
55065
  if (cachedResult) {
55111
55066
  (_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach(
55112
55067
  ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
@@ -55425,11 +55380,11 @@ function createTypeChecker(host) {
55425
55380
  return factory.createKeywordTypeNode(133 /* AnyKeyword */);
55426
55381
  }
55427
55382
  function shouldUsePlaceholderForProperty(propertySymbol, context) {
55428
- var _a2;
55429
- return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a2 = context.reverseMappedStack) == null ? void 0 : _a2[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
55383
+ var _a;
55384
+ return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
55430
55385
  }
55431
55386
  function addPropertyToElementList(propertySymbol, context, typeElements) {
55432
- var _a2;
55387
+ var _a;
55433
55388
  const propertyIsReverseMapped = !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */);
55434
55389
  const propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ? anyType : getNonMissingTypeOfSymbol(propertySymbol);
55435
55390
  const saveEnclosingDeclaration = context.enclosingDeclaration;
@@ -55451,7 +55406,7 @@ function createTypeChecker(host) {
55451
55406
  context.tracker.reportNonSerializableProperty(symbolToString(propertySymbol));
55452
55407
  }
55453
55408
  }
55454
- context.enclosingDeclaration = propertySymbol.valueDeclaration || ((_a2 = propertySymbol.declarations) == null ? void 0 : _a2[0]) || saveEnclosingDeclaration;
55409
+ context.enclosingDeclaration = propertySymbol.valueDeclaration || ((_a = propertySymbol.declarations) == null ? void 0 : _a[0]) || saveEnclosingDeclaration;
55455
55410
  const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
55456
55411
  context.enclosingDeclaration = saveEnclosingDeclaration;
55457
55412
  context.approximateLength += symbolName(propertySymbol).length + 1;
@@ -55519,8 +55474,8 @@ function createTypeChecker(host) {
55519
55474
  );
55520
55475
  typeElements.push(preserveCommentsOn(propertySignature));
55521
55476
  function preserveCommentsOn(node) {
55522
- var _a3;
55523
- const jsdocPropertyTag = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d) => d.kind === 348 /* JSDocPropertyTag */);
55477
+ var _a2;
55478
+ const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 348 /* JSDocPropertyTag */);
55524
55479
  if (jsdocPropertyTag) {
55525
55480
  const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
55526
55481
  if (commentText) {
@@ -55627,7 +55582,7 @@ function createTypeChecker(host) {
55627
55582
  );
55628
55583
  }
55629
55584
  function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
55630
- var _a2;
55585
+ var _a;
55631
55586
  const flags = context.flags;
55632
55587
  context.flags &= ~256 /* SuppressAnyReturnType */;
55633
55588
  context.approximateLength += 3;
@@ -55717,7 +55672,7 @@ function createTypeChecker(host) {
55717
55672
  if (typeArguments) {
55718
55673
  node.typeArguments = factory.createNodeArray(typeArguments);
55719
55674
  }
55720
- if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 323 /* JSDocSignature */ && signature.declaration.parent.kind === 339 /* JSDocOverloadTag */) {
55675
+ if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 323 /* JSDocSignature */ && signature.declaration.parent.kind === 339 /* JSDocOverloadTag */) {
55721
55676
  const comment = getTextOfNode(
55722
55677
  signature.declaration.parent.parent,
55723
55678
  /*includeTrivia*/
@@ -56049,11 +56004,11 @@ function createTypeChecker(host) {
56049
56004
  return typeParameterNodes;
56050
56005
  }
56051
56006
  function lookupTypeParameterNodes(chain, index, context) {
56052
- var _a2;
56007
+ var _a;
56053
56008
  Debug.assert(chain && 0 <= index && index < chain.length);
56054
56009
  const symbol = chain[index];
56055
56010
  const symbolId = getSymbolId(symbol);
56056
- if ((_a2 = context.typeParameterSymbolList) == null ? void 0 : _a2.has(symbolId)) {
56011
+ if ((_a = context.typeParameterSymbolList) == null ? void 0 : _a.has(symbolId)) {
56057
56012
  return void 0;
56058
56013
  }
56059
56014
  (context.typeParameterSymbolList || (context.typeParameterSymbolList = /* @__PURE__ */ new Set())).add(symbolId);
@@ -56288,7 +56243,7 @@ function createTypeChecker(host) {
56288
56243
  return false;
56289
56244
  }
56290
56245
  function typeParameterToName(type, context) {
56291
- var _a2, _b;
56246
+ var _a, _b;
56292
56247
  if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) {
56293
56248
  const cached = context.typeParameterNames.get(getTypeId(type));
56294
56249
  if (cached) {
@@ -56307,7 +56262,7 @@ function createTypeChecker(host) {
56307
56262
  }
56308
56263
  if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
56309
56264
  const rawtext = result.escapedText;
56310
- let i = ((_a2 = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _a2.get(rawtext)) || 0;
56265
+ let i = ((_a = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _a.get(rawtext)) || 0;
56311
56266
  let text = rawtext;
56312
56267
  while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
56313
56268
  i++;
@@ -56483,7 +56438,7 @@ function createTypeChecker(host) {
56483
56438
  return enclosingDeclaration;
56484
56439
  }
56485
56440
  function serializeTypeForDeclaration(context, declaration, type, symbol) {
56486
- var _a2;
56441
+ var _a;
56487
56442
  const addUndefined = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration);
56488
56443
  const enclosingDeclaration = context.enclosingDeclaration;
56489
56444
  if (!isErrorType(type) && enclosingDeclaration) {
@@ -56500,7 +56455,7 @@ function createTypeChecker(host) {
56500
56455
  if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)))) {
56501
56456
  context.flags |= 1048576 /* AllowUniqueESSymbolType */;
56502
56457
  }
56503
- const decl = declaration ?? symbol.valueDeclaration ?? ((_a2 = symbol.declarations) == null ? void 0 : _a2[0]);
56458
+ const decl = declaration ?? symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);
56504
56459
  const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : void 0;
56505
56460
  if (decl && hasInferredType(decl) && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) {
56506
56461
  syntacticNodeBuilder.serializeTypeOfDeclaration(decl, context);
@@ -56861,7 +56816,7 @@ function createTypeChecker(host) {
56861
56816
  }
56862
56817
  }
56863
56818
  function symbolTableToDeclarationStatements(symbolTable, context) {
56864
- var _a2;
56819
+ var _a;
56865
56820
  const serializePropertySymbolForClass = makeSerializePropertySymbol(
56866
56821
  factory.createPropertyDeclaration,
56867
56822
  174 /* MethodDeclaration */,
@@ -56883,14 +56838,14 @@ function createTypeChecker(host) {
56883
56838
  ...oldcontext,
56884
56839
  usedSymbolNames: new Set(oldcontext.usedSymbolNames),
56885
56840
  remappedSymbolNames: /* @__PURE__ */ new Map(),
56886
- remappedSymbolReferences: new Map((_a2 = oldcontext.remappedSymbolReferences) == null ? void 0 : _a2.entries()),
56841
+ remappedSymbolReferences: new Map((_a = oldcontext.remappedSymbolReferences) == null ? void 0 : _a.entries()),
56887
56842
  tracker: void 0
56888
56843
  };
56889
56844
  const tracker = {
56890
56845
  ...oldcontext.tracker.inner,
56891
56846
  trackSymbol: (sym, decl, meaning) => {
56892
- var _a3, _b;
56893
- if ((_a3 = context.remappedSymbolNames) == null ? void 0 : _a3.has(getSymbolId(sym)))
56847
+ var _a2, _b;
56848
+ if ((_a2 = context.remappedSymbolNames) == null ? void 0 : _a2.has(getSymbolId(sym)))
56894
56849
  return false;
56895
56850
  const accessibleResult = isSymbolAccessible(
56896
56851
  sym,
@@ -57125,7 +57080,7 @@ function createTypeChecker(host) {
57125
57080
  }
57126
57081
  }
57127
57082
  function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) {
57128
- var _a3, _b, _c, _d, _e, _f;
57083
+ var _a2, _b, _c, _d, _e, _f;
57129
57084
  const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName);
57130
57085
  const isDefault = escapedSymbolName === "default" /* Default */;
57131
57086
  if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) {
@@ -57156,7 +57111,7 @@ function createTypeChecker(host) {
57156
57111
  } else {
57157
57112
  const type = getTypeOfSymbol(symbol);
57158
57113
  const localName = getInternalSymbolName(symbol, symbolName2);
57159
- if (type.symbol && type.symbol !== symbol && type.symbol.flags & 16 /* Function */ && some(type.symbol.declarations, isFunctionExpressionOrArrowFunction) && (((_a3 = type.symbol.members) == null ? void 0 : _a3.size) || ((_b = type.symbol.exports) == null ? void 0 : _b.size))) {
57114
+ if (type.symbol && type.symbol !== symbol && type.symbol.flags & 16 /* Function */ && some(type.symbol.declarations, isFunctionExpressionOrArrowFunction) && (((_a2 = type.symbol.members) == null ? void 0 : _a2.size) || ((_b = type.symbol.exports) == null ? void 0 : _b.size))) {
57160
57115
  if (!context.remappedSymbolReferences) {
57161
57116
  context.remappedSymbolReferences = /* @__PURE__ */ new Map();
57162
57117
  }
@@ -57335,11 +57290,11 @@ function createTypeChecker(host) {
57335
57290
  results.push(node);
57336
57291
  }
57337
57292
  function serializeTypeAlias(symbol, symbolName2, modifierFlags) {
57338
- var _a3;
57293
+ var _a2;
57339
57294
  const aliasType = getDeclaredTypeOfTypeAlias(symbol);
57340
57295
  const typeParams = getSymbolLinks(symbol).typeParameters;
57341
57296
  const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context));
57342
- const jsdocAliasDecl = (_a3 = symbol.declarations) == null ? void 0 : _a3.find(isJSDocTypeAlias);
57297
+ const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias);
57343
57298
  const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0);
57344
57299
  const oldFlags = context.flags;
57345
57300
  context.flags |= 8388608 /* InTypeAlias */;
@@ -57426,12 +57381,12 @@ function createTypeChecker(host) {
57426
57381
  /*isTypeOnly*/
57427
57382
  false,
57428
57383
  factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== "export=" /* ExportEquals */), (s) => {
57429
- var _a3, _b;
57384
+ var _a2, _b;
57430
57385
  const name = unescapeLeadingUnderscores(s.escapedName);
57431
57386
  const localName2 = getInternalSymbolName(s, name);
57432
57387
  const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s);
57433
57388
  if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) {
57434
- (_b = (_a3 = context.tracker) == null ? void 0 : _a3.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a3, containingFile, symbol, s);
57389
+ (_b = (_a2 = context.tracker) == null ? void 0 : _a2.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a2, containingFile, symbol, s);
57435
57390
  return void 0;
57436
57391
  }
57437
57392
  const target = aliasDecl && getTargetOfAliasDeclaration(
@@ -57597,8 +57552,8 @@ function createTypeChecker(host) {
57597
57552
  return void 0;
57598
57553
  }
57599
57554
  function serializeAsClass(symbol, localName, modifierFlags) {
57600
- var _a3, _b;
57601
- const originalDecl = (_a3 = symbol.declarations) == null ? void 0 : _a3.find(isClassLike);
57555
+ var _a2, _b;
57556
+ const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike);
57602
57557
  const oldEnclosing = context.enclosingDeclaration;
57603
57558
  context.enclosingDeclaration = originalDecl || oldEnclosing;
57604
57559
  const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
@@ -57695,7 +57650,7 @@ function createTypeChecker(host) {
57695
57650
  });
57696
57651
  }
57697
57652
  function serializeAsAlias(symbol, localName, modifierFlags) {
57698
- var _a3, _b, _c, _d, _e, _f;
57653
+ var _a2, _b, _c, _d, _e, _f;
57699
57654
  const node = getDeclarationOfAliasSymbol(symbol);
57700
57655
  if (!node)
57701
57656
  return Debug.fail();
@@ -57715,7 +57670,7 @@ function createTypeChecker(host) {
57715
57670
  includePrivateSymbol(target);
57716
57671
  switch (node.kind) {
57717
57672
  case 208 /* BindingElement */:
57718
- if (((_b = (_a3 = node.parent) == null ? void 0 : _a3.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) {
57673
+ if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) {
57719
57674
  const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context);
57720
57675
  const { propertyName } = node;
57721
57676
  addResult(
@@ -57938,7 +57893,7 @@ function createTypeChecker(host) {
57938
57893
  );
57939
57894
  }
57940
57895
  function serializeMaybeAliasAssignment(symbol) {
57941
- var _a3;
57896
+ var _a2;
57942
57897
  if (symbol.flags & 4194304 /* Prototype */) {
57943
57898
  return false;
57944
57899
  }
@@ -58011,7 +57966,7 @@ function createTypeChecker(host) {
58011
57966
  if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) {
58012
57967
  serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 32 /* Export */);
58013
57968
  } else {
58014
- const flags = ((_a3 = context.enclosingDeclaration) == null ? void 0 : _a3.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;
57969
+ const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;
58015
57970
  const statement = factory.createVariableStatement(
58016
57971
  /*modifiers*/
58017
57972
  void 0,
@@ -58051,9 +58006,9 @@ function createTypeChecker(host) {
58051
58006
  }
58052
58007
  }
58053
58008
  function isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, hostSymbol) {
58054
- var _a3;
58009
+ var _a2;
58055
58010
  const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
58056
- return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !some((_a3 = typeToSerialize.symbol) == null ? void 0 : _a3.declarations, isTypeNode) && // If the type comes straight from a type node, we shouldn't try to break it up
58011
+ return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !some((_a2 = typeToSerialize.symbol) == null ? void 0 : _a2.declarations, isTypeNode) && // If the type comes straight from a type node, we shouldn't try to break it up
58057
58012
  !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
58058
58013
  !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK
58059
58014
  !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {
@@ -58068,7 +58023,7 @@ function createTypeChecker(host) {
58068
58023
  }
58069
58024
  function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
58070
58025
  return function serializePropertySymbol(p, isStatic2, baseType) {
58071
- var _a3, _b, _c, _d, _e;
58026
+ var _a2, _b, _c, _d, _e;
58072
58027
  const modifierFlags = getDeclarationModifierFlagsFromSymbol(p);
58073
58028
  const isPrivate = !!(modifierFlags & 2 /* Private */);
58074
58029
  if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) {
@@ -58079,7 +58034,7 @@ function createTypeChecker(host) {
58079
58034
  }
58080
58035
  const flag = modifierFlags & ~1024 /* Async */ | (isStatic2 ? 256 /* Static */ : 0);
58081
58036
  const name = getPropertyNameNodeForSymbol(p, context);
58082
- const firstPropertyLikeDecl = (_a3 = p.declarations) == null ? void 0 : _a3.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
58037
+ const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
58083
58038
  if (p.flags & 98304 /* Accessor */ && useAccessors) {
58084
58039
  const result = [];
58085
58040
  if (p.flags & 65536 /* SetAccessor */) {
@@ -58348,7 +58303,7 @@ function createTypeChecker(host) {
58348
58303
  }
58349
58304
  }
58350
58305
  function getUnusedName(input, symbol) {
58351
- var _a3, _b;
58306
+ var _a2, _b;
58352
58307
  const id = symbol ? getSymbolId(symbol) : void 0;
58353
58308
  if (id) {
58354
58309
  if (context.remappedSymbolNames.has(id)) {
@@ -58360,7 +58315,7 @@ function createTypeChecker(host) {
58360
58315
  }
58361
58316
  let i = 0;
58362
58317
  const original = input;
58363
- while ((_a3 = context.usedSymbolNames) == null ? void 0 : _a3.has(input)) {
58318
+ while ((_a2 = context.usedSymbolNames) == null ? void 0 : _a2.has(input)) {
58364
58319
  i++;
58365
58320
  input = `${original}_${i}`;
58366
58321
  }
@@ -58484,8 +58439,8 @@ function createTypeChecker(host) {
58484
58439
  }
58485
58440
  }
58486
58441
  function getNameOfSymbolAsWritten(symbol, context) {
58487
- var _a2;
58488
- if ((_a2 = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a2.has(getSymbolId(symbol))) {
58442
+ var _a;
58443
+ if ((_a = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a.has(getSymbolId(symbol))) {
58489
58444
  symbol = context.remappedSymbolReferences.get(getSymbolId(symbol));
58490
58445
  }
58491
58446
  if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default`
@@ -58743,9 +58698,9 @@ function createTypeChecker(host) {
58743
58698
  return prop ? getTypeOfSymbol(prop) : void 0;
58744
58699
  }
58745
58700
  function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
58746
- var _a2;
58701
+ var _a;
58747
58702
  let propType;
58748
- return getTypeOfPropertyOfType(type, name) || (propType = (_a2 = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a2.type) && addOptionality(
58703
+ return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality(
58749
58704
  propType,
58750
58705
  /*isProperty*/
58751
58706
  true,
@@ -59233,14 +59188,14 @@ function createTypeChecker(host) {
59233
59188
  return widened;
59234
59189
  }
59235
59190
  function getJSContainerObjectType(decl, symbol, init) {
59236
- var _a2, _b;
59191
+ var _a, _b;
59237
59192
  if (!isInJSFile(decl) || !init || !isObjectLiteralExpression(init) || init.properties.length) {
59238
59193
  return void 0;
59239
59194
  }
59240
59195
  const exports2 = createSymbolTable();
59241
59196
  while (isBinaryExpression(decl) || isPropertyAccessExpression(decl)) {
59242
59197
  const s2 = getSymbolOfNode(decl);
59243
- if ((_a2 = s2 == null ? void 0 : s2.exports) == null ? void 0 : _a2.size) {
59198
+ if ((_a = s2 == null ? void 0 : s2.exports) == null ? void 0 : _a.size) {
59244
59199
  mergeSymbolTable(exports2, s2.exports);
59245
59200
  }
59246
59201
  decl = isBinaryExpression(decl) ? decl.parent : decl.parent.parent;
@@ -59254,7 +59209,7 @@ function createTypeChecker(host) {
59254
59209
  return type;
59255
59210
  }
59256
59211
  function getAnnotatedTypeForAssignmentDeclaration(declaredType, expression, symbol, declaration) {
59257
- var _a2;
59212
+ var _a;
59258
59213
  const typeNode = getEffectiveTypeAnnotationNode(expression.parent);
59259
59214
  if (typeNode) {
59260
59215
  const type = getWidenedType(getTypeFromTypeNode(typeNode));
@@ -59270,7 +59225,7 @@ function createTypeChecker(host) {
59270
59225
  );
59271
59226
  }
59272
59227
  }
59273
- if ((_a2 = symbol.parent) == null ? void 0 : _a2.valueDeclaration) {
59228
+ if ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) {
59274
59229
  const possiblyAnnotatedSymbol = getFunctionExpressionParentSymbolOrSymbol(symbol.parent);
59275
59230
  if (possiblyAnnotatedSymbol.valueDeclaration) {
59276
59231
  const typeNode2 = getEffectiveTypeAnnotationNode(possiblyAnnotatedSymbol.valueDeclaration);
@@ -59324,13 +59279,13 @@ function createTypeChecker(host) {
59324
59279
  resolvedSymbol.exports = createSymbolTable();
59325
59280
  }
59326
59281
  (resolvedSymbol || symbol).exports.forEach((s, name) => {
59327
- var _a2;
59282
+ var _a;
59328
59283
  const exportedMember = members.get(name);
59329
59284
  if (exportedMember && exportedMember !== s && !(s.flags & 2097152 /* Alias */)) {
59330
59285
  if (s.flags & 111551 /* Value */ && exportedMember.flags & 111551 /* Value */) {
59331
59286
  if (s.valueDeclaration && exportedMember.valueDeclaration && getSourceFileOfNode(s.valueDeclaration) !== getSourceFileOfNode(exportedMember.valueDeclaration)) {
59332
59287
  const unescapedName = unescapeLeadingUnderscores(s.escapedName);
59333
- const exportedMemberName = ((_a2 = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a2.name) || exportedMember.valueDeclaration;
59288
+ const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration;
59334
59289
  addRelatedInfo(
59335
59290
  error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName),
59336
59291
  createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName)
@@ -60003,11 +59958,8 @@ function createTypeChecker(host) {
60003
59958
  }
60004
59959
  }
60005
59960
  function getOuterTypeParametersOfClassOrInterface(symbol) {
60006
- var _a2;
60007
- if (getCheckFlags(symbol) & 2097152 /* SyntheticInterface */) {
60008
- return void 0;
60009
- }
60010
- const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a2 = symbol.declarations) == null ? void 0 : _a2.find((decl) => {
59961
+ var _a;
59962
+ const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => {
60011
59963
  if (decl.kind === 264 /* InterfaceDeclaration */) {
60012
59964
  return true;
60013
59965
  }
@@ -60328,13 +60280,13 @@ function createTypeChecker(host) {
60328
60280
  return links.declaredType;
60329
60281
  }
60330
60282
  function getDeclaredTypeOfTypeAlias(symbol) {
60331
- var _a2;
60283
+ var _a;
60332
60284
  const links = getSymbolLinks(symbol);
60333
60285
  if (!links.declaredType) {
60334
60286
  if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) {
60335
60287
  return errorType;
60336
60288
  }
60337
- const declaration = Debug.checkDefined((_a2 = symbol.declarations) == null ? void 0 : _a2.find(isTypeAlias), "Type alias symbol with no valid declaration found");
60289
+ const declaration = Debug.checkDefined((_a = symbol.declarations) == null ? void 0 : _a.find(isTypeAlias), "Type alias symbol with no valid declaration found");
60338
60290
  const typeNode = isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type;
60339
60291
  let type = typeNode ? getTypeFromTypeNode(typeNode) : errorType;
60340
60292
  if (popTypeResolution()) {
@@ -61233,8 +61185,8 @@ function createTypeChecker(host) {
61233
61185
  if (symbol === globalThisSymbol) {
61234
61186
  const varsOnly = /* @__PURE__ */ new Map();
61235
61187
  members.forEach((p) => {
61236
- var _a2;
61237
- if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a2 = p.declarations) == null ? void 0 : _a2.length) && every(p.declarations, isAmbientModule))) {
61188
+ var _a;
61189
+ if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) {
61238
61190
  varsOnly.set(p.escapedName, p);
61239
61191
  }
61240
61192
  });
@@ -61470,7 +61422,7 @@ function createTypeChecker(host) {
61470
61422
  }
61471
61423
  }
61472
61424
  function getTypeOfMappedSymbol(symbol) {
61473
- var _a2;
61425
+ var _a;
61474
61426
  if (!symbol.links.type) {
61475
61427
  const mappedType = symbol.links.mappedType;
61476
61428
  if (!pushTypeResolution(symbol, 0 /* Type */)) {
@@ -61489,7 +61441,7 @@ function createTypeChecker(host) {
61489
61441
  error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
61490
61442
  type = errorType;
61491
61443
  }
61492
- (_a2 = symbol.links).type ?? (_a2.type = type);
61444
+ (_a = symbol.links).type ?? (_a.type = type);
61493
61445
  }
61494
61446
  return symbol.links.type;
61495
61447
  }
@@ -61688,8 +61640,8 @@ function createTypeChecker(host) {
61688
61640
  return !!typeVariable && isConstTypeVariable(typeVariable, depth);
61689
61641
  }
61690
61642
  function isConstTypeVariable(type, depth = 0) {
61691
- var _a2;
61692
- return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 4096 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || getObjectFlags(type) & 32 /* Mapped */ && isConstMappedType(type, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
61643
+ var _a;
61644
+ return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 4096 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || getObjectFlags(type) & 32 /* Mapped */ && isConstMappedType(type, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
61693
61645
  }
61694
61646
  function getConstraintOfIndexedAccess(type) {
61695
61647
  return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
@@ -61980,7 +61932,7 @@ function createTypeChecker(host) {
61980
61932
  return getReducedType(getApparentType(getReducedType(type)));
61981
61933
  }
61982
61934
  function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) {
61983
- var _a2, _b, _c;
61935
+ var _a, _b, _c;
61984
61936
  let singleProp;
61985
61937
  let propSet;
61986
61938
  let indexTypes;
@@ -62048,7 +62000,7 @@ function createTypeChecker(host) {
62048
62000
  }
62049
62001
  if (!propSet && !(checkFlags & 16 /* ReadPartial */) && !indexTypes) {
62050
62002
  if (mergedInstantiations) {
62051
- const links = (_a2 = tryCast(singleProp, isTransientSymbol)) == null ? void 0 : _a2.links;
62003
+ const links = (_a = tryCast(singleProp, isTransientSymbol)) == null ? void 0 : _a.links;
62052
62004
  const clone2 = createSymbolWithType(singleProp, links == null ? void 0 : links.type);
62053
62005
  clone2.parent = (_c = (_b = singleProp.valueDeclaration) == null ? void 0 : _b.symbol) == null ? void 0 : _c.parent;
62054
62006
  clone2.links.containingType = containingType;
@@ -62119,8 +62071,8 @@ function createTypeChecker(host) {
62119
62071
  return result;
62120
62072
  }
62121
62073
  function getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment) {
62122
- var _a2, _b, _c;
62123
- let property = skipObjectFunctionPropertyAugment ? (_a2 = type.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : _a2.get(name) : (_b = type.propertyCache) == null ? void 0 : _b.get(name);
62074
+ var _a, _b, _c;
62075
+ let property = skipObjectFunctionPropertyAugment ? (_a = type.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : _a.get(name) : (_b = type.propertyCache) == null ? void 0 : _b.get(name);
62124
62076
  if (!property) {
62125
62077
  property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
62126
62078
  if (property) {
@@ -62221,12 +62173,12 @@ function createTypeChecker(host) {
62221
62173
  return errorInfo;
62222
62174
  }
62223
62175
  function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) {
62224
- var _a2, _b;
62176
+ var _a, _b;
62225
62177
  type = getReducedApparentType(type);
62226
62178
  if (type.flags & 524288 /* Object */) {
62227
62179
  const resolved = resolveStructuredTypeMembers(type);
62228
62180
  const symbol = resolved.members.get(name);
62229
- if (symbol && !includeTypeOnlyMembers && ((_a2 = type.symbol) == null ? void 0 : _a2.flags) & 512 /* ValueModule */ && ((_b = getSymbolLinks(type.symbol).typeOnlyExportStarMap) == null ? void 0 : _b.has(name))) {
62181
+ if (symbol && !includeTypeOnlyMembers && ((_a = type.symbol) == null ? void 0 : _a.flags) & 512 /* ValueModule */ && ((_b = getSymbolLinks(type.symbol).typeOnlyExportStarMap) == null ? void 0 : _b.has(name))) {
62230
62182
  return void 0;
62231
62183
  }
62232
62184
  if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {
@@ -62278,8 +62230,8 @@ function createTypeChecker(host) {
62278
62230
  }
62279
62231
  let memberName;
62280
62232
  if (everyType(type, (t) => {
62281
- var _a2;
62282
- return !!((_a2 = t.symbol) == null ? void 0 : _a2.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
62233
+ var _a;
62234
+ return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
62283
62235
  })) {
62284
62236
  const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
62285
62237
  const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
@@ -62343,8 +62295,8 @@ function createTypeChecker(host) {
62343
62295
  return findIndexInfo(getIndexInfosOfType(type), keyType);
62344
62296
  }
62345
62297
  function getIndexTypeOfType(type, keyType) {
62346
- var _a2;
62347
- return (_a2 = getIndexInfoOfType(type, keyType)) == null ? void 0 : _a2.type;
62298
+ var _a;
62299
+ return (_a = getIndexInfoOfType(type, keyType)) == null ? void 0 : _a.type;
62348
62300
  }
62349
62301
  function getApplicableIndexInfos(type, keyType) {
62350
62302
  return getIndexInfosOfType(type).filter((info) => isApplicableIndexType(keyType, info.keyType));
@@ -62356,12 +62308,12 @@ function createTypeChecker(host) {
62356
62308
  return getApplicableIndexInfo(type, isLateBoundName(name) ? esSymbolType : getStringLiteralType(unescapeLeadingUnderscores(name)));
62357
62309
  }
62358
62310
  function getTypeParametersFromDeclaration(declaration) {
62359
- var _a2;
62311
+ var _a;
62360
62312
  let result;
62361
62313
  for (const node of getEffectiveTypeParameterDeclarations(declaration)) {
62362
62314
  result = appendIfUnique(result, getDeclaredTypeOfTypeParameter(node.symbol));
62363
62315
  }
62364
- return (result == null ? void 0 : result.length) ? result : isFunctionDeclaration(declaration) ? (_a2 = getSignatureOfTypeTag(declaration)) == null ? void 0 : _a2.typeParameters : void 0;
62316
+ return (result == null ? void 0 : result.length) ? result : isFunctionDeclaration(declaration) ? (_a = getSignatureOfTypeTag(declaration)) == null ? void 0 : _a.typeParameters : void 0;
62365
62317
  }
62366
62318
  function symbolsToArray(symbols) {
62367
62319
  const result = [];
@@ -62848,9 +62800,9 @@ function createTypeChecker(host) {
62848
62800
  return signature;
62849
62801
  }
62850
62802
  function getOrCreateTypeFromSignature(signature, outerTypeParameters) {
62851
- var _a2;
62803
+ var _a;
62852
62804
  if (!signature.isolatedSignatureType) {
62853
- const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind;
62805
+ const kind = (_a = signature.declaration) == null ? void 0 : _a.kind;
62854
62806
  const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */;
62855
62807
  const type = createObjectType(16 /* Anonymous */ | 134217728 /* SingleSignatureType */, createSymbol(16 /* Function */, "__function" /* Function */));
62856
62808
  if (signature.declaration && !nodeIsSynthesized(signature.declaration)) {
@@ -62911,9 +62863,9 @@ function createTypeChecker(host) {
62911
62863
  return mapDefined(filter(type.symbol && type.symbol.declarations, isTypeParameterDeclaration), getEffectiveConstraintOfTypeParameter)[0];
62912
62864
  }
62913
62865
  function getInferredTypeParameterConstraint(typeParameter, omitTypeReferences) {
62914
- var _a2;
62866
+ var _a;
62915
62867
  let inferences;
62916
- if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) {
62868
+ if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) {
62917
62869
  for (const declaration of typeParameter.symbol.declarations) {
62918
62870
  if (declaration.parent.kind === 195 /* InferType */) {
62919
62871
  const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent);
@@ -63054,10 +63006,10 @@ function createTypeChecker(host) {
63054
63006
  return type;
63055
63007
  }
63056
63008
  function getTypeArguments(type) {
63057
- var _a2, _b;
63009
+ var _a, _b;
63058
63010
  if (!type.resolvedTypeArguments) {
63059
63011
  if (!pushTypeResolution(type, 6 /* ResolvedTypeArguments */)) {
63060
- return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray;
63012
+ return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray;
63061
63013
  }
63062
63014
  const node = type.node;
63063
63015
  const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);
@@ -63188,8 +63140,8 @@ function createTypeChecker(host) {
63188
63140
  return checkNoTypeArguments(node, symbol) ? type : errorType;
63189
63141
  }
63190
63142
  function isLocalTypeAlias(symbol) {
63191
- var _a2;
63192
- const declaration = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isTypeAlias);
63143
+ var _a;
63144
+ const declaration = (_a = symbol.declarations) == null ? void 0 : _a.find(isTypeAlias);
63193
63145
  return !!(declaration && getContainingFunction(declaration));
63194
63146
  }
63195
63147
  function getTypeReferenceName(node) {
@@ -64026,7 +63978,7 @@ function createTypeChecker(host) {
64026
63978
  return target.objectFlags & 8 /* Tuple */ ? createNormalizedTupleType(target, typeArguments) : createTypeReference(target, typeArguments);
64027
63979
  }
64028
63980
  function createNormalizedTupleType(target, elementTypes) {
64029
- var _a2, _b, _c, _d;
63981
+ var _a, _b, _c, _d;
64030
63982
  if (!(target.combinedFlags & 14 /* NonRequired */)) {
64031
63983
  return createTypeReference(target, elementTypes);
64032
63984
  }
@@ -64047,7 +63999,7 @@ function createTypeChecker(host) {
64047
63999
  const flags = target.elementFlags[i];
64048
64000
  if (flags & 8 /* Variadic */) {
64049
64001
  if (type.flags & 1 /* Any */) {
64050
- addElement(type, 4 /* Rest */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
64002
+ addElement(type, 4 /* Rest */, (_a = target.labeledElementDeclarations) == null ? void 0 : _a[i]);
64051
64003
  } else if (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type)) {
64052
64004
  addElement(type, 8 /* Variadic */, (_b = target.labeledElementDeclarations) == null ? void 0 : _b[i]);
64053
64005
  } else if (isTupleType(type)) {
@@ -64060,8 +64012,8 @@ function createTypeChecker(host) {
64060
64012
  return errorType;
64061
64013
  }
64062
64014
  forEach(elements, (t, n) => {
64063
- var _a3;
64064
- return addElement(t, type.target.elementFlags[n], (_a3 = type.target.labeledElementDeclarations) == null ? void 0 : _a3[n]);
64015
+ var _a2;
64016
+ return addElement(t, type.target.elementFlags[n], (_a2 = type.target.labeledElementDeclarations) == null ? void 0 : _a2[n]);
64065
64017
  });
64066
64018
  } else {
64067
64019
  addElement(isArrayLikeType(type) && getIndexTypeOfType(type, numberType) || errorType, 4 /* Rest */, (_c = target.labeledElementDeclarations) == null ? void 0 : _c[i]);
@@ -64185,7 +64137,7 @@ function createTypeChecker(host) {
64185
64137
  return includes;
64186
64138
  }
64187
64139
  function removeSubtypes(types, hasObjectTypes) {
64188
- var _a2;
64140
+ var _a;
64189
64141
  if (types.length < 2) {
64190
64142
  return types;
64191
64143
  }
@@ -64215,7 +64167,7 @@ function createTypeChecker(host) {
64215
64167
  if (count === 1e5) {
64216
64168
  const estimatedCount = count / (len - i) * len;
64217
64169
  if (estimatedCount > 1e6) {
64218
- (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: types.map((t) => t.id) });
64170
+ (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: types.map((t) => t.id) });
64219
64171
  error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);
64220
64172
  return void 0;
64221
64173
  }
@@ -64680,10 +64632,10 @@ function createTypeChecker(host) {
64680
64632
  return reduceLeft(types, (n, t) => t.flags & 1048576 /* Union */ ? n * t.types.length : t.flags & 131072 /* Never */ ? 0 : n, 1);
64681
64633
  }
64682
64634
  function checkCrossProductUnion(types) {
64683
- var _a2;
64635
+ var _a;
64684
64636
  const size = getCrossProductUnionSize(types);
64685
64637
  if (size >= 1e5) {
64686
- (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: types.map((t) => t.id), size });
64638
+ (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: types.map((t) => t.id), size });
64687
64639
  error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);
64688
64640
  return false;
64689
64641
  }
@@ -64871,7 +64823,7 @@ function createTypeChecker(host) {
64871
64823
  return links.resolvedType;
64872
64824
  }
64873
64825
  function getTemplateLiteralType(texts, types) {
64874
- var _a2, _b;
64826
+ var _a, _b;
64875
64827
  const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
64876
64828
  if (unionIndex >= 0) {
64877
64829
  return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
@@ -64879,7 +64831,7 @@ function createTypeChecker(host) {
64879
64831
  if (contains(types, wildcardType)) {
64880
64832
  return wildcardType;
64881
64833
  }
64882
- if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a2 = types[0].symbol) == null ? void 0 : _a2.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
64834
+ if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
64883
64835
  return types[0];
64884
64836
  }
64885
64837
  const newTypes = [];
@@ -65383,7 +65335,7 @@ function createTypeChecker(host) {
65383
65335
  if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) {
65384
65336
  indexType = stringType;
65385
65337
  }
65386
- if (noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */)
65338
+ if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */)
65387
65339
  accessFlags |= 1 /* IncludeUndefined */;
65388
65340
  if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) {
65389
65341
  if (objectType.flags & 3 /* AnyOrUnknown */) {
@@ -65631,7 +65583,7 @@ function createTypeChecker(host) {
65631
65583
  }
65632
65584
  }
65633
65585
  function getTypeFromImportTypeNode(node) {
65634
- var _a2;
65586
+ var _a;
65635
65587
  const links = getNodeLinks(node);
65636
65588
  if (!links.resolvedType) {
65637
65589
  if (!isLiteralImportTypeNode(node)) {
@@ -65645,7 +65597,7 @@ function createTypeChecker(host) {
65645
65597
  links.resolvedSymbol = unknownSymbol;
65646
65598
  return links.resolvedType = errorType;
65647
65599
  }
65648
- const isExportEquals = !!((_a2 = innerModuleSymbol.exports) == null ? void 0 : _a2.get("export=" /* ExportEquals */));
65600
+ const isExportEquals = !!((_a = innerModuleSymbol.exports) == null ? void 0 : _a.get("export=" /* ExportEquals */));
65649
65601
  const moduleSymbol = resolveExternalModuleSymbol(
65650
65602
  innerModuleSymbol,
65651
65603
  /*dontResolveAlias*/
@@ -65850,8 +65802,8 @@ function createTypeChecker(host) {
65850
65802
  return spread;
65851
65803
  }
65852
65804
  function isSpreadableProperty(prop) {
65853
- var _a2;
65854
- return !some(prop.declarations, isPrivateIdentifierClassElementDeclaration) && (!(prop.flags & (8192 /* Method */ | 32768 /* GetAccessor */ | 65536 /* SetAccessor */)) || !((_a2 = prop.declarations) == null ? void 0 : _a2.some((decl) => isClassLike(decl.parent))));
65805
+ var _a;
65806
+ return !some(prop.declarations, isPrivateIdentifierClassElementDeclaration) && (!(prop.flags & (8192 /* Method */ | 32768 /* GetAccessor */ | 65536 /* SetAccessor */)) || !((_a = prop.declarations) == null ? void 0 : _a.some((decl) => isClassLike(decl.parent))));
65855
65807
  }
65856
65808
  function getSpreadSymbol(prop, readonly) {
65857
65809
  const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
@@ -66493,12 +66445,12 @@ function createTypeChecker(host) {
66493
66445
  ) : type;
66494
66446
  }
66495
66447
  function instantiateTypeWithAlias(type, mapper, aliasSymbol, aliasTypeArguments) {
66496
- var _a2;
66448
+ var _a;
66497
66449
  if (!couldContainTypeVariables(type)) {
66498
66450
  return type;
66499
66451
  }
66500
66452
  if (instantiationDepth === 100 || instantiationCount >= 5e6) {
66501
- (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount });
66453
+ (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount });
66502
66454
  error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
66503
66455
  return errorType;
66504
66456
  }
@@ -67672,7 +67624,7 @@ function createTypeChecker(host) {
67672
67624
  return elements !== normalizedElements ? createNormalizedTupleType(type.target, normalizedElements) : type;
67673
67625
  }
67674
67626
  function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) {
67675
- var _a2;
67627
+ var _a;
67676
67628
  let errorInfo;
67677
67629
  let relatedInfo;
67678
67630
  let maybeKeys;
@@ -67712,7 +67664,7 @@ function createTypeChecker(host) {
67712
67664
  false
67713
67665
  );
67714
67666
  relation.set(id, 4 /* Reported */ | 2 /* Failed */);
67715
- (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth });
67667
+ (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth });
67716
67668
  const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1;
67717
67669
  const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target));
67718
67670
  if (errorOutputContainer) {
@@ -68087,7 +68039,7 @@ function createTypeChecker(host) {
68087
68039
  return 0 /* False */;
68088
68040
  }
68089
68041
  function reportErrorResults(originalSource, originalTarget, source2, target2, headMessage2) {
68090
- var _a3, _b;
68042
+ var _a2, _b;
68091
68043
  const sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);
68092
68044
  const targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);
68093
68045
  source2 = originalSource.aliasSymbol || sourceHasBase ? originalSource : source2;
@@ -68137,7 +68089,7 @@ function createTypeChecker(host) {
68137
68089
  return;
68138
68090
  }
68139
68091
  reportRelationError(headMessage2, source2, target2);
68140
- if (source2.flags & 262144 /* TypeParameter */ && ((_b = (_a3 = source2.symbol) == null ? void 0 : _a3.declarations) == null ? void 0 : _b[0]) && !getConstraintOfType(source2)) {
68092
+ if (source2.flags & 262144 /* TypeParameter */ && ((_b = (_a2 = source2.symbol) == null ? void 0 : _a2.declarations) == null ? void 0 : _b[0]) && !getConstraintOfType(source2)) {
68141
68093
  const syntheticParam = cloneTypeParameter(source2);
68142
68094
  syntheticParam.constraint = instantiateType(target2, makeUnaryTypeMapper(source2, syntheticParam));
68143
68095
  if (hasNonCircularBaseConstraint(syntheticParam)) {
@@ -68172,10 +68124,10 @@ function createTypeChecker(host) {
68172
68124
  }
68173
68125
  function getTypeOfPropertyInTypes(types, name) {
68174
68126
  const appendPropType = (propTypes, type) => {
68175
- var _a3;
68127
+ var _a2;
68176
68128
  type = getApparentType(type);
68177
68129
  const prop = type.flags & 3145728 /* UnionOrIntersection */ ? getPropertyOfUnionOrIntersectionType(type, name) : getPropertyOfObjectType(type, name);
68178
- const propType = prop && getTypeOfSymbol(prop) || ((_a3 = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a3.type) || undefinedType;
68130
+ const propType = prop && getTypeOfSymbol(prop) || ((_a2 = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a2.type) || undefinedType;
68179
68131
  return append(propTypes, propType);
68180
68132
  };
68181
68133
  return getUnionType(reduceLeft(
@@ -68186,7 +68138,7 @@ function createTypeChecker(host) {
68186
68138
  ) || emptyArray);
68187
68139
  }
68188
68140
  function hasExcessProperties(source2, target2, reportErrors2) {
68189
- var _a3;
68141
+ var _a2;
68190
68142
  if (!isExcessPropertyCheckTarget(target2) || !noImplicitAny && getObjectFlags(target2) & 4096 /* JSLiteral */) {
68191
68143
  return false;
68192
68144
  }
@@ -68220,7 +68172,7 @@ function createTypeChecker(host) {
68220
68172
  reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName, typeToString(errorTarget));
68221
68173
  }
68222
68174
  } else {
68223
- const objectLiteralDeclaration = ((_a3 = source2.symbol) == null ? void 0 : _a3.declarations) && firstOrUndefined(source2.symbol.declarations);
68175
+ const objectLiteralDeclaration = ((_a2 = source2.symbol) == null ? void 0 : _a2.declarations) && firstOrUndefined(source2.symbol.declarations);
68224
68176
  let suggestion;
68225
68177
  if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, (d) => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) {
68226
68178
  const propDeclaration = prop.valueDeclaration;
@@ -68560,7 +68512,7 @@ function createTypeChecker(host) {
68560
68512
  return result2;
68561
68513
  }
68562
68514
  function recursiveTypeRelatedTo(source2, target2, reportErrors2, intersectionState, recursionFlags) {
68563
- var _a3, _b, _c;
68515
+ var _a2, _b, _c;
68564
68516
  if (overflow) {
68565
68517
  return 0 /* False */;
68566
68518
  }
@@ -68645,7 +68597,7 @@ function createTypeChecker(host) {
68645
68597
  }
68646
68598
  let result2;
68647
68599
  if (expandingFlags === 3 /* Both */) {
68648
- (_a3 = tracing) == null ? void 0 : _a3.instant(tracing.Phase.CheckTypes, "recursiveTypeRelatedTo_DepthLimit", {
68600
+ (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "recursiveTypeRelatedTo_DepthLimit", {
68649
68601
  sourceId: source2.id,
68650
68602
  sourceIdStack: sourceStack.map((t) => t.id),
68651
68603
  targetId: target2.id,
@@ -69326,7 +69278,7 @@ function createTypeChecker(host) {
69326
69278
  return 0 /* False */;
69327
69279
  }
69328
69280
  function typeRelatedToDiscriminatedType(source2, target2) {
69329
- var _a3;
69281
+ var _a2;
69330
69282
  const sourceProperties = getPropertiesOfType(source2);
69331
69283
  const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target2);
69332
69284
  if (!sourcePropertiesFiltered)
@@ -69335,7 +69287,7 @@ function createTypeChecker(host) {
69335
69287
  for (const sourceProperty of sourcePropertiesFiltered) {
69336
69288
  numCombinations *= countTypes(getNonMissingTypeOfSymbol(sourceProperty));
69337
69289
  if (numCombinations > 25) {
69338
- (_a3 = tracing) == null ? void 0 : _a3.instant(tracing.Phase.CheckTypes, "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: source2.id, targetId: target2.id, numCombinations });
69290
+ (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: source2.id, targetId: target2.id, numCombinations });
69339
69291
  return 0 /* False */;
69340
69292
  }
69341
69293
  }
@@ -69742,7 +69694,7 @@ function createTypeChecker(host) {
69742
69694
  return result2;
69743
69695
  }
69744
69696
  function signaturesRelatedTo(source2, target2, kind, reportErrors2, intersectionState) {
69745
- var _a3, _b;
69697
+ var _a2, _b;
69746
69698
  if (relation === identityRelation) {
69747
69699
  return signaturesIdenticalTo(source2, target2, kind);
69748
69700
  }
@@ -69798,7 +69750,7 @@ function createTypeChecker(host) {
69798
69750
  const sourceSignature = first(sourceSignatures);
69799
69751
  const targetSignature = first(targetSignatures);
69800
69752
  result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature));
69801
- if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) {
69753
+ if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) {
69802
69754
  const constructSignatureToString = (signature) => signatureToString(
69803
69755
  signature,
69804
69756
  /*enclosingDeclaration*/
@@ -70116,10 +70068,10 @@ function createTypeChecker(host) {
70116
70068
  return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters);
70117
70069
  }
70118
70070
  function getVariancesWorker(symbol, typeParameters = emptyArray) {
70119
- var _a2, _b;
70071
+ var _a, _b;
70120
70072
  const links = getSymbolLinks(symbol);
70121
70073
  if (!links.variances) {
70122
- (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.CheckTypes, "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });
70074
+ (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });
70123
70075
  const oldVarianceComputation = inVarianceComputation;
70124
70076
  const saveResolutionStart = resolutionStart;
70125
70077
  if (!inVarianceComputation) {
@@ -70177,8 +70129,8 @@ function createTypeChecker(host) {
70177
70129
  return markerTypes.has(getTypeId(type));
70178
70130
  }
70179
70131
  function getTypeParameterModifiers(tp) {
70180
- var _a2;
70181
- return reduceLeft((_a2 = tp.symbol) == null ? void 0 : _a2.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (8192 /* In */ | 16384 /* Out */ | 4096 /* Const */);
70132
+ var _a;
70133
+ return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (8192 /* In */ | 16384 /* Out */ | 4096 /* Const */);
70182
70134
  }
70183
70135
  function hasCovariantVoidArgument(typeArguments, variances) {
70184
70136
  for (let i = 0; i < variances.length; i++) {
@@ -70236,7 +70188,7 @@ function createTypeChecker(host) {
70236
70188
  return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ? getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) : `${source.id},${target.id}${postFix}`;
70237
70189
  }
70238
70190
  function forEachProperty2(prop, callback) {
70239
- if (getCheckFlags(prop) & 6 /* SyntheticMember */) {
70191
+ if (getCheckFlags(prop) & 6 /* Synthetic */) {
70240
70192
  for (const t of prop.links.containingType.types) {
70241
70193
  const p = getPropertyOfType(t, prop.escapedName);
70242
70194
  const result = p && forEachProperty2(p, callback);
@@ -70534,7 +70486,7 @@ function createTypeChecker(host) {
70534
70486
  return propType;
70535
70487
  }
70536
70488
  if (everyType(type, isTupleType)) {
70537
- return getTupleElementTypeOutOfStartCount(type, index, noUncheckedIndexedAccess ? undefinedType : void 0);
70489
+ return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0);
70538
70490
  }
70539
70491
  return void 0;
70540
70492
  }
@@ -71853,7 +71805,7 @@ function createTypeChecker(host) {
71853
71805
  inferFromTypes(sourceNameType, targetNameType);
71854
71806
  }
71855
71807
  function inferFromObjectTypes(source, target) {
71856
- var _a2, _b;
71808
+ var _a, _b;
71857
71809
  if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) {
71858
71810
  inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));
71859
71811
  return;
@@ -71900,7 +71852,7 @@ function createTypeChecker(host) {
71900
71852
  inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
71901
71853
  }
71902
71854
  } else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) {
71903
- const param = (_a2 = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _a2.typeParameter;
71855
+ const param = (_a = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _a.typeParameter;
71904
71856
  const constraint = param && getBaseConstraintOfType(param);
71905
71857
  if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) {
71906
71858
  const impliedArity = constraint.target.fixedLength;
@@ -72387,8 +72339,8 @@ function createTypeChecker(host) {
72387
72339
  return unionType.keyPropertyName.length ? unionType.keyPropertyName : void 0;
72388
72340
  }
72389
72341
  function getConstituentTypeForKeyType(unionType, keyType) {
72390
- var _a2;
72391
- const result = (_a2 = unionType.constituentMap) == null ? void 0 : _a2.get(getTypeId(getRegularTypeOfLiteralType(keyType)));
72342
+ var _a;
72343
+ const result = (_a = unionType.constituentMap) == null ? void 0 : _a.get(getTypeId(getRegularTypeOfLiteralType(keyType)));
72392
72344
  return result !== unknownType ? result : void 0;
72393
72345
  }
72394
72346
  function getMatchingUnionConstituentForType(unionType, type) {
@@ -72572,12 +72524,12 @@ function createTypeChecker(host) {
72572
72524
  return defaultExpression ? getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) : type;
72573
72525
  }
72574
72526
  function getTypeOfDestructuredProperty(type, name) {
72575
- var _a2;
72527
+ var _a;
72576
72528
  const nameType = getLiteralTypeFromPropertyName(name);
72577
72529
  if (!isTypeUsableAsPropertyName(nameType))
72578
72530
  return errorType;
72579
72531
  const text = getPropertyNameFromType(nameType);
72580
- return getTypeOfPropertyOfType(type, text) || includeUndefinedInIndexSignature((_a2 = getApplicableIndexInfoForName(type, text)) == null ? void 0 : _a2.type) || errorType;
72532
+ return getTypeOfPropertyOfType(type, text) || includeUndefinedInIndexSignature((_a = getApplicableIndexInfoForName(type, text)) == null ? void 0 : _a.type) || errorType;
72581
72533
  }
72582
72534
  function getTypeOfDestructuredArrayElement(type, index) {
72583
72535
  return everyType(type, isTupleLikeType) && getTupleElementType(type, index) || includeUndefinedInIndexSignature(checkIteratedTypeOrElementType(
@@ -72591,7 +72543,7 @@ function createTypeChecker(host) {
72591
72543
  function includeUndefinedInIndexSignature(type) {
72592
72544
  if (!type)
72593
72545
  return type;
72594
- return noUncheckedIndexedAccess ? getUnionType([type, missingType]) : type;
72546
+ return compilerOptions.noUncheckedIndexedAccess ? getUnionType([type, missingType]) : type;
72595
72547
  }
72596
72548
  function getTypeOfDestructuredSpreadExpression(type) {
72597
72549
  return createArrayType(checkIteratedTypeOrElementType(
@@ -73154,7 +73106,7 @@ function createTypeChecker(host) {
73154
73106
  }
73155
73107
  return false;
73156
73108
  }
73157
- function getFlowTypeOfReference(reference, declaredType, initialType = declaredType, flowContainer, flowNode = ((_b) => (_b = tryCast(reference, canHaveFlowNode)) == null ? void 0 : _b.flowNode)()) {
73109
+ function getFlowTypeOfReference(reference, declaredType, initialType = declaredType, flowContainer, flowNode = ((_a) => (_a = tryCast(reference, canHaveFlowNode)) == null ? void 0 : _a.flowNode)()) {
73158
73110
  let key;
73159
73111
  let isKeySet = false;
73160
73112
  let flowDepth = 0;
@@ -74416,7 +74368,7 @@ function createTypeChecker(host) {
74416
74368
  }
74417
74369
  }
74418
74370
  function getNarrowedTypeOfSymbol(symbol, location, checkMode) {
74419
- var _a2;
74371
+ var _a;
74420
74372
  const type = getTypeOfSymbol(symbol, checkMode);
74421
74373
  const declaration = symbol.valueDeclaration;
74422
74374
  if (declaration) {
@@ -74458,7 +74410,7 @@ function createTypeChecker(host) {
74458
74410
  if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
74459
74411
  const contextualSignature = getContextualSignature(func);
74460
74412
  if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
74461
- const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
74413
+ const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a = getInferenceContext(func)) == null ? void 0 : _a.nonFixingMapper));
74462
74414
  if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !some(func.parameters, isSomeSymbolAssigned)) {
74463
74415
  const narrowedType = getFlowTypeOfReference(
74464
74416
  func,
@@ -74610,7 +74562,7 @@ function createTypeChecker(host) {
74610
74562
  }
74611
74563
  }
74612
74564
  function shouldMarkIdentifierAliasReferenced(node) {
74613
- var _a2;
74565
+ var _a;
74614
74566
  const parent2 = node.parent;
74615
74567
  if (parent2) {
74616
74568
  if (isPropertyAccessExpression(parent2) && parent2.expression === node) {
@@ -74619,7 +74571,7 @@ function createTypeChecker(host) {
74619
74571
  if (isExportSpecifier(parent2) && parent2.isTypeOnly) {
74620
74572
  return false;
74621
74573
  }
74622
- const greatGrandparent = (_a2 = parent2.parent) == null ? void 0 : _a2.parent;
74574
+ const greatGrandparent = (_a = parent2.parent) == null ? void 0 : _a.parent;
74623
74575
  if (greatGrandparent && isExportDeclaration(greatGrandparent) && greatGrandparent.isTypeOnly) {
74624
74576
  return false;
74625
74577
  }
@@ -75351,7 +75303,7 @@ function createTypeChecker(host) {
75351
75303
  }
75352
75304
  }
75353
75305
  function getContextualTypeForAssignmentDeclaration(binaryExpression) {
75354
- var _a2, _b;
75306
+ var _a, _b;
75355
75307
  const kind = getAssignmentDeclarationKind(binaryExpression);
75356
75308
  switch (kind) {
75357
75309
  case 0 /* None */:
@@ -75410,7 +75362,7 @@ function createTypeChecker(host) {
75410
75362
  case 2 /* ModuleExports */:
75411
75363
  let valueDeclaration;
75412
75364
  if (kind !== 2 /* ModuleExports */) {
75413
- valueDeclaration = canHaveSymbol(binaryExpression.left) ? (_a2 = binaryExpression.left.symbol) == null ? void 0 : _a2.valueDeclaration : void 0;
75365
+ valueDeclaration = canHaveSymbol(binaryExpression.left) ? (_a = binaryExpression.left.symbol) == null ? void 0 : _a.valueDeclaration : void 0;
75414
75366
  }
75415
75367
  valueDeclaration || (valueDeclaration = (_b = binaryExpression.symbol) == null ? void 0 : _b.valueDeclaration);
75416
75368
  const annotated = valueDeclaration && getEffectiveTypeAnnotationNode(valueDeclaration);
@@ -75477,7 +75429,7 @@ function createTypeChecker(host) {
75477
75429
  return mapType(
75478
75430
  type,
75479
75431
  (t) => {
75480
- var _a2;
75432
+ var _a;
75481
75433
  if (isGenericMappedType(t) && !t.declaration.nameType) {
75482
75434
  const constraint = getConstraintTypeFromMappedType(t);
75483
75435
  const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -75505,7 +75457,7 @@ function createTypeChecker(host) {
75505
75457
  return restType;
75506
75458
  }
75507
75459
  }
75508
- return (_a2 = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a2.type;
75460
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
75509
75461
  }
75510
75462
  return void 0;
75511
75463
  },
@@ -75547,8 +75499,8 @@ function createTypeChecker(host) {
75547
75499
  return mapType(
75548
75500
  type,
75549
75501
  (t) => {
75550
- var _a2;
75551
- return (_a2 = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType)) == null ? void 0 : _a2.type;
75502
+ var _a;
75503
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType)) == null ? void 0 : _a.type;
75552
75504
  },
75553
75505
  /*noReductions*/
75554
75506
  true
@@ -75690,8 +75642,8 @@ function createTypeChecker(host) {
75690
75642
  ),
75691
75643
  map(
75692
75644
  filter(getPropertiesOfType(contextualType), (s) => {
75693
- var _a2;
75694
- return !!(s.flags & 16777216 /* Optional */) && !!((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName);
75645
+ var _a;
75646
+ return !!(s.flags & 16777216 /* Optional */) && !!((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName);
75695
75647
  }),
75696
75648
  (s) => [() => undefinedType, s.escapedName]
75697
75649
  )
@@ -75717,8 +75669,8 @@ function createTypeChecker(host) {
75717
75669
  ),
75718
75670
  map(
75719
75671
  filter(getPropertiesOfType(contextualType), (s) => {
75720
- var _a2;
75721
- if (!(s.flags & 16777216 /* Optional */) || !((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members)) {
75672
+ var _a;
75673
+ if (!(s.flags & 16777216 /* Optional */) || !((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members)) {
75722
75674
  return false;
75723
75675
  }
75724
75676
  const element = node.parent.parent;
@@ -75777,7 +75729,7 @@ function createTypeChecker(host) {
75777
75729
  return type;
75778
75730
  }
75779
75731
  function getContextualType2(node, contextFlags) {
75780
- var _a2;
75732
+ var _a;
75781
75733
  if (node.flags & 67108864 /* InWithStatement */) {
75782
75734
  return void 0;
75783
75735
  }
@@ -75823,7 +75775,7 @@ function createTypeChecker(host) {
75823
75775
  const arrayLiteral = parent2;
75824
75776
  const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags);
75825
75777
  const elementIndex = indexOfNode(arrayLiteral.elements, node);
75826
- const spreadIndices = (_a2 = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a2.spreadIndices = getSpreadIndices(arrayLiteral.elements));
75778
+ const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements));
75827
75779
  return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last);
75828
75780
  }
75829
75781
  case 227 /* ConditionalExpression */:
@@ -76355,13 +76307,13 @@ function createTypeChecker(host) {
76355
76307
  return links.resolvedType;
76356
76308
  }
76357
76309
  function isSymbolWithNumericName(symbol) {
76358
- var _a2;
76359
- const firstDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2[0];
76310
+ var _a;
76311
+ const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0];
76360
76312
  return isNumericLiteralName(symbol.escapedName) || firstDecl && isNamedDeclaration(firstDecl) && isNumericName(firstDecl.name);
76361
76313
  }
76362
76314
  function isSymbolWithSymbolName(symbol) {
76363
- var _a2;
76364
- const firstDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2[0];
76315
+ var _a;
76316
+ const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0];
76365
76317
  return isKnownSymbol(symbol) || firstDecl && isNamedDeclaration(firstDecl) && isComputedPropertyName(firstDecl.name) && isTypeAssignableToKind(checkComputedPropertyName(firstDecl.name), 4096 /* ESSymbol */);
76366
76318
  }
76367
76319
  function getObjectLiteralIndexInfo(node, offset, properties, keyType) {
@@ -76391,7 +76343,7 @@ function createTypeChecker(host) {
76391
76343
  return links.immediateTarget;
76392
76344
  }
76393
76345
  function checkObjectLiteral(node, checkMode = 0 /* Normal */) {
76394
- var _a2;
76346
+ var _a;
76395
76347
  const inDestructuringPattern = isAssignmentTarget(node);
76396
76348
  checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
76397
76349
  const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0;
@@ -76532,7 +76484,7 @@ function createTypeChecker(host) {
76532
76484
  for (const prop of getPropertiesOfType(contextualType)) {
76533
76485
  if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
76534
76486
  if (!(prop.flags & 16777216 /* Optional */)) {
76535
- error2(prop.valueDeclaration || ((_a2 = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a2.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
76487
+ error2(prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
76536
76488
  }
76537
76489
  propertiesTable.set(prop.escapedName, prop);
76538
76490
  propertiesArray.push(prop);
@@ -76996,7 +76948,7 @@ function createTypeChecker(host) {
76996
76948
  }
76997
76949
  }
76998
76950
  function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
76999
- var _a2;
76951
+ var _a;
77000
76952
  Debug.assert(isJsxIntrinsicTagName(node.tagName));
77001
76953
  const links = getNodeLinks(node);
77002
76954
  if (!links.resolvedJsxElementAttributesType) {
@@ -77005,7 +76957,7 @@ function createTypeChecker(host) {
77005
76957
  return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType;
77006
76958
  } else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) {
77007
76959
  const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText;
77008
- return links.resolvedJsxElementAttributesType = ((_a2 = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a2.type) || errorType;
76960
+ return links.resolvedJsxElementAttributesType = ((_a = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a.type) || errorType;
77009
76961
  } else {
77010
76962
  return links.resolvedJsxElementAttributesType = errorType;
77011
76963
  }
@@ -77182,7 +77134,7 @@ function createTypeChecker(host) {
77182
77134
  return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode);
77183
77135
  }
77184
77136
  function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) {
77185
- var _a2;
77137
+ var _a;
77186
77138
  const flags = getDeclarationModifierFlagsFromSymbol(prop, writing);
77187
77139
  if (isSuper) {
77188
77140
  if (languageVersion < 2 /* ES2015 */) {
@@ -77199,7 +77151,7 @@ function createTypeChecker(host) {
77199
77151
  }
77200
77152
  return false;
77201
77153
  }
77202
- if (!(flags & 256 /* Static */) && ((_a2 = prop.declarations) == null ? void 0 : _a2.some(isClassInstanceProperty))) {
77154
+ if (!(flags & 256 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) {
77203
77155
  if (errorNode) {
77204
77156
  error2(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop));
77205
77157
  }
@@ -77586,7 +77538,7 @@ function createTypeChecker(host) {
77586
77538
  error2(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType));
77587
77539
  }
77588
77540
  propType = indexInfo.type;
77589
- if (noUncheckedIndexedAccess && getAssignmentTargetKind(node) !== 1 /* Definite */) {
77541
+ if (compilerOptions.noUncheckedIndexedAccess && getAssignmentTargetKind(node) !== 1 /* Definite */) {
77590
77542
  propType = getUnionType([propType, missingType]);
77591
77543
  }
77592
77544
  if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) {
@@ -77613,12 +77565,12 @@ function createTypeChecker(host) {
77613
77565
  return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode);
77614
77566
  }
77615
77567
  function isUncheckedJSSuggestion(node, suggestion, excludeClasses) {
77616
- var _a2;
77568
+ var _a;
77617
77569
  const file = getSourceFileOfNode(node);
77618
77570
  if (file) {
77619
77571
  if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) {
77620
77572
  const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode);
77621
- const suggestionHasNoExtendsOrDecorators = !(suggestion == null ? void 0 : suggestion.valueDeclaration) || !isClassLike(suggestion.valueDeclaration) || ((_a2 = suggestion.valueDeclaration.heritageClauses) == null ? void 0 : _a2.length) || classOrConstructorParameterIsDecorated(
77573
+ const suggestionHasNoExtendsOrDecorators = !(suggestion == null ? void 0 : suggestion.valueDeclaration) || !isClassLike(suggestion.valueDeclaration) || ((_a = suggestion.valueDeclaration.heritageClauses) == null ? void 0 : _a.length) || classOrConstructorParameterIsDecorated(
77622
77574
  /*useLegacyDecorators*/
77623
77575
  false,
77624
77576
  suggestion.valueDeclaration
@@ -78416,7 +78368,7 @@ function createTypeChecker(host) {
78416
78368
  errorOutputContainer
78417
78369
  );
78418
78370
  function checkTagNameDoesNotExpectTooManyArguments() {
78419
- var _a2;
78371
+ var _a;
78420
78372
  if (getJsxNamespaceContainerForImplicitImport(node)) {
78421
78373
  return true;
78422
78374
  }
@@ -78482,7 +78434,7 @@ function createTypeChecker(host) {
78482
78434
  }
78483
78435
  if (reportErrors2) {
78484
78436
  const diag2 = createDiagnosticForNode(node.tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(node.tagName), absoluteMinArgCount, entityNameToString(factory2), maxParamCount);
78485
- const tagNameDeclaration = (_a2 = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a2.valueDeclaration;
78437
+ const tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a.valueDeclaration;
78486
78438
  if (tagNameDeclaration) {
78487
78439
  addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName)));
78488
78440
  }
@@ -78631,9 +78583,9 @@ function createTypeChecker(host) {
78631
78583
  const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
78632
78584
  if (spreadType && isTupleType(spreadType)) {
78633
78585
  forEach(getElementTypes(spreadType), (t, i2) => {
78634
- var _a2;
78586
+ var _a;
78635
78587
  const flags = spreadType.target.elementFlags[i2];
78636
- const syntheticArg = createSyntheticExpression(arg, flags & 4 /* Rest */ ? createArrayType(t) : t, !!(flags & 12 /* Variable */), (_a2 = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a2[i2]);
78588
+ const syntheticArg = createSyntheticExpression(arg, flags & 4 /* Rest */ ? createArrayType(t) : t, !!(flags & 12 /* Variable */), (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2]);
78637
78589
  effectiveArgs.push(syntheticArg);
78638
78590
  });
78639
78591
  } else {
@@ -78741,7 +78693,7 @@ function createTypeChecker(host) {
78741
78693
  return constructorSymbol === globalPromiseSymbol;
78742
78694
  }
78743
78695
  function getArgumentArityError(node, signatures, args, headMessage) {
78744
- var _a2;
78696
+ var _a;
78745
78697
  const spreadIndex = getSpreadArgumentIndex(args);
78746
78698
  if (spreadIndex > -1) {
78747
78699
  return createDiagnosticForNode(args[spreadIndex], Diagnostics.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);
@@ -78800,7 +78752,7 @@ function createTypeChecker(host) {
78800
78752
  } else {
78801
78753
  diagnostic = getDiagnosticForCallNode(node, error3, parameterRange, args.length);
78802
78754
  }
78803
- const parameter = (_a2 = closestSignature == null ? void 0 : closestSignature.declaration) == null ? void 0 : _a2.parameters[closestSignature.thisParameter ? args.length + 1 : args.length];
78755
+ const parameter = (_a = closestSignature == null ? void 0 : closestSignature.declaration) == null ? void 0 : _a.parameters[closestSignature.thisParameter ? args.length + 1 : args.length];
78804
78756
  if (parameter) {
78805
78757
  const messageAndArgs = isBindingPattern(parameter.name) ? [Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided] : isRestParameter(parameter) ? [Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided, idText(getFirstIdentifier(parameter.name))] : [Diagnostics.An_argument_for_0_was_not_provided, !parameter.name ? args.length : idText(getFirstIdentifier(parameter.name))];
78806
78758
  const parameterError = createDiagnosticForNode(parameter, ...messageAndArgs);
@@ -79040,11 +78992,11 @@ function createTypeChecker(host) {
79040
78992
  }
79041
78993
  return result;
79042
78994
  function addImplementationSuccessElaboration(failed, diagnostic) {
79043
- var _a2, _b;
78995
+ var _a, _b;
79044
78996
  const oldCandidatesForArgumentError = candidatesForArgumentError;
79045
78997
  const oldCandidateForArgumentArityError = candidateForArgumentArityError;
79046
78998
  const oldCandidateForTypeArgumentError = candidateForTypeArgumentError;
79047
- const failedSignatureDeclarations = ((_b = (_a2 = failed.declaration) == null ? void 0 : _a2.symbol) == null ? void 0 : _b.declarations) || emptyArray;
78999
+ const failedSignatureDeclarations = ((_b = (_a = failed.declaration) == null ? void 0 : _a.symbol) == null ? void 0 : _b.declarations) || emptyArray;
79048
79000
  const isOverload2 = failedSignatureDeclarations.length > 1;
79049
79001
  const implDecl = isOverload2 ? find(failedSignatureDeclarations, (d) => isFunctionLikeDeclaration(d) && nodeIsPresent(d.body)) : void 0;
79050
79002
  if (implDecl) {
@@ -79059,7 +79011,7 @@ function createTypeChecker(host) {
79059
79011
  candidateForTypeArgumentError = oldCandidateForTypeArgumentError;
79060
79012
  }
79061
79013
  function chooseOverload(candidates2, relation, isSingleNonGenericCandidate2, signatureHelpTrailingComma2 = false) {
79062
- var _a2, _b;
79014
+ var _a, _b;
79063
79015
  candidatesForArgumentError = void 0;
79064
79016
  candidateForArgumentArityError = void 0;
79065
79017
  candidateForTypeArgumentError = void 0;
@@ -79094,7 +79046,7 @@ function createTypeChecker(host) {
79094
79046
  let checkCandidate;
79095
79047
  let inferenceContext;
79096
79048
  if (candidate.typeParameters) {
79097
- const paramLocation = (_b = (_a2 = candidate.typeParameters[0].symbol.declarations) == null ? void 0 : _a2[0]) == null ? void 0 : _b.parent;
79049
+ const paramLocation = (_b = (_a = candidate.typeParameters[0].symbol.declarations) == null ? void 0 : _a[0]) == null ? void 0 : _b.parent;
79098
79050
  const candidateParameterContext = paramLocation || (candidate.declaration && isConstructorDeclaration(candidate.declaration) ? candidate.declaration.parent : candidate.declaration);
79099
79051
  if (candidateParameterContext && findAncestor(node, (a) => a === candidateParameterContext)) {
79100
79052
  candidate = getImplementationSignature(candidate);
@@ -79783,7 +79735,7 @@ function createTypeChecker(host) {
79783
79735
  return result;
79784
79736
  }
79785
79737
  function isJSConstructor(node) {
79786
- var _a2;
79738
+ var _a;
79787
79739
  if (!node || !isInJSFile(node)) {
79788
79740
  return false;
79789
79741
  }
@@ -79794,12 +79746,12 @@ function createTypeChecker(host) {
79794
79746
  if (isPropertyAssignment(walkUpParenthesizedExpressions(func.parent)))
79795
79747
  return false;
79796
79748
  const symbol = getSymbolOfDeclaration(func);
79797
- return !!((_a2 = symbol == null ? void 0 : symbol.members) == null ? void 0 : _a2.size);
79749
+ return !!((_a = symbol == null ? void 0 : symbol.members) == null ? void 0 : _a.size);
79798
79750
  }
79799
79751
  return false;
79800
79752
  }
79801
79753
  function mergeJSSymbols(target, source) {
79802
- var _a2, _b;
79754
+ var _a, _b;
79803
79755
  if (source) {
79804
79756
  const links = getSymbolLinks(source);
79805
79757
  if (!links.inferredClassSymbol || !links.inferredClassSymbol.has(getSymbolId(target))) {
@@ -79807,7 +79759,7 @@ function createTypeChecker(host) {
79807
79759
  inferred.exports = inferred.exports || createSymbolTable();
79808
79760
  inferred.members = inferred.members || createSymbolTable();
79809
79761
  inferred.flags |= source.flags & 32 /* Class */;
79810
- if ((_a2 = source.exports) == null ? void 0 : _a2.size) {
79762
+ if ((_a = source.exports) == null ? void 0 : _a.size) {
79811
79763
  mergeSymbolTable(inferred.exports, source.exports);
79812
79764
  }
79813
79765
  if ((_b = source.members) == null ? void 0 : _b.size) {
@@ -79820,13 +79772,13 @@ function createTypeChecker(host) {
79820
79772
  }
79821
79773
  }
79822
79774
  function getAssignedClassSymbol(decl) {
79823
- var _a2;
79775
+ var _a;
79824
79776
  const assignmentSymbol = decl && getSymbolOfExpando(
79825
79777
  decl,
79826
79778
  /*allowDeclaration*/
79827
79779
  true
79828
79780
  );
79829
- const prototype = (_a2 = assignmentSymbol == null ? void 0 : assignmentSymbol.exports) == null ? void 0 : _a2.get("prototype");
79781
+ const prototype = (_a = assignmentSymbol == null ? void 0 : assignmentSymbol.exports) == null ? void 0 : _a.get("prototype");
79830
79782
  const init = (prototype == null ? void 0 : prototype.valueDeclaration) && getAssignedJSPrototype(prototype.valueDeclaration);
79831
79783
  return init ? getSymbolOfDeclaration(init) : void 0;
79832
79784
  }
@@ -79883,7 +79835,7 @@ function createTypeChecker(host) {
79883
79835
  }
79884
79836
  }
79885
79837
  function checkCallExpression(node, checkMode) {
79886
- var _a2, _b, _c;
79838
+ var _a, _b, _c;
79887
79839
  checkGrammarTypeArguments(node, node.typeArguments);
79888
79840
  const signature = getResolvedSignature(
79889
79841
  node,
@@ -79900,7 +79852,7 @@ function createTypeChecker(host) {
79900
79852
  }
79901
79853
  if (node.kind === 214 /* NewExpression */) {
79902
79854
  const declaration = signature.declaration;
79903
- if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) {
79855
+ if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) {
79904
79856
  if (noImplicitAny) {
79905
79857
  error2(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
79906
79858
  }
@@ -80059,11 +80011,11 @@ function createTypeChecker(host) {
80059
80011
  return void 0;
80060
80012
  }
80061
80013
  function getTypeWithSyntheticDefaultImportType(type, symbol, originalSymbol, moduleSpecifier) {
80062
- var _a2;
80014
+ var _a;
80063
80015
  if (allowSyntheticDefaultImports && type && !isErrorType(type)) {
80064
80016
  const synthType = type;
80065
80017
  if (!synthType.syntheticType) {
80066
- const file = (_a2 = originalSymbol.declarations) == null ? void 0 : _a2.find(isSourceFile);
80018
+ const file = (_a = originalSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);
80067
80019
  const hasSyntheticDefault = canHaveSyntheticDefault(
80068
80020
  file,
80069
80021
  originalSymbol,
@@ -80397,8 +80349,8 @@ function createTypeChecker(host) {
80397
80349
  return restParameter.escapedName;
80398
80350
  }
80399
80351
  function getParameterIdentifierInfoAtPosition(signature, pos) {
80400
- var _a2;
80401
- if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 317 /* JSDocFunctionType */) {
80352
+ var _a;
80353
+ if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 317 /* JSDocFunctionType */) {
80402
80354
  return void 0;
80403
80355
  }
80404
80356
  const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
@@ -81508,7 +81460,7 @@ function createTypeChecker(host) {
81508
81460
  return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 8 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration));
81509
81461
  }
81510
81462
  function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) {
81511
- var _a2, _b;
81463
+ var _a, _b;
81512
81464
  if (assignmentKind === 0 /* None */) {
81513
81465
  return false;
81514
81466
  }
@@ -81522,7 +81474,7 @@ function createTypeChecker(host) {
81522
81474
  const isAssignmentDeclaration2 = isBinaryExpression(symbol.valueDeclaration);
81523
81475
  const isLocalPropertyDeclaration = ctor.parent === symbol.valueDeclaration.parent;
81524
81476
  const isLocalParameterProperty = ctor === symbol.valueDeclaration.parent;
81525
- const isLocalThisPropertyAssignment = isAssignmentDeclaration2 && ((_a2 = symbol.parent) == null ? void 0 : _a2.valueDeclaration) === ctor.parent;
81477
+ const isLocalThisPropertyAssignment = isAssignmentDeclaration2 && ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) === ctor.parent;
81526
81478
  const isLocalThisPropertyAssignmentConstructorFunction = isAssignmentDeclaration2 && ((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) === ctor;
81527
81479
  const isWriteableSymbol = isLocalPropertyDeclaration || isLocalParameterProperty || isLocalThisPropertyAssignment || isLocalThisPropertyAssignmentConstructorFunction;
81528
81480
  return !isWriteableSymbol;
@@ -81920,7 +81872,7 @@ function createTypeChecker(host) {
81920
81872
  checkExternalEmitHelpers(node, 512 /* Read */);
81921
81873
  }
81922
81874
  const possiblyOutOfBoundsType = checkIteratedTypeOrElementType(65 /* Destructuring */ | 128 /* PossiblyOutOfBounds */, sourceType, undefinedType, node) || errorType;
81923
- let inBoundsType = noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType;
81875
+ let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType;
81924
81876
  for (let i = 0; i < elements.length; i++) {
81925
81877
  let type = possiblyOutOfBoundsType;
81926
81878
  if (node.elements[i].kind === 230 /* SpreadElement */) {
@@ -82509,7 +82461,7 @@ function createTypeChecker(host) {
82509
82461
  }
82510
82462
  }
82511
82463
  function isAssignmentDeclaration2(kind) {
82512
- var _a2;
82464
+ var _a;
82513
82465
  switch (kind) {
82514
82466
  case 2 /* ModuleExports */:
82515
82467
  return true;
@@ -82520,7 +82472,7 @@ function createTypeChecker(host) {
82520
82472
  case 4 /* ThisProperty */:
82521
82473
  const symbol = getSymbolOfNode(left);
82522
82474
  const init = getAssignedExpandoInitializer(right);
82523
- return !!init && isObjectLiteralExpression(init) && !!((_a2 = symbol == null ? void 0 : symbol.exports) == null ? void 0 : _a2.size);
82475
+ return !!init && isObjectLiteralExpression(init) && !!((_a = symbol == null ? void 0 : symbol.exports) == null ? void 0 : _a.size);
82524
82476
  default:
82525
82477
  return false;
82526
82478
  }
@@ -83070,8 +83022,8 @@ function createTypeChecker(host) {
83070
83022
  return type;
83071
83023
  }
83072
83024
  function checkExpression(node, checkMode, forceTuple) {
83073
- var _a2, _b;
83074
- (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Check, "checkExpression", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
83025
+ var _a, _b;
83026
+ (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, "checkExpression", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
83075
83027
  const saveCurrentNode = currentNode;
83076
83028
  currentNode = node;
83077
83029
  instantiationCount = 0;
@@ -83246,7 +83198,7 @@ function createTypeChecker(host) {
83246
83198
  addLazyDiagnostic(() => checkTypeNameIsReserved(node.name, Diagnostics.Type_parameter_name_cannot_be_0));
83247
83199
  }
83248
83200
  function checkTypeParameterDeferred(node) {
83249
- var _a2, _b;
83201
+ var _a, _b;
83250
83202
  if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) {
83251
83203
  const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node));
83252
83204
  const modifiers = getTypeParameterModifiers(typeParameter) & (8192 /* In */ | 16384 /* Out */);
@@ -83255,7 +83207,7 @@ function createTypeChecker(host) {
83255
83207
  if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (4 /* Reference */ | 16 /* Anonymous */ | 32 /* Mapped */))) {
83256
83208
  error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
83257
83209
  } else if (modifiers === 8192 /* In */ || modifiers === 16384 /* Out */) {
83258
- (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) });
83210
+ (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) });
83259
83211
  const source = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
83260
83212
  const target = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
83261
83213
  const saveVarianceTypeParameter = typeParameter;
@@ -83965,8 +83917,8 @@ function createTypeChecker(host) {
83965
83917
  }
83966
83918
  }
83967
83919
  function checkGrammarMappedType(node) {
83968
- var _a2;
83969
- if ((_a2 = node.members) == null ? void 0 : _a2.length) {
83920
+ var _a;
83921
+ if ((_a = node.members) == null ? void 0 : _a.length) {
83970
83922
  return grammarErrorOnNode(node.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
83971
83923
  }
83972
83924
  }
@@ -84400,13 +84352,13 @@ function createTypeChecker(host) {
84400
84352
  return !!thenFunction && getSignaturesOfType(getTypeWithFacts(thenFunction, 2097152 /* NEUndefinedOrNull */), 0 /* Call */).length > 0;
84401
84353
  }
84402
84354
  function isAwaitedTypeInstantiation(type) {
84403
- var _a2;
84355
+ var _a;
84404
84356
  if (type.flags & 16777216 /* Conditional */) {
84405
84357
  const awaitedSymbol = getGlobalAwaitedSymbol(
84406
84358
  /*reportErrors*/
84407
84359
  false
84408
84360
  );
84409
- return !!awaitedSymbol && type.aliasSymbol === awaitedSymbol && ((_a2 = type.aliasTypeArguments) == null ? void 0 : _a2.length) === 1;
84361
+ return !!awaitedSymbol && type.aliasSymbol === awaitedSymbol && ((_a = type.aliasTypeArguments) == null ? void 0 : _a.length) === 1;
84410
84362
  }
84411
84363
  return false;
84412
84364
  }
@@ -84992,7 +84944,7 @@ function createTypeChecker(host) {
84992
84944
  }
84993
84945
  }
84994
84946
  function checkFunctionOrMethodDeclaration(node) {
84995
- var _a2;
84947
+ var _a;
84996
84948
  checkDecorators(node);
84997
84949
  checkSignatureDeclaration(node);
84998
84950
  const functionFlags = getFunctionFlags(node);
@@ -85002,7 +84954,7 @@ function createTypeChecker(host) {
85002
84954
  if (hasBindableName(node)) {
85003
84955
  const symbol = getSymbolOfDeclaration(node);
85004
84956
  const localSymbol = node.localSymbol || symbol;
85005
- const firstDeclaration = (_a2 = localSymbol.declarations) == null ? void 0 : _a2.find(
84957
+ const firstDeclaration = (_a = localSymbol.declarations) == null ? void 0 : _a.find(
85006
84958
  // Get first non javascript function declaration
85007
84959
  (declaration) => declaration.kind === node.kind && !(declaration.flags & 524288 /* JavaScriptFile */)
85008
84960
  );
@@ -85276,9 +85228,9 @@ function createTypeChecker(host) {
85276
85228
  });
85277
85229
  }
85278
85230
  function checkPotentialUncheckedRenamedBindingElementsInTypes() {
85279
- var _a2;
85231
+ var _a;
85280
85232
  for (const node of potentialUnusedRenamedBindingElementsInTypes) {
85281
- if (!((_a2 = getSymbolOfDeclaration(node)) == null ? void 0 : _a2.isReferenced)) {
85233
+ if (!((_a = getSymbolOfDeclaration(node)) == null ? void 0 : _a.isReferenced)) {
85282
85234
  const wrappingDeclaration = walkUpBindingElementsAndPatterns(node);
85283
85235
  Debug.assert(isPartOfParameterDeclaration(wrappingDeclaration), "Only parameter declaration should be checked here");
85284
85236
  const diagnostic = createDiagnosticForNode(node.name, Diagnostics._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation, declarationNameToString(node.name), declarationNameToString(node.propertyName));
@@ -85501,7 +85453,7 @@ function createTypeChecker(host) {
85501
85453
  return type === autoType ? anyType : type === autoArrayType ? anyArrayType : type;
85502
85454
  }
85503
85455
  function checkVariableLikeDeclaration(node) {
85504
- var _a2;
85456
+ var _a;
85505
85457
  checkDecorators(node);
85506
85458
  if (!isBindingElement(node)) {
85507
85459
  checkSourceElement(node.type);
@@ -85600,7 +85552,7 @@ function createTypeChecker(host) {
85600
85552
  if (node === symbol.valueDeclaration) {
85601
85553
  const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node);
85602
85554
  if (initializer) {
85603
- const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a2 = symbol.exports) == null ? void 0 : _a2.size);
85555
+ const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size);
85604
85556
  if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) {
85605
85557
  const initializerType = checkExpressionCached(initializer);
85606
85558
  checkTypeAssignableToAndOptionallyElaborate(
@@ -85695,8 +85647,8 @@ function createTypeChecker(host) {
85695
85647
  return getSelectedEffectiveModifierFlags(left, interestingFlags) === getSelectedEffectiveModifierFlags(right, interestingFlags);
85696
85648
  }
85697
85649
  function checkVariableDeclaration(node) {
85698
- var _a2, _b;
85699
- (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Check, "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
85650
+ var _a, _b;
85651
+ (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
85700
85652
  checkGrammarVariableDeclaration(node);
85701
85653
  checkVariableLikeDeclaration(node);
85702
85654
  (_b = tracing) == null ? void 0 : _b.pop();
@@ -85974,7 +85926,7 @@ function createTypeChecker(host) {
85974
85926
  }
85975
85927
  const uplevelIteration = languageVersion >= 2 /* ES2015 */;
85976
85928
  const downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
85977
- const possibleOutOfBounds = noUncheckedIndexedAccess && !!(use & 128 /* PossiblyOutOfBounds */);
85929
+ const possibleOutOfBounds = compilerOptions.noUncheckedIndexedAccess && !!(use & 128 /* PossiblyOutOfBounds */);
85978
85930
  if (uplevelIteration || downlevelIteration || allowAsyncIterables) {
85979
85931
  const iterationTypes = getIterationTypesOfIterable(inputType, use, uplevelIteration ? errorNode : void 0);
85980
85932
  if (checkAssignability) {
@@ -86023,14 +85975,14 @@ function createTypeChecker(host) {
86023
85975
  }
86024
85976
  const arrayElementType = getIndexTypeOfType(arrayType, numberType);
86025
85977
  if (hasStringConstituent && arrayElementType) {
86026
- if (arrayElementType.flags & 402653316 /* StringLike */ && !noUncheckedIndexedAccess) {
85978
+ if (arrayElementType.flags & 402653316 /* StringLike */ && !compilerOptions.noUncheckedIndexedAccess) {
86027
85979
  return stringType;
86028
85980
  }
86029
85981
  return getUnionType(possibleOutOfBounds ? [arrayElementType, stringType, undefinedType] : [arrayElementType, stringType], 2 /* Subtype */);
86030
85982
  }
86031
85983
  return use & 128 /* PossiblyOutOfBounds */ ? includeUndefinedInIndexSignature(arrayElementType) : arrayElementType;
86032
85984
  function getIterationDiagnosticDetails(allowsStrings, downlevelIteration2) {
86033
- var _a2;
85985
+ var _a;
86034
85986
  if (downlevelIteration2) {
86035
85987
  return allowsStrings ? [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true] : [Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true];
86036
85988
  }
@@ -86044,7 +85996,7 @@ function createTypeChecker(host) {
86044
85996
  if (yieldType) {
86045
85997
  return [Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, false];
86046
85998
  }
86047
- if (isES2015OrLaterIterable((_a2 = inputType.symbol) == null ? void 0 : _a2.escapedName)) {
85999
+ if (isES2015OrLaterIterable((_a = inputType.symbol) == null ? void 0 : _a.escapedName)) {
86048
86000
  return [Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, true];
86049
86001
  }
86050
86002
  return allowsStrings ? [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type, true] : [Diagnostics.Type_0_is_not_an_array_type, true];
@@ -86116,7 +86068,7 @@ function createTypeChecker(host) {
86116
86068
  return type[cacheKey] = cachedTypes2;
86117
86069
  }
86118
86070
  function getIterationTypesOfIterable(type, use, errorNode) {
86119
- var _a2, _b;
86071
+ var _a, _b;
86120
86072
  if (isTypeAny(type)) {
86121
86073
  return anyIterationTypes;
86122
86074
  }
@@ -86131,7 +86083,7 @@ function createTypeChecker(host) {
86131
86083
  }
86132
86084
  }
86133
86085
  return void 0;
86134
- } else if ((_a2 = errorOutputContainer == null ? void 0 : errorOutputContainer.errors) == null ? void 0 : _a2.length) {
86086
+ } else if ((_a = errorOutputContainer == null ? void 0 : errorOutputContainer.errors) == null ? void 0 : _a.length) {
86135
86087
  for (const diag2 of errorOutputContainer.errors) {
86136
86088
  diagnostics.add(diag2);
86137
86089
  }
@@ -86439,7 +86391,7 @@ function createTypeChecker(host) {
86439
86391
  ));
86440
86392
  }
86441
86393
  function getIterationTypesOfMethod(type, resolver, methodName, errorNode, errorOutputContainer) {
86442
- var _a2, _b, _c, _d;
86394
+ var _a, _b, _c, _d;
86443
86395
  const method = getPropertyOfType(type, methodName);
86444
86396
  if (!method && methodName !== "next") {
86445
86397
  return void 0;
@@ -86470,7 +86422,7 @@ function createTypeChecker(host) {
86470
86422
  /*reportErrors*/
86471
86423
  false
86472
86424
  );
86473
- const isGeneratorMethod = ((_b = (_a2 = globalGeneratorType.symbol) == null ? void 0 : _a2.members) == null ? void 0 : _b.get(methodName)) === methodType.symbol;
86425
+ const isGeneratorMethod = ((_b = (_a = globalGeneratorType.symbol) == null ? void 0 : _a.members) == null ? void 0 : _b.get(methodName)) === methodType.symbol;
86474
86426
  const isIteratorMethod = !isGeneratorMethod && ((_d = (_c = globalIteratorType.symbol) == null ? void 0 : _c.members) == null ? void 0 : _d.get(methodName)) === methodType.symbol;
86475
86427
  if (isGeneratorMethod || isIteratorMethod) {
86476
86428
  const globalType = isGeneratorMethod ? globalGeneratorType : globalIteratorType;
@@ -87342,7 +87294,7 @@ function createTypeChecker(host) {
87342
87294
  return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */);
87343
87295
  }
87344
87296
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
87345
- var _a2, _b, _c, _d, _e;
87297
+ var _a, _b, _c, _d, _e;
87346
87298
  const baseProperties = getPropertiesOfType(baseType);
87347
87299
  const notImplementedInfo = /* @__PURE__ */ new Map();
87348
87300
  basePropertyCheck:
@@ -87373,7 +87325,7 @@ function createTypeChecker(host) {
87373
87325
  const baseTypeName = typeToString(baseType);
87374
87326
  const typeName = typeToString(type);
87375
87327
  const basePropertyName = symbolToString(baseProperty);
87376
- const missedProperties = append((_a2 = notImplementedInfo.get(derivedClassDecl)) == null ? void 0 : _a2.missedProperties, basePropertyName);
87328
+ const missedProperties = append((_a = notImplementedInfo.get(derivedClassDecl)) == null ? void 0 : _a.missedProperties, basePropertyName);
87377
87329
  notImplementedInfo.set(derivedClassDecl, { baseTypeName, typeName, missedProperties });
87378
87330
  }
87379
87331
  } else {
@@ -87385,7 +87337,7 @@ function createTypeChecker(host) {
87385
87337
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
87386
87338
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
87387
87339
  if (basePropertyFlags && derivedPropertyFlags) {
87388
- if ((getCheckFlags(base) & 6 /* SyntheticMember */ ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
87340
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
87389
87341
  continue;
87390
87342
  }
87391
87343
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -87866,7 +87818,7 @@ function createTypeChecker(host) {
87866
87818
  }
87867
87819
  addLazyDiagnostic(checkModuleDeclarationDiagnostics);
87868
87820
  function checkModuleDeclarationDiagnostics() {
87869
- var _a2, _b;
87821
+ var _a, _b;
87870
87822
  const isGlobalAugmentation = isGlobalScopeAugmentation(node);
87871
87823
  const inAmbientContext = node.flags & 33554432 /* Ambient */;
87872
87824
  if (isGlobalAugmentation && !inAmbientContext) {
@@ -87891,7 +87843,7 @@ function createTypeChecker(host) {
87891
87843
  if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator) {
87892
87844
  error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName);
87893
87845
  }
87894
- if (((_a2 = symbol.declarations) == null ? void 0 : _a2.length) > 1) {
87846
+ if (((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) {
87895
87847
  const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
87896
87848
  if (firstNonAmbientClassOrFunc) {
87897
87849
  if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) {
@@ -88028,7 +87980,7 @@ function createTypeChecker(host) {
88028
87980
  return true;
88029
87981
  }
88030
87982
  function checkAliasSymbol(node) {
88031
- var _a2, _b, _c, _d;
87983
+ var _a, _b, _c, _d;
88032
87984
  let symbol = getSymbolOfDeclaration(node);
88033
87985
  const target = resolveAlias(symbol);
88034
87986
  if (target !== unknownSymbol) {
@@ -88038,7 +87990,7 @@ function createTypeChecker(host) {
88038
87990
  Debug.assert(node.kind !== 280 /* NamespaceExport */);
88039
87991
  if (node.kind === 281 /* ExportSpecifier */) {
88040
87992
  const diag2 = error2(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files);
88041
- const alreadyExportedSymbol = (_b = (_a2 = getSourceFileOfNode(node).symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText);
87993
+ const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText);
88042
87994
  if (alreadyExportedSymbol === target) {
88043
87995
  const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode);
88044
87996
  if (exportingDeclaration) {
@@ -88165,7 +88117,7 @@ function createTypeChecker(host) {
88165
88117
  }
88166
88118
  }
88167
88119
  function checkImportAttributes(declaration) {
88168
- var _a2;
88120
+ var _a;
88169
88121
  const node = declaration.attributes;
88170
88122
  if (node) {
88171
88123
  const importAttributesType = getGlobalImportAttributesType(
@@ -88186,7 +88138,7 @@ function createTypeChecker(host) {
88186
88138
  const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve;
88187
88139
  return grammarErrorOnNode(node, message);
88188
88140
  }
88189
- const isTypeOnly = isJSDocImportTag(declaration) || (isImportDeclaration(declaration) ? (_a2 = declaration.importClause) == null ? void 0 : _a2.isTypeOnly : declaration.isTypeOnly);
88141
+ const isTypeOnly = isJSDocImportTag(declaration) || (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly);
88190
88142
  if (isTypeOnly) {
88191
88143
  return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
88192
88144
  }
@@ -88299,8 +88251,8 @@ function createTypeChecker(host) {
88299
88251
  checkImportAttributes(node);
88300
88252
  }
88301
88253
  function checkGrammarExportDeclaration(node) {
88302
- var _a2;
88303
- if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 279 /* NamedExports */) {
88254
+ var _a;
88255
+ if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) {
88304
88256
  return checkGrammarNamedImportsOrExports(node.exportClause);
88305
88257
  }
88306
88258
  return false;
@@ -88802,8 +88754,8 @@ function createTypeChecker(host) {
88802
88754
  links.deferredNodes = void 0;
88803
88755
  }
88804
88756
  function checkDeferredNode(node) {
88805
- var _a2, _b;
88806
- (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Check, "checkDeferredNode", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
88757
+ var _a, _b;
88758
+ (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, "checkDeferredNode", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
88807
88759
  const saveCurrentNode = currentNode;
88808
88760
  currentNode = node;
88809
88761
  instantiationCount = 0;
@@ -88855,8 +88807,8 @@ function createTypeChecker(host) {
88855
88807
  (_b = tracing) == null ? void 0 : _b.pop();
88856
88808
  }
88857
88809
  function checkSourceFile(node) {
88858
- var _a2, _b;
88859
- (_a2 = tracing) == null ? void 0 : _a2.push(
88810
+ var _a, _b;
88811
+ (_a = tracing) == null ? void 0 : _a.push(
88860
88812
  tracing.Phase.Check,
88861
88813
  "checkSourceFile",
88862
88814
  { path: node.path },
@@ -89650,7 +89602,7 @@ function createTypeChecker(host) {
89650
89602
  return roots ? flatMap(roots, getRootSymbols) : [symbol];
89651
89603
  }
89652
89604
  function getImmediateRootSymbols(symbol) {
89653
- if (getCheckFlags(symbol) & 6 /* SyntheticMember */) {
89605
+ if (getCheckFlags(symbol) & 6 /* Synthetic */) {
89654
89606
  return mapDefined(getSymbolLinks(symbol).containingType.types, (type) => getPropertyOfType(type, symbol.escapedName));
89655
89607
  } else if (symbol.flags & 33554432 /* Transient */) {
89656
89608
  const { links: { leftSpread, rightSpread, syntheticOrigin } } = symbol;
@@ -89682,7 +89634,7 @@ function createTypeChecker(host) {
89682
89634
  return isModuleOrEnumDeclaration(node.parent) && node === node.parent.name;
89683
89635
  }
89684
89636
  function getReferencedExportContainer(nodeIn, prefixLocals) {
89685
- var _a2;
89637
+ var _a;
89686
89638
  const node = getParseTreeNode(nodeIn, isIdentifier);
89687
89639
  if (node) {
89688
89640
  let symbol = getReferencedValueSymbol(
@@ -89700,7 +89652,7 @@ function createTypeChecker(host) {
89700
89652
  }
89701
89653
  const parentSymbol = getParentOfSymbol(symbol);
89702
89654
  if (parentSymbol) {
89703
- if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 307 /* SourceFile */) {
89655
+ if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 307 /* SourceFile */) {
89704
89656
  const symbolFile = parentSymbol.valueDeclaration;
89705
89657
  const referenceFile = getSourceFileOfNode(node);
89706
89658
  const symbolIsUmdExport = symbolFile !== referenceFile;
@@ -89927,11 +89879,11 @@ function createTypeChecker(host) {
89927
89879
  return symbol && getPropertiesOfType(getTypeOfSymbol(symbol)) || emptyArray;
89928
89880
  }
89929
89881
  function getNodeCheckFlags(node) {
89930
- var _a2;
89882
+ var _a;
89931
89883
  const nodeId = node.id || 0;
89932
89884
  if (nodeId < 0 || nodeId >= nodeLinks.length)
89933
89885
  return 0;
89934
- return ((_a2 = nodeLinks[nodeId]) == null ? void 0 : _a2.flags) || 0;
89886
+ return ((_a = nodeLinks[nodeId]) == null ? void 0 : _a.flags) || 0;
89935
89887
  }
89936
89888
  function getEnumMemberValue(node) {
89937
89889
  computeEnumMemberValues(node.parent);
@@ -89966,7 +89918,7 @@ function createTypeChecker(host) {
89966
89918
  return !!(type.flags & 524288 /* Object */) && getSignaturesOfType(type, 0 /* Call */).length > 0;
89967
89919
  }
89968
89920
  function getTypeReferenceSerializationKind(typeNameIn, location) {
89969
- var _a2;
89921
+ var _a;
89970
89922
  const typeName = getParseTreeNode(typeNameIn, isEntityName);
89971
89923
  if (!typeName)
89972
89924
  return 0 /* Unknown */;
@@ -89986,7 +89938,7 @@ function createTypeChecker(host) {
89986
89938
  true,
89987
89939
  location
89988
89940
  );
89989
- isTypeOnly = !!((_a2 = rootValueSymbol == null ? void 0 : rootValueSymbol.declarations) == null ? void 0 : _a2.every(isTypeOnlyImportOrExportDeclaration));
89941
+ isTypeOnly = !!((_a = rootValueSymbol == null ? void 0 : rootValueSymbol.declarations) == null ? void 0 : _a.every(isTypeOnlyImportOrExportDeclaration));
89990
89942
  }
89991
89943
  const valueSymbol = resolveEntityName(
89992
89944
  typeName,
@@ -90698,7 +90650,7 @@ function createTypeChecker(host) {
90698
90650
  return externalHelpersModule;
90699
90651
  }
90700
90652
  function checkGrammarModifiers(node) {
90701
- var _a2;
90653
+ var _a;
90702
90654
  const quickResult = reportObviousDecoratorErrors(node) || reportObviousModifierErrors(node);
90703
90655
  if (quickResult !== void 0) {
90704
90656
  return quickResult;
@@ -90974,7 +90926,7 @@ function createTypeChecker(host) {
90974
90926
  case 147 /* OutKeyword */: {
90975
90927
  const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 8192 /* In */ : 16384 /* Out */;
90976
90928
  const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out";
90977
- const parent2 = isJSDocTemplateTag(node.parent) && (getEffectiveJSDocHost(node.parent) || find((_a2 = getJSDocRoot(node.parent)) == null ? void 0 : _a2.tags, isJSDocTypedefTag)) || node.parent;
90929
+ const parent2 = isJSDocTemplateTag(node.parent) && (getEffectiveJSDocHost(node.parent) || find((_a = getJSDocRoot(node.parent)) == null ? void 0 : _a.tags, isJSDocTypedefTag)) || node.parent;
90978
90930
  if (node.kind !== 168 /* TypeParameter */ || parent2 && !(isInterfaceDeclaration(parent2) || isClassLike(parent2) || isTypeAliasDeclaration(parent2) || isJSDocTypedefTag(parent2))) {
90979
90931
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText);
90980
90932
  }
@@ -92051,11 +92003,11 @@ function createTypeChecker(host) {
92051
92003
  return ambientModulesCache;
92052
92004
  }
92053
92005
  function checkGrammarImportClause(node) {
92054
- var _a2;
92006
+ var _a;
92055
92007
  if (node.isTypeOnly && node.name && node.namedBindings) {
92056
92008
  return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both);
92057
92009
  }
92058
- if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 275 /* NamedImports */) {
92010
+ if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) {
92059
92011
  return checkGrammarNamedImportsOrExports(node.namedBindings);
92060
92012
  }
92061
92013
  return false;
@@ -123916,10 +123868,41 @@ function getLibraryNameFromLibFileName(libFileName) {
123916
123868
  }
123917
123869
  return "@typescript/lib-" + path;
123918
123870
  }
123871
+ function getLibNameFromLibReference(libReference) {
123872
+ return toFileNameLowerCase(libReference.fileName);
123873
+ }
123919
123874
  function getLibFileNameFromLibReference(libReference) {
123920
- const libName = toFileNameLowerCase(libReference.fileName);
123921
- const libFileName = libMap.get(libName);
123922
- return { libName, libFileName };
123875
+ const libName = getLibNameFromLibReference(libReference);
123876
+ return libMap.get(libName);
123877
+ }
123878
+ function fileIncludeReasonIsEqual(a, b) {
123879
+ if (a === b)
123880
+ return true;
123881
+ if (a.kind !== b.kind)
123882
+ return false;
123883
+ switch (a.kind) {
123884
+ case 0 /* RootFile */:
123885
+ Debug.type(b);
123886
+ return a.index === b.index;
123887
+ case 6 /* LibFile */:
123888
+ Debug.type(b);
123889
+ return a.index === b.index;
123890
+ case 1 /* SourceFromProjectReference */:
123891
+ case 2 /* OutputFromProjectReference */:
123892
+ Debug.type(b);
123893
+ return a.index === b.index;
123894
+ case 3 /* Import */:
123895
+ case 4 /* ReferenceFile */:
123896
+ case 5 /* TypeReferenceDirective */:
123897
+ case 7 /* LibReferenceDirective */:
123898
+ Debug.type(b);
123899
+ return a.file === b.file && a.index === b.index;
123900
+ case 8 /* AutomaticTypeDirectiveFile */:
123901
+ Debug.type(b);
123902
+ return a.typeReference === b.typeReference && packageIdIsEqual(a.packageId, b.packageId);
123903
+ default:
123904
+ return Debug.assertNever(a);
123905
+ }
123923
123906
  }
123924
123907
  function isReferencedFile(reason) {
123925
123908
  switch (reason == null ? void 0 : reason.kind) {
@@ -124166,6 +124149,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124166
124149
  let classifiableNames;
124167
124150
  const ambientModuleNameToUnmodifiedFileName = /* @__PURE__ */ new Map();
124168
124151
  let fileReasons = createMultiMap();
124152
+ let fileReasonsToChain;
124153
+ let reasonToRelatedInfo;
124169
124154
  const cachedBindAndCheckDiagnosticsForFile = {};
124170
124155
  const cachedDeclarationDiagnosticsForFile = {};
124171
124156
  let resolvedTypeReferenceDirectives = createModeAwareCache();
@@ -124197,6 +124182,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124197
124182
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
124198
124183
  const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
124199
124184
  const programDiagnostics = createDiagnosticCollection();
124185
+ let lazyProgramDiagnosticExplainingFile = [];
124200
124186
  const currentDirectory = host.getCurrentDirectory();
124201
124187
  const supportedExtensions = getSupportedExtensions(options);
124202
124188
  const supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
@@ -124525,24 +124511,64 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124525
124511
  writeFile: writeFile2
124526
124512
  };
124527
124513
  onProgramCreateComplete();
124528
- fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
124529
- switch (diagnostic.kind) {
124530
- case 1 /* FilePreprocessingFileExplainingDiagnostic */:
124531
- return programDiagnostics.add(createDiagnosticExplainingFile(diagnostic.file && getSourceFileByPath(diagnostic.file), diagnostic.fileProcessingReason, diagnostic.diagnostic, diagnostic.args || emptyArray));
124532
- case 0 /* FilePreprocessingReferencedDiagnostic */:
124533
- const { file, pos, end } = getReferencedFileLocation(program, diagnostic.reason);
124534
- return programDiagnostics.add(createFileDiagnostic(file, Debug.checkDefined(pos), Debug.checkDefined(end) - pos, diagnostic.diagnostic, ...diagnostic.args || emptyArray));
124535
- case 2 /* ResolutionDiagnostics */:
124536
- return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d));
124537
- default:
124538
- Debug.assertNever(diagnostic);
124539
- }
124540
- });
124541
124514
  verifyCompilerOptions();
124542
124515
  mark("afterProgram");
124543
124516
  measure("Program", "beforeProgram", "afterProgram");
124544
124517
  (_p = tracing) == null ? void 0 : _p.pop();
124545
124518
  return program;
124519
+ function updateAndGetProgramDiagnostics() {
124520
+ if (lazyProgramDiagnosticExplainingFile) {
124521
+ fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
124522
+ switch (diagnostic.kind) {
124523
+ case 1 /* FilePreprocessingFileExplainingDiagnostic */:
124524
+ return programDiagnostics.add(
124525
+ createDiagnosticExplainingFile(
124526
+ diagnostic.file && getSourceFileByPath(diagnostic.file),
124527
+ diagnostic.fileProcessingReason,
124528
+ diagnostic.diagnostic,
124529
+ diagnostic.args || emptyArray
124530
+ )
124531
+ );
124532
+ case 0 /* FilePreprocessingLibreferenceDiagnostic */:
124533
+ return programDiagnostics.add(filePreprocessingLibreferenceDiagnostic(diagnostic));
124534
+ case 2 /* ResolutionDiagnostics */:
124535
+ return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d));
124536
+ default:
124537
+ Debug.assertNever(diagnostic);
124538
+ }
124539
+ });
124540
+ lazyProgramDiagnosticExplainingFile.forEach(
124541
+ ({ file, diagnostic, args }) => programDiagnostics.add(
124542
+ createDiagnosticExplainingFile(
124543
+ file,
124544
+ /*fileProcessingReason*/
124545
+ void 0,
124546
+ diagnostic,
124547
+ args
124548
+ )
124549
+ )
124550
+ );
124551
+ lazyProgramDiagnosticExplainingFile = void 0;
124552
+ fileReasonsToChain = void 0;
124553
+ reasonToRelatedInfo = void 0;
124554
+ }
124555
+ return programDiagnostics;
124556
+ }
124557
+ function filePreprocessingLibreferenceDiagnostic({ reason }) {
124558
+ const { file, pos, end } = getReferencedFileLocation(program, reason);
124559
+ const libReference = file.libReferenceDirectives[reason.index];
124560
+ const libName = getLibNameFromLibReference(libReference);
124561
+ const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts");
124562
+ const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity);
124563
+ return createFileDiagnostic(
124564
+ file,
124565
+ Debug.checkDefined(pos),
124566
+ Debug.checkDefined(end) - pos,
124567
+ suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0,
124568
+ libName,
124569
+ suggestion
124570
+ );
124571
+ }
124546
124572
  function getResolvedModule(file, moduleName, mode) {
124547
124573
  var _a2;
124548
124574
  return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode);
@@ -125235,7 +125261,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125235
125261
  if (skipTypeChecking(sourceFile, options, program)) {
125236
125262
  return emptyArray;
125237
125263
  }
125238
- const programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
125264
+ const programDiagnosticsInFile = updateAndGetProgramDiagnostics().getDiagnostics(sourceFile.fileName);
125239
125265
  if (!((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) {
125240
125266
  return programDiagnosticsInFile;
125241
125267
  }
@@ -125582,16 +125608,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125582
125608
  }
125583
125609
  function getOptionsDiagnostics() {
125584
125610
  return sortAndDeduplicateDiagnostics(concatenate(
125585
- programDiagnostics.getGlobalDiagnostics(),
125611
+ updateAndGetProgramDiagnostics().getGlobalDiagnostics(),
125586
125612
  getOptionsDiagnosticsOfConfigFile()
125587
125613
  ));
125588
125614
  }
125589
125615
  function getOptionsDiagnosticsOfConfigFile() {
125590
125616
  if (!options.configFile)
125591
125617
  return emptyArray;
125592
- let diagnostics = programDiagnostics.getDiagnostics(options.configFile.fileName);
125618
+ let diagnostics = updateAndGetProgramDiagnostics().getDiagnostics(options.configFile.fileName);
125593
125619
  forEachResolvedProjectReference2((resolvedRef) => {
125594
- diagnostics = concatenate(diagnostics, programDiagnostics.getDiagnostics(resolvedRef.sourceFile.fileName));
125620
+ diagnostics = concatenate(diagnostics, updateAndGetProgramDiagnostics().getDiagnostics(resolvedRef.sourceFile.fileName));
125595
125621
  });
125596
125622
  return diagnostics;
125597
125623
  }
@@ -125765,7 +125791,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
125765
125791
  }
125766
125792
  function getLibFileFromReference(ref) {
125767
125793
  var _a2;
125768
- const { libFileName } = getLibFileNameFromLibReference(ref);
125794
+ const libFileName = getLibFileNameFromLibReference(ref);
125769
125795
  const actualFileName = libFileName && ((_a2 = resolvedLibReferences == null ? void 0 : resolvedLibReferences.get(libFileName)) == null ? void 0 : _a2.actual);
125770
125796
  return actualFileName !== void 0 ? getSourceFile(actualFileName) : void 0;
125771
125797
  }
@@ -126013,8 +126039,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126013
126039
  return file;
126014
126040
  }
126015
126041
  function addFileIncludeReason(file, reason) {
126016
- if (file)
126017
- fileReasons.add(file.path, reason);
126042
+ if (file) {
126043
+ const existing = fileReasons.get(file.path);
126044
+ if (!some(existing, (r) => fileIncludeReasonIsEqual(r, reason))) {
126045
+ fileReasons.add(file.path, reason);
126046
+ }
126047
+ }
126018
126048
  }
126019
126049
  function addFileToFilesByName(file, path, fileName, redirectedPath) {
126020
126050
  if (redirectedPath) {
@@ -126244,7 +126274,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126244
126274
  }
126245
126275
  function processLibReferenceDirectives(file) {
126246
126276
  forEach(file.libReferenceDirectives, (libReference, index) => {
126247
- const { libName, libFileName } = getLibFileNameFromLibReference(libReference);
126277
+ const libFileName = getLibFileNameFromLibReference(libReference);
126248
126278
  if (libFileName) {
126249
126279
  processRootFile(
126250
126280
  pathForLibFile(libFileName),
@@ -126255,15 +126285,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126255
126285
  { kind: 7 /* LibReferenceDirective */, file: file.path, index }
126256
126286
  );
126257
126287
  } else {
126258
- const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts");
126259
- const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity);
126260
- const diagnostic = suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0;
126261
- const args = suggestion ? [libName, suggestion] : [libName];
126262
126288
  (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({
126263
- kind: 0 /* FilePreprocessingReferencedDiagnostic */,
126264
- reason: { kind: 7 /* LibReferenceDirective */, file: file.path, index },
126265
- diagnostic,
126266
- args
126289
+ kind: 0 /* FilePreprocessingLibreferenceDiagnostic */,
126290
+ reason: { kind: 7 /* LibReferenceDirective */, file: file.path, index }
126267
126291
  });
126268
126292
  }
126269
126293
  });
@@ -126324,7 +126348,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126324
126348
  if (!sourceFile.isDeclarationFile) {
126325
126349
  const absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
126326
126350
  if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
126327
- addProgramDiagnosticExplainingFile(
126351
+ addLazyProgramDiagnosticExplainingFile(
126328
126352
  sourceFile,
126329
126353
  Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,
126330
126354
  [sourceFile.fileName, rootDirectory]
@@ -126454,7 +126478,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126454
126478
  const rootPaths = new Set(rootNames.map(toPath3));
126455
126479
  for (const file of files) {
126456
126480
  if (sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path)) {
126457
- addProgramDiagnosticExplainingFile(
126481
+ addLazyProgramDiagnosticExplainingFile(
126458
126482
  file,
126459
126483
  Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,
126460
126484
  [file.fileName, options.configFilePath || ""]
@@ -126817,31 +126841,90 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126817
126841
  });
126818
126842
  }
126819
126843
  function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) {
126820
- var _a2;
126844
+ let seenReasons;
126845
+ const reasons = file && fileReasons.get(file.path);
126821
126846
  let fileIncludeReasons;
126822
126847
  let relatedInfo;
126823
126848
  let locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0;
126824
- if (file)
126825
- (_a2 = fileReasons.get(file.path)) == null ? void 0 : _a2.forEach(processReason);
126849
+ let fileIncludeReasonDetails;
126850
+ let redirectInfo;
126851
+ let cachedChain = file && (fileReasonsToChain == null ? void 0 : fileReasonsToChain.get(file.path));
126852
+ let chain;
126853
+ if (cachedChain) {
126854
+ if (cachedChain.fileIncludeReasonDetails) {
126855
+ seenReasons = new Set(reasons);
126856
+ reasons == null ? void 0 : reasons.forEach(populateRelatedInfo);
126857
+ } else {
126858
+ reasons == null ? void 0 : reasons.forEach(processReason);
126859
+ }
126860
+ redirectInfo = cachedChain.redirectInfo;
126861
+ } else {
126862
+ reasons == null ? void 0 : reasons.forEach(processReason);
126863
+ redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, getCompilerOptionsForFile(file));
126864
+ }
126826
126865
  if (fileProcessingReason)
126827
126866
  processReason(fileProcessingReason);
126828
- if (locationReason && (fileIncludeReasons == null ? void 0 : fileIncludeReasons.length) === 1)
126829
- fileIncludeReasons = void 0;
126867
+ const processedExtraReason = (seenReasons == null ? void 0 : seenReasons.size) !== (reasons == null ? void 0 : reasons.length);
126868
+ if (locationReason && (seenReasons == null ? void 0 : seenReasons.size) === 1)
126869
+ seenReasons = void 0;
126870
+ if (seenReasons && cachedChain) {
126871
+ if (cachedChain.details && !processedExtraReason) {
126872
+ chain = chainDiagnosticMessages(cachedChain.details, diagnostic, ...args || emptyArray);
126873
+ } else if (cachedChain.fileIncludeReasonDetails) {
126874
+ if (!processedExtraReason) {
126875
+ if (!cachedFileIncludeDetailsHasProcessedExtraReason()) {
126876
+ fileIncludeReasonDetails = cachedChain.fileIncludeReasonDetails;
126877
+ } else {
126878
+ fileIncludeReasons = cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length);
126879
+ }
126880
+ } else {
126881
+ if (!cachedFileIncludeDetailsHasProcessedExtraReason()) {
126882
+ fileIncludeReasons = [...cachedChain.fileIncludeReasonDetails.next, fileIncludeReasons[0]];
126883
+ } else {
126884
+ fileIncludeReasons = append(cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length), fileIncludeReasons[0]);
126885
+ }
126886
+ }
126887
+ }
126888
+ }
126889
+ if (!chain) {
126890
+ if (!fileIncludeReasonDetails)
126891
+ fileIncludeReasonDetails = seenReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon);
126892
+ chain = chainDiagnosticMessages(
126893
+ redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails,
126894
+ diagnostic,
126895
+ ...args || emptyArray
126896
+ );
126897
+ }
126898
+ if (file) {
126899
+ if (cachedChain) {
126900
+ if (!cachedChain.fileIncludeReasonDetails || !processedExtraReason && fileIncludeReasonDetails) {
126901
+ cachedChain.fileIncludeReasonDetails = fileIncludeReasonDetails;
126902
+ }
126903
+ } else {
126904
+ (fileReasonsToChain ?? (fileReasonsToChain = /* @__PURE__ */ new Map())).set(file.path, cachedChain = { fileIncludeReasonDetails, redirectInfo });
126905
+ }
126906
+ if (!cachedChain.details && !processedExtraReason)
126907
+ cachedChain.details = chain.next;
126908
+ }
126830
126909
  const location = locationReason && getReferencedFileLocation(program, locationReason);
126831
- const fileIncludeReasonDetails = fileIncludeReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon);
126832
- const optionsForFile = file && getCompilerOptionsForFile(file) || options;
126833
- const redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, optionsForFile);
126834
- const chain = chainDiagnosticMessages(redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, diagnostic, ...args || emptyArray);
126835
126910
  return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo);
126836
126911
  function processReason(reason) {
126837
- (fileIncludeReasons || (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason));
126912
+ if (seenReasons == null ? void 0 : seenReasons.has(reason))
126913
+ return;
126914
+ (seenReasons ?? (seenReasons = /* @__PURE__ */ new Set())).add(reason);
126915
+ (fileIncludeReasons ?? (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason));
126916
+ populateRelatedInfo(reason);
126917
+ }
126918
+ function populateRelatedInfo(reason) {
126838
126919
  if (!locationReason && isReferencedFile(reason)) {
126839
126920
  locationReason = reason;
126840
126921
  } else if (locationReason !== reason) {
126841
- relatedInfo = append(relatedInfo, fileIncludeReasonToRelatedInformation(reason));
126922
+ relatedInfo = append(relatedInfo, getFileIncludeReasonToRelatedInformation(reason));
126842
126923
  }
126843
- if (reason === fileProcessingReason)
126844
- fileProcessingReason = void 0;
126924
+ }
126925
+ function cachedFileIncludeDetailsHasProcessedExtraReason() {
126926
+ var _a2;
126927
+ return ((_a2 = cachedChain.fileIncludeReasonDetails.next) == null ? void 0 : _a2.length) !== (reasons == null ? void 0 : reasons.length);
126845
126928
  }
126846
126929
  }
126847
126930
  function addFilePreprocessingFileExplainingDiagnostic(file, fileProcessingReason, diagnostic, args) {
@@ -126853,14 +126936,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126853
126936
  args
126854
126937
  });
126855
126938
  }
126856
- function addProgramDiagnosticExplainingFile(file, diagnostic, args) {
126857
- programDiagnostics.add(createDiagnosticExplainingFile(
126858
- file,
126859
- /*fileProcessingReason*/
126860
- void 0,
126861
- diagnostic,
126862
- args
126863
- ));
126939
+ function addLazyProgramDiagnosticExplainingFile(file, diagnostic, args) {
126940
+ lazyProgramDiagnosticExplainingFile.push({ file, diagnostic, args });
126941
+ }
126942
+ function getFileIncludeReasonToRelatedInformation(reason) {
126943
+ let relatedInfo = reasonToRelatedInfo == null ? void 0 : reasonToRelatedInfo.get(reason);
126944
+ if (relatedInfo === void 0)
126945
+ (reasonToRelatedInfo ?? (reasonToRelatedInfo = /* @__PURE__ */ new Map())).set(reason, relatedInfo = fileIncludeReasonToRelatedInformation(reason) ?? false);
126946
+ return relatedInfo || void 0;
126864
126947
  }
126865
126948
  function fileIncludeReasonToRelatedInformation(reason) {
126866
126949
  if (isReferencedFile(reason)) {
@@ -126935,9 +127018,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126935
127018
  message = Diagnostics.File_is_library_specified_here;
126936
127019
  break;
126937
127020
  }
126938
- const target = getEmitScriptTarget(options);
126939
- const targetText = getNameOfScriptTarget(target);
126940
- configFileNode = target === 2 /* ES2015 */ ? getOptionsSyntaxByValue("target", "es2015") ?? getOptionsSyntaxByValue("target", "es6") : targetText ? getOptionsSyntaxByValue("target", targetText) : void 0;
127021
+ const target = getNameOfScriptTarget(getEmitScriptTarget(options));
127022
+ configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0;
126941
127023
  message = Diagnostics.File_is_default_library_for_target_specified_here;
126942
127024
  break;
126943
127025
  default:
@@ -145662,7 +145744,7 @@ function getSymbolForContextualType(node, checker) {
145662
145744
  if (element) {
145663
145745
  const contextualType = checker.getContextualTypeForObjectLiteralElement(element);
145664
145746
  const symbol = contextualType == null ? void 0 : contextualType.getSymbol();
145665
- if (symbol && !(getCheckFlags(symbol) & 6 /* SyntheticMember */)) {
145747
+ if (symbol && !(getCheckFlags(symbol) & 6 /* Synthetic */)) {
145666
145748
  return symbol;
145667
145749
  }
145668
145750
  }
@@ -170385,7 +170467,7 @@ var Core;
170385
170467
  baseSymbol = void 0;
170386
170468
  }
170387
170469
  }
170388
- return search.includes(baseSymbol || rootSymbol || sym) ? { symbol: rootSymbol && !(getCheckFlags(sym) & 6 /* SyntheticMember */) ? rootSymbol : sym, kind } : void 0;
170470
+ return search.includes(baseSymbol || rootSymbol || sym) ? { symbol: rootSymbol && !(getCheckFlags(sym) & 6 /* Synthetic */) ? rootSymbol : sym, kind } : void 0;
170389
170471
  },
170390
170472
  /*allowBaseTypes*/
170391
170473
  (rootSymbol) => !(search.parents && !search.parents.some((parent2) => explicitlyInheritsFrom(rootSymbol.parent, parent2, state.inheritsFromCache, checker)))
@@ -174210,7 +174292,7 @@ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeCheck
174210
174292
  if (flags & 131072 /* Signature */)
174211
174293
  return "index" /* indexSignatureElement */;
174212
174294
  if (flags & 4 /* Property */) {
174213
- if (flags & 33554432 /* Transient */ && symbol.links.checkFlags & 6 /* SyntheticMember */) {
174295
+ if (flags & 33554432 /* Transient */ && symbol.links.checkFlags & 6 /* Synthetic */) {
174214
174296
  const unionPropertyKind = forEach(typeChecker.getRootSymbols(symbol), (rootSymbol) => {
174215
174297
  const rootSymbolFlags = rootSymbol.getFlags();
174216
174298
  if (rootSymbolFlags & (98308 /* PropertyOrAccessor */ | 3 /* Variable */)) {
@@ -174238,8 +174320,6 @@ function getNormalizedSymbolModifiers(symbol) {
174238
174320
  if (modifiers) {
174239
174321
  return modifiers.split(",");
174240
174322
  }
174241
- } else if (symbol.flags & 64 /* Interface */) {
174242
- return ["declare" /* ambientModifier */];
174243
174323
  }
174244
174324
  return [];
174245
174325
  }
@@ -179761,8 +179841,6 @@ __export(ts_exports2, {
179761
179841
  getNameOfDeclaration: () => getNameOfDeclaration,
179762
179842
  getNameOfExpando: () => getNameOfExpando,
179763
179843
  getNameOfJSDocTypedef: () => getNameOfJSDocTypedef,
179764
- getNameOfModuleKind: () => getNameOfModuleKind,
179765
- getNameOfModuleResolutionKind: () => getNameOfModuleResolutionKind,
179766
179844
  getNameOfScriptTarget: () => getNameOfScriptTarget,
179767
179845
  getNameOrArgument: () => getNameOrArgument,
179768
179846
  getNameTable: () => getNameTable,
@@ -180771,7 +180849,6 @@ __export(ts_exports2, {
180771
180849
  moduleOptionDeclaration: () => moduleOptionDeclaration,
180772
180850
  moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo,
180773
180851
  moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter,
180774
- moduleResolutionOptionDeclaration: () => moduleResolutionOptionDeclaration,
180775
180852
  moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations,
180776
180853
  moduleResolutionSupportsPackageJsonExportsAndImports: () => moduleResolutionSupportsPackageJsonExportsAndImports,
180777
180854
  moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules,
@@ -180829,6 +180906,7 @@ __export(ts_exports2, {
180829
180906
  or: () => or,
180830
180907
  orderedRemoveItem: () => orderedRemoveItem,
180831
180908
  orderedRemoveItemAt: () => orderedRemoveItemAt,
180909
+ packageIdIsEqual: () => packageIdIsEqual,
180832
180910
  packageIdToPackageName: () => packageIdToPackageName,
180833
180911
  packageIdToString: () => packageIdToString,
180834
180912
  paramHelper: () => paramHelper,
@@ -194193,8 +194271,6 @@ if (typeof console !== "undefined") {
194193
194271
  getNameOfDeclaration,
194194
194272
  getNameOfExpando,
194195
194273
  getNameOfJSDocTypedef,
194196
- getNameOfModuleKind,
194197
- getNameOfModuleResolutionKind,
194198
194274
  getNameOfScriptTarget,
194199
194275
  getNameOrArgument,
194200
194276
  getNameTable,
@@ -195203,7 +195279,6 @@ if (typeof console !== "undefined") {
195203
195279
  moduleOptionDeclaration,
195204
195280
  moduleResolutionIsEqualTo,
195205
195281
  moduleResolutionNameAndModeGetter,
195206
- moduleResolutionOptionDeclaration,
195207
195282
  moduleResolutionOptionDeclarations,
195208
195283
  moduleResolutionSupportsPackageJsonExportsAndImports,
195209
195284
  moduleResolutionUsesNodeModules,
@@ -195261,6 +195336,7 @@ if (typeof console !== "undefined") {
195261
195336
  or,
195262
195337
  orderedRemoveItem,
195263
195338
  orderedRemoveItemAt,
195339
+ packageIdIsEqual,
195264
195340
  packageIdToPackageName,
195265
195341
  packageIdToString,
195266
195342
  paramHelper,