@typescript-deploys/pr-build 5.3.0-pr-56201-9 → 5.3.0-pr-56220-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.
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.3";
21
- var version = `${versionMajorMinor}.0-insiders.20231024`;
21
+ var version = `${versionMajorMinor}.0-insiders.20231031`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -3460,32 +3460,43 @@ var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => {
3460
3460
  })(NodeFlags || {});
3461
3461
  var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
3462
3462
  ModifierFlags3[ModifierFlags3["None"] = 0] = "None";
3463
- ModifierFlags3[ModifierFlags3["Export"] = 1] = "Export";
3464
- ModifierFlags3[ModifierFlags3["Ambient"] = 2] = "Ambient";
3465
- ModifierFlags3[ModifierFlags3["Public"] = 4] = "Public";
3466
- ModifierFlags3[ModifierFlags3["Private"] = 8] = "Private";
3467
- ModifierFlags3[ModifierFlags3["Protected"] = 16] = "Protected";
3468
- ModifierFlags3[ModifierFlags3["Static"] = 32] = "Static";
3469
- ModifierFlags3[ModifierFlags3["Readonly"] = 64] = "Readonly";
3470
- ModifierFlags3[ModifierFlags3["Accessor"] = 128] = "Accessor";
3471
- ModifierFlags3[ModifierFlags3["Abstract"] = 256] = "Abstract";
3472
- ModifierFlags3[ModifierFlags3["Async"] = 512] = "Async";
3473
- ModifierFlags3[ModifierFlags3["Default"] = 1024] = "Default";
3474
- ModifierFlags3[ModifierFlags3["Const"] = 2048] = "Const";
3475
- ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 4096] = "HasComputedJSDocModifiers";
3476
- ModifierFlags3[ModifierFlags3["Deprecated"] = 8192] = "Deprecated";
3477
- ModifierFlags3[ModifierFlags3["Override"] = 16384] = "Override";
3478
- ModifierFlags3[ModifierFlags3["In"] = 32768] = "In";
3479
- ModifierFlags3[ModifierFlags3["Out"] = 65536] = "Out";
3480
- ModifierFlags3[ModifierFlags3["Decorator"] = 131072] = "Decorator";
3463
+ ModifierFlags3[ModifierFlags3["Public"] = 1] = "Public";
3464
+ ModifierFlags3[ModifierFlags3["Private"] = 2] = "Private";
3465
+ ModifierFlags3[ModifierFlags3["Protected"] = 4] = "Protected";
3466
+ ModifierFlags3[ModifierFlags3["Readonly"] = 8] = "Readonly";
3467
+ ModifierFlags3[ModifierFlags3["Override"] = 16] = "Override";
3468
+ ModifierFlags3[ModifierFlags3["Export"] = 32] = "Export";
3469
+ ModifierFlags3[ModifierFlags3["Abstract"] = 64] = "Abstract";
3470
+ ModifierFlags3[ModifierFlags3["Ambient"] = 128] = "Ambient";
3471
+ ModifierFlags3[ModifierFlags3["Static"] = 256] = "Static";
3472
+ ModifierFlags3[ModifierFlags3["Accessor"] = 512] = "Accessor";
3473
+ ModifierFlags3[ModifierFlags3["Async"] = 1024] = "Async";
3474
+ ModifierFlags3[ModifierFlags3["Default"] = 2048] = "Default";
3475
+ ModifierFlags3[ModifierFlags3["Const"] = 4096] = "Const";
3476
+ ModifierFlags3[ModifierFlags3["In"] = 8192] = "In";
3477
+ ModifierFlags3[ModifierFlags3["Out"] = 16384] = "Out";
3478
+ ModifierFlags3[ModifierFlags3["Decorator"] = 32768] = "Decorator";
3479
+ ModifierFlags3[ModifierFlags3["Deprecated"] = 65536] = "Deprecated";
3480
+ ModifierFlags3[ModifierFlags3["JSDocPublic"] = 8388608] = "JSDocPublic";
3481
+ ModifierFlags3[ModifierFlags3["JSDocPrivate"] = 16777216] = "JSDocPrivate";
3482
+ ModifierFlags3[ModifierFlags3["JSDocProtected"] = 33554432] = "JSDocProtected";
3483
+ ModifierFlags3[ModifierFlags3["JSDocReadonly"] = 67108864] = "JSDocReadonly";
3484
+ ModifierFlags3[ModifierFlags3["JSDocOverride"] = 134217728] = "JSDocOverride";
3485
+ ModifierFlags3[ModifierFlags3["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers";
3486
+ ModifierFlags3[ModifierFlags3["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers";
3487
+ ModifierFlags3[ModifierFlags3["SyntacticModifiers"] = 65535] = "SyntacticModifiers";
3488
+ ModifierFlags3[ModifierFlags3["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers";
3489
+ ModifierFlags3[ModifierFlags3["JSDocOnlyModifiers"] = 65536 /* Deprecated */] = "JSDocOnlyModifiers";
3490
+ ModifierFlags3[ModifierFlags3["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers";
3491
+ ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers";
3481
3492
  ModifierFlags3[ModifierFlags3["HasComputedFlags"] = 536870912] = "HasComputedFlags";
3482
- ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 28] = "AccessibilityModifier";
3483
- ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 16476] = "ParameterPropertyModifier";
3484
- ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier";
3485
- ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 117086] = "TypeScriptModifier";
3486
- ModifierFlags3[ModifierFlags3["ExportDefault"] = 1025] = "ExportDefault";
3487
- ModifierFlags3[ModifierFlags3["All"] = 258047] = "All";
3488
- ModifierFlags3[ModifierFlags3["Modifier"] = 126975] = "Modifier";
3493
+ ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 7] = "AccessibilityModifier";
3494
+ ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier";
3495
+ ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier";
3496
+ ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 28895] = "TypeScriptModifier";
3497
+ ModifierFlags3[ModifierFlags3["ExportDefault"] = 2080] = "ExportDefault";
3498
+ ModifierFlags3[ModifierFlags3["All"] = 131071] = "All";
3499
+ ModifierFlags3[ModifierFlags3["Modifier"] = 98303] = "Modifier";
3489
3500
  return ModifierFlags3;
3490
3501
  })(ModifierFlags || {});
3491
3502
  var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {
@@ -6633,7 +6644,7 @@ var Diagnostics = {
6633
6644
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
6634
6645
  All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
6635
6646
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
6636
- An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
6647
+ An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),
6637
6648
  _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
6638
6649
  We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
6639
6650
  Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
@@ -6654,6 +6665,8 @@ var Diagnostics = {
6654
6665
  The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),
6655
6666
  An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),
6656
6667
  Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."),
6668
+ A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),
6669
+ A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),
6657
6670
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6658
6671
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6659
6672
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -10070,7 +10083,7 @@ function createTextChangeRange(span, newLength) {
10070
10083
  }
10071
10084
  var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
10072
10085
  function isParameterPropertyDeclaration(node, parent) {
10073
- return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 176 /* Constructor */;
10086
+ return isParameter(node) && hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) && parent.kind === 176 /* Constructor */;
10074
10087
  }
10075
10088
  function walkUpBindingElementsAndPatterns(binding) {
10076
10089
  let node = binding.parent;
@@ -10345,7 +10358,7 @@ function getDecorators(node) {
10345
10358
  }
10346
10359
  }
10347
10360
  function getModifiers(node) {
10348
- if (hasSyntacticModifier(node, 126975 /* Modifier */)) {
10361
+ if (hasSyntacticModifier(node, 98303 /* Modifier */)) {
10349
10362
  return filter(node.modifiers, isModifier);
10350
10363
  }
10351
10364
  }
@@ -10739,7 +10752,7 @@ function isModifierKind(token) {
10739
10752
  return false;
10740
10753
  }
10741
10754
  function isParameterPropertyModifier(kind) {
10742
- return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */);
10755
+ return !!(modifierToFlag(kind) & 31 /* ParameterPropertyModifier */);
10743
10756
  }
10744
10757
  function isClassMemberModifier(idToken) {
10745
10758
  return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */;
@@ -11083,10 +11096,10 @@ function hasScopeMarker(statements) {
11083
11096
  return some(statements, isScopeMarker);
11084
11097
  }
11085
11098
  function needsScopeMarker(result) {
11086
- return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 1 /* Export */) && !isAmbientModule(result);
11099
+ return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 32 /* Export */) && !isAmbientModule(result);
11087
11100
  }
11088
11101
  function isExternalModuleIndicator(result) {
11089
- return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */);
11102
+ return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */);
11090
11103
  }
11091
11104
  function isForInOrOfStatement(node) {
11092
11105
  return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */;
@@ -12273,7 +12286,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) {
12273
12286
  return false;
12274
12287
  }
12275
12288
  function isAmbientPropertyDeclaration(node) {
12276
- return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */);
12289
+ return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 128 /* Ambient */);
12277
12290
  }
12278
12291
  function isBlockScope(node, parentNode) {
12279
12292
  switch (node.kind) {
@@ -12583,10 +12596,10 @@ function isJsonSourceFile(file) {
12583
12596
  return file.scriptKind === 6 /* JSON */;
12584
12597
  }
12585
12598
  function isEnumConst(node) {
12586
- return !!(getCombinedModifierFlags(node) & 2048 /* Const */);
12599
+ return !!(getCombinedModifierFlags(node) & 4096 /* Const */);
12587
12600
  }
12588
12601
  function isDeclarationReadonly(declaration) {
12589
- return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent));
12602
+ return !!(getCombinedModifierFlags(declaration) & 8 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent));
12590
12603
  }
12591
12604
  function isVarAwaitUsing(node) {
12592
12605
  return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */;
@@ -14231,7 +14244,7 @@ function getFunctionFlags(node) {
14231
14244
  flags |= 1 /* Generator */;
14232
14245
  }
14233
14246
  case 219 /* ArrowFunction */:
14234
- if (hasSyntacticModifier(node, 512 /* Async */)) {
14247
+ if (hasSyntacticModifier(node, 1024 /* Async */)) {
14235
14248
  flags |= 2 /* Async */;
14236
14249
  }
14237
14250
  break;
@@ -14247,7 +14260,7 @@ function isAsyncFunction(node) {
14247
14260
  case 218 /* FunctionExpression */:
14248
14261
  case 219 /* ArrowFunction */:
14249
14262
  case 174 /* MethodDeclaration */:
14250
- return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */);
14263
+ return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 1024 /* Async */);
14251
14264
  }
14252
14265
  return false;
14253
14266
  }
@@ -15359,25 +15372,25 @@ function isStatic(node) {
15359
15372
  return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node);
15360
15373
  }
15361
15374
  function hasStaticModifier(node) {
15362
- return hasSyntacticModifier(node, 32 /* Static */);
15375
+ return hasSyntacticModifier(node, 256 /* Static */);
15363
15376
  }
15364
15377
  function hasOverrideModifier(node) {
15365
- return hasEffectiveModifier(node, 16384 /* Override */);
15378
+ return hasEffectiveModifier(node, 16 /* Override */);
15366
15379
  }
15367
15380
  function hasAbstractModifier(node) {
15368
- return hasSyntacticModifier(node, 256 /* Abstract */);
15381
+ return hasSyntacticModifier(node, 64 /* Abstract */);
15369
15382
  }
15370
15383
  function hasAmbientModifier(node) {
15371
- return hasSyntacticModifier(node, 2 /* Ambient */);
15384
+ return hasSyntacticModifier(node, 128 /* Ambient */);
15372
15385
  }
15373
15386
  function hasAccessorModifier(node) {
15374
- return hasSyntacticModifier(node, 128 /* Accessor */);
15387
+ return hasSyntacticModifier(node, 512 /* Accessor */);
15375
15388
  }
15376
15389
  function hasEffectiveReadonlyModifier(node) {
15377
- return hasEffectiveModifier(node, 64 /* Readonly */);
15390
+ return hasEffectiveModifier(node, 8 /* Readonly */);
15378
15391
  }
15379
15392
  function hasDecorators(node) {
15380
- return hasSyntacticModifier(node, 131072 /* Decorator */);
15393
+ return hasSyntacticModifier(node, 32768 /* Decorator */);
15381
15394
  }
15382
15395
  function getSelectedEffectiveModifierFlags(node, flags) {
15383
15396
  return getEffectiveModifierFlags(node) & flags;
@@ -15392,10 +15405,13 @@ function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) {
15392
15405
  if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) {
15393
15406
  node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */;
15394
15407
  }
15395
- if (includeJSDoc && !(node.modifierFlagsCache & 4096 /* HasComputedJSDocModifiers */) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) {
15396
- node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | 4096 /* HasComputedJSDocModifiers */;
15408
+ if (alwaysIncludeJSDoc || includeJSDoc && isInJSFile(node)) {
15409
+ if (!(node.modifierFlagsCache & 268435456 /* HasComputedJSDocModifiers */) && node.parent) {
15410
+ node.modifierFlagsCache |= getRawJSDocModifierFlagsNoCache(node) | 268435456 /* HasComputedJSDocModifiers */;
15411
+ }
15412
+ return selectEffectiveModifierFlags(node.modifierFlagsCache);
15397
15413
  }
15398
- return node.modifierFlagsCache & ~(536870912 /* HasComputedFlags */ | 4096 /* HasComputedJSDocModifiers */);
15414
+ return selectSyntacticModifierFlags(node.modifierFlagsCache);
15399
15415
  }
15400
15416
  function getEffectiveModifierFlags(node) {
15401
15417
  return getModifierFlagsWorker(
@@ -15411,33 +15427,42 @@ function getSyntacticModifierFlags(node) {
15411
15427
  false
15412
15428
  );
15413
15429
  }
15414
- function getJSDocModifierFlagsNoCache(node) {
15430
+ function getRawJSDocModifierFlagsNoCache(node) {
15415
15431
  let flags = 0 /* None */;
15416
15432
  if (!!node.parent && !isParameter(node)) {
15417
15433
  if (isInJSFile(node)) {
15418
15434
  if (getJSDocPublicTagNoCache(node))
15419
- flags |= 4 /* Public */;
15435
+ flags |= 8388608 /* JSDocPublic */;
15420
15436
  if (getJSDocPrivateTagNoCache(node))
15421
- flags |= 8 /* Private */;
15437
+ flags |= 16777216 /* JSDocPrivate */;
15422
15438
  if (getJSDocProtectedTagNoCache(node))
15423
- flags |= 16 /* Protected */;
15439
+ flags |= 33554432 /* JSDocProtected */;
15424
15440
  if (getJSDocReadonlyTagNoCache(node))
15425
- flags |= 64 /* Readonly */;
15441
+ flags |= 67108864 /* JSDocReadonly */;
15426
15442
  if (getJSDocOverrideTagNoCache(node))
15427
- flags |= 16384 /* Override */;
15443
+ flags |= 134217728 /* JSDocOverride */;
15428
15444
  }
15429
15445
  if (getJSDocDeprecatedTagNoCache(node))
15430
- flags |= 8192 /* Deprecated */;
15446
+ flags |= 65536 /* Deprecated */;
15431
15447
  }
15432
15448
  return flags;
15433
15449
  }
15450
+ function selectSyntacticModifierFlags(flags) {
15451
+ return flags & 65535 /* SyntacticModifiers */;
15452
+ }
15453
+ function selectEffectiveModifierFlags(flags) {
15454
+ return flags & 131071 /* NonCacheOnlyModifiers */ | (flags & 260046848 /* JSDocCacheOnlyModifiers */) >>> 23;
15455
+ }
15456
+ function getJSDocModifierFlagsNoCache(node) {
15457
+ return selectEffectiveModifierFlags(getRawJSDocModifierFlagsNoCache(node));
15458
+ }
15434
15459
  function getEffectiveModifierFlagsNoCache(node) {
15435
15460
  return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node);
15436
15461
  }
15437
15462
  function getSyntacticModifierFlagsNoCache(node) {
15438
15463
  let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */;
15439
15464
  if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) {
15440
- flags |= 1 /* Export */;
15465
+ flags |= 32 /* Export */;
15441
15466
  }
15442
15467
  return flags;
15443
15468
  }
@@ -15453,37 +15478,37 @@ function modifiersToFlags(modifiers) {
15453
15478
  function modifierToFlag(token) {
15454
15479
  switch (token) {
15455
15480
  case 126 /* StaticKeyword */:
15456
- return 32 /* Static */;
15481
+ return 256 /* Static */;
15457
15482
  case 125 /* PublicKeyword */:
15458
- return 4 /* Public */;
15483
+ return 1 /* Public */;
15459
15484
  case 124 /* ProtectedKeyword */:
15460
- return 16 /* Protected */;
15485
+ return 4 /* Protected */;
15461
15486
  case 123 /* PrivateKeyword */:
15462
- return 8 /* Private */;
15487
+ return 2 /* Private */;
15463
15488
  case 128 /* AbstractKeyword */:
15464
- return 256 /* Abstract */;
15489
+ return 64 /* Abstract */;
15465
15490
  case 129 /* AccessorKeyword */:
15466
- return 128 /* Accessor */;
15491
+ return 512 /* Accessor */;
15467
15492
  case 95 /* ExportKeyword */:
15468
- return 1 /* Export */;
15493
+ return 32 /* Export */;
15469
15494
  case 138 /* DeclareKeyword */:
15470
- return 2 /* Ambient */;
15495
+ return 128 /* Ambient */;
15471
15496
  case 87 /* ConstKeyword */:
15472
- return 2048 /* Const */;
15497
+ return 4096 /* Const */;
15473
15498
  case 90 /* DefaultKeyword */:
15474
- return 1024 /* Default */;
15499
+ return 2048 /* Default */;
15475
15500
  case 134 /* AsyncKeyword */:
15476
- return 512 /* Async */;
15501
+ return 1024 /* Async */;
15477
15502
  case 148 /* ReadonlyKeyword */:
15478
- return 64 /* Readonly */;
15503
+ return 8 /* Readonly */;
15479
15504
  case 164 /* OverrideKeyword */:
15480
- return 16384 /* Override */;
15505
+ return 16 /* Override */;
15481
15506
  case 103 /* InKeyword */:
15482
- return 32768 /* In */;
15507
+ return 8192 /* In */;
15483
15508
  case 147 /* OutKeyword */:
15484
- return 65536 /* Out */;
15509
+ return 16384 /* Out */;
15485
15510
  case 170 /* Decorator */:
15486
- return 131072 /* Decorator */;
15511
+ return 32768 /* Decorator */;
15487
15512
  }
15488
15513
  return 0 /* None */;
15489
15514
  }
@@ -15620,7 +15645,7 @@ function getLocalSymbolForExportDefault(symbol) {
15620
15645
  return void 0;
15621
15646
  }
15622
15647
  function isExportDefaultSymbol(symbol) {
15623
- return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 1024 /* Default */);
15648
+ return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 2048 /* Default */);
15624
15649
  }
15625
15650
  function tryExtractTSExtension(fileName) {
15626
15651
  return find(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension));
@@ -15839,16 +15864,16 @@ function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) {
15839
15864
  if (s.valueDeclaration) {
15840
15865
  const declaration = isWrite && s.declarations && find(s.declarations, isSetAccessorDeclaration) || s.flags & 32768 /* GetAccessor */ && find(s.declarations, isGetAccessorDeclaration) || s.valueDeclaration;
15841
15866
  const flags = getCombinedModifierFlags(declaration);
15842
- return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */;
15867
+ return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~7 /* AccessibilityModifier */;
15843
15868
  }
15844
15869
  if (getCheckFlags(s) & 6 /* Synthetic */) {
15845
15870
  const checkFlags = s.links.checkFlags;
15846
- const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 8 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 4 /* Public */ : 16 /* Protected */;
15847
- const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 32 /* Static */ : 0;
15871
+ const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 2 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 1 /* Public */ : 4 /* Protected */;
15872
+ const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 256 /* Static */ : 0;
15848
15873
  return accessModifier | staticModifier;
15849
15874
  }
15850
15875
  if (s.flags & 4194304 /* Prototype */) {
15851
- return 4 /* Public */ | 32 /* Static */;
15876
+ return 1 /* Public */ | 256 /* Static */;
15852
15877
  }
15853
15878
  return 0;
15854
15879
  }
@@ -17110,7 +17135,7 @@ function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
17110
17135
  if (node.kind !== 167 /* ComputedPropertyName */) {
17111
17136
  return false;
17112
17137
  }
17113
- if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) {
17138
+ if (hasSyntacticModifier(node.parent, 64 /* Abstract */)) {
17114
17139
  return true;
17115
17140
  }
17116
17141
  const containerKind = node.parent.parent.kind;
@@ -19084,35 +19109,35 @@ function createNodeFactory(flags, baseFactory2) {
19084
19109
  }
19085
19110
  function createModifiersFromModifierFlags(flags2) {
19086
19111
  const result = [];
19087
- if (flags2 & 1 /* Export */)
19112
+ if (flags2 & 32 /* Export */)
19088
19113
  result.push(createModifier(95 /* ExportKeyword */));
19089
- if (flags2 & 2 /* Ambient */)
19114
+ if (flags2 & 128 /* Ambient */)
19090
19115
  result.push(createModifier(138 /* DeclareKeyword */));
19091
- if (flags2 & 1024 /* Default */)
19116
+ if (flags2 & 2048 /* Default */)
19092
19117
  result.push(createModifier(90 /* DefaultKeyword */));
19093
- if (flags2 & 2048 /* Const */)
19118
+ if (flags2 & 4096 /* Const */)
19094
19119
  result.push(createModifier(87 /* ConstKeyword */));
19095
- if (flags2 & 4 /* Public */)
19120
+ if (flags2 & 1 /* Public */)
19096
19121
  result.push(createModifier(125 /* PublicKeyword */));
19097
- if (flags2 & 8 /* Private */)
19122
+ if (flags2 & 2 /* Private */)
19098
19123
  result.push(createModifier(123 /* PrivateKeyword */));
19099
- if (flags2 & 16 /* Protected */)
19124
+ if (flags2 & 4 /* Protected */)
19100
19125
  result.push(createModifier(124 /* ProtectedKeyword */));
19101
- if (flags2 & 256 /* Abstract */)
19126
+ if (flags2 & 64 /* Abstract */)
19102
19127
  result.push(createModifier(128 /* AbstractKeyword */));
19103
- if (flags2 & 32 /* Static */)
19128
+ if (flags2 & 256 /* Static */)
19104
19129
  result.push(createModifier(126 /* StaticKeyword */));
19105
- if (flags2 & 16384 /* Override */)
19130
+ if (flags2 & 16 /* Override */)
19106
19131
  result.push(createModifier(164 /* OverrideKeyword */));
19107
- if (flags2 & 64 /* Readonly */)
19132
+ if (flags2 & 8 /* Readonly */)
19108
19133
  result.push(createModifier(148 /* ReadonlyKeyword */));
19109
- if (flags2 & 128 /* Accessor */)
19134
+ if (flags2 & 512 /* Accessor */)
19110
19135
  result.push(createModifier(129 /* AccessorKeyword */));
19111
- if (flags2 & 512 /* Async */)
19136
+ if (flags2 & 1024 /* Async */)
19112
19137
  result.push(createModifier(134 /* AsyncKeyword */));
19113
- if (flags2 & 32768 /* In */)
19138
+ if (flags2 & 8192 /* In */)
19114
19139
  result.push(createModifier(103 /* InKeyword */));
19115
- if (flags2 & 65536 /* Out */)
19140
+ if (flags2 & 16384 /* Out */)
19116
19141
  result.push(createModifier(147 /* OutKeyword */));
19117
19142
  return result.length ? result : void 0;
19118
19143
  }
@@ -19161,7 +19186,7 @@ function createNodeFactory(flags, baseFactory2) {
19161
19186
  if (isThisIdentifier(node.name)) {
19162
19187
  node.transformFlags = 1 /* ContainsTypeScript */;
19163
19188
  } else {
19164
- node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */);
19189
+ node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 31 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */);
19165
19190
  }
19166
19191
  node.jsDoc = void 0;
19167
19192
  return node;
@@ -19210,8 +19235,8 @@ function createNodeFactory(flags, baseFactory2) {
19210
19235
  node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;
19211
19236
  node.type = type;
19212
19237
  node.initializer = asInitializer(initializer);
19213
- const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */;
19214
- node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */;
19238
+ const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 128 /* Ambient */;
19239
+ node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 256 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */;
19215
19240
  node.jsDoc = void 0;
19216
19241
  return node;
19217
19242
  }
@@ -19250,7 +19275,7 @@ function createNodeFactory(flags, baseFactory2) {
19250
19275
  if (!node.body) {
19251
19276
  node.transformFlags = 1 /* ContainsTypeScript */;
19252
19277
  } else {
19253
- const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
19278
+ const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
19254
19279
  const isGenerator = !!node.asteriskToken;
19255
19280
  const isAsyncGenerator = isAsync && isGenerator;
19256
19281
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
@@ -19993,7 +20018,7 @@ function createNodeFactory(flags, baseFactory2) {
19993
20018
  node.parameters = createNodeArray(parameters);
19994
20019
  node.type = type;
19995
20020
  node.body = body;
19996
- const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
20021
+ const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
19997
20022
  const isGenerator = !!node.asteriskToken;
19998
20023
  const isAsyncGenerator = isAsync && isGenerator;
19999
20024
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
@@ -20017,7 +20042,7 @@ function createNodeFactory(flags, baseFactory2) {
20017
20042
  node.type = type;
20018
20043
  node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */);
20019
20044
  node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body);
20020
- const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
20045
+ const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
20021
20046
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */;
20022
20047
  node.typeArguments = void 0;
20023
20048
  node.jsDoc = void 0;
@@ -20369,7 +20394,7 @@ function createNodeFactory(flags, baseFactory2) {
20369
20394
  node.modifiers = asNodeArray(modifiers);
20370
20395
  node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
20371
20396
  node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList);
20372
- if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
20397
+ if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
20373
20398
  node.transformFlags = 1 /* ContainsTypeScript */;
20374
20399
  }
20375
20400
  node.jsDoc = void 0;
@@ -20619,10 +20644,10 @@ function createNodeFactory(flags, baseFactory2) {
20619
20644
  node.parameters = createNodeArray(parameters);
20620
20645
  node.type = type;
20621
20646
  node.body = body;
20622
- if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
20647
+ if (!node.body || modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
20623
20648
  node.transformFlags = 1 /* ContainsTypeScript */;
20624
20649
  } else {
20625
- const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
20650
+ const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
20626
20651
  const isGenerator = !!node.asteriskToken;
20627
20652
  const isAsyncGenerator = isAsync && isGenerator;
20628
20653
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
@@ -20653,7 +20678,7 @@ function createNodeFactory(flags, baseFactory2) {
20653
20678
  node.typeParameters = asNodeArray(typeParameters);
20654
20679
  node.heritageClauses = asNodeArray(heritageClauses);
20655
20680
  node.members = createNodeArray(members);
20656
- if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
20681
+ if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
20657
20682
  node.transformFlags = 1 /* ContainsTypeScript */;
20658
20683
  } else {
20659
20684
  node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
@@ -20715,7 +20740,7 @@ function createNodeFactory(flags, baseFactory2) {
20715
20740
  node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */);
20716
20741
  node.name = name;
20717
20742
  node.body = body;
20718
- if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
20743
+ if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
20719
20744
  node.transformFlags = 1 /* ContainsTypeScript */;
20720
20745
  } else {
20721
20746
  node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */;
@@ -22146,7 +22171,7 @@ function createNodeFactory(flags, baseFactory2) {
22146
22171
  return qualifiedName;
22147
22172
  }
22148
22173
  function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) {
22149
- if (ns && hasSyntacticModifier(node, 1 /* Export */)) {
22174
+ if (ns && hasSyntacticModifier(node, 32 /* Export */)) {
22150
22175
  return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps);
22151
22176
  }
22152
22177
  return getExportName(node, allowComments, allowSourceMaps);
@@ -31347,11 +31372,11 @@ var Parser;
31347
31372
  const modifierFlags = modifiersToFlags(modifiers);
31348
31373
  parseExpected(100 /* FunctionKeyword */);
31349
31374
  const asteriskToken = parseOptionalToken(42 /* AsteriskToken */);
31350
- const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier();
31375
+ const name = modifierFlags & 2048 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier();
31351
31376
  const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;
31352
- const isAsync = modifierFlags & 512 /* Async */ ? 2 /* Await */ : 0 /* None */;
31377
+ const isAsync = modifierFlags & 1024 /* Async */ ? 2 /* Await */ : 0 /* None */;
31353
31378
  const typeParameters = parseTypeParameters();
31354
- if (modifierFlags & 1 /* Export */)
31379
+ if (modifierFlags & 32 /* Export */)
31355
31380
  setAwaitContext(
31356
31381
  /*value*/
31357
31382
  true
@@ -37175,8 +37200,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
37175
37200
  if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
37176
37201
  features |= 32 /* EsmMode */;
37177
37202
  }
37178
- const useImportCondition = resolutionMode === 99 /* ESNext */ || (resolutionMode !== void 0 ? false : void 0);
37179
- const conditions = features & 8 /* Exports */ ? getConditions(options, useImportCondition) : [];
37203
+ const conditions = features & 8 /* Exports */ ? getConditions(options, resolutionMode) : [];
37180
37204
  const diagnostics = [];
37181
37205
  const moduleResolutionState = {
37182
37206
  compilerOptions: options,
@@ -37344,16 +37368,16 @@ function getNodeResolutionFeatures(options) {
37344
37368
  }
37345
37369
  return features;
37346
37370
  }
37347
- function getConditions(options, esmMode) {
37371
+ function getConditions(options, resolutionMode) {
37348
37372
  const moduleResolution = getEmitModuleResolutionKind(options);
37349
- if (esmMode === void 0) {
37373
+ if (resolutionMode === void 0) {
37350
37374
  if (moduleResolution === 100 /* Bundler */) {
37351
- esmMode ?? (esmMode = moduleResolution === 100 /* Bundler */);
37375
+ resolutionMode = 99 /* ESNext */;
37352
37376
  } else if (moduleResolution === 2 /* Node10 */) {
37353
37377
  return [];
37354
37378
  }
37355
37379
  }
37356
- const conditions = esmMode ? ["import"] : ["require"];
37380
+ const conditions = resolutionMode === 99 /* ESNext */ ? ["import"] : ["require"];
37357
37381
  if (!options.noDtsResolution) {
37358
37382
  conditions.push("types");
37359
37383
  }
@@ -37777,13 +37801,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
37777
37801
  result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
37778
37802
  break;
37779
37803
  case 2 /* Node10 */:
37780
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
37804
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0);
37781
37805
  break;
37782
37806
  case 1 /* Classic */:
37783
37807
  result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
37784
37808
  break;
37785
37809
  case 100 /* Bundler */:
37786
- result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
37810
+ result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0);
37787
37811
  break;
37788
37812
  default:
37789
37813
  return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
@@ -38048,7 +38072,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
38048
38072
  const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
38049
38073
  conditions ?? (conditions = getConditions(
38050
38074
  compilerOptions,
38051
- moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : !!(features & 32 /* EsmMode */)
38075
+ moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */
38052
38076
  ));
38053
38077
  const diagnostics = [];
38054
38078
  const state = {
@@ -39376,7 +39400,7 @@ function getModuleInstanceStateWorker(node, visited) {
39376
39400
  break;
39377
39401
  case 272 /* ImportDeclaration */:
39378
39402
  case 271 /* ImportEqualsDeclaration */:
39379
- if (!hasSyntacticModifier(node, 1 /* Export */)) {
39403
+ if (!hasSyntacticModifier(node, 32 /* Export */)) {
39380
39404
  return 0 /* NonInstantiated */;
39381
39405
  }
39382
39406
  break;
@@ -39654,7 +39678,7 @@ function createBinder() {
39654
39678
  }
39655
39679
  function declareSymbol(symbolTable, parent2, node, includes, excludes, isReplaceableByMethod, isComputedName) {
39656
39680
  Debug.assert(isComputedName || !hasDynamicName(node));
39657
- const isDefaultExport = hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default";
39681
+ const isDefaultExport = hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default";
39658
39682
  const name = isComputedName ? "__computed" /* Computed */ : isDefaultExport && parent2 ? "default" /* Default */ : getDeclarationName(node);
39659
39683
  let symbol;
39660
39684
  if (name === void 0) {
@@ -39698,7 +39722,7 @@ function createBinder() {
39698
39722
  }
39699
39723
  }
39700
39724
  const relatedInformation = [];
39701
- if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
39725
+ if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 32 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
39702
39726
  relatedInformation.push(createDiagnosticForNode2(node, Diagnostics.Did_you_mean_0, `export type { ${unescapeLeadingUnderscores(node.name.escapedText)} }`));
39703
39727
  }
39704
39728
  const declarationName = getNameOfDeclaration(node) || node;
@@ -39727,7 +39751,7 @@ function createBinder() {
39727
39751
  return symbol;
39728
39752
  }
39729
39753
  function declareModuleMember(node, symbolFlags, symbolExcludes) {
39730
- const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node);
39754
+ const hasExportModifier = !!(getCombinedModifierFlags(node) & 32 /* Export */) || jsdocTreatAsExported(node);
39731
39755
  if (symbolFlags & 2097152 /* Alias */) {
39732
39756
  if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) {
39733
39757
  return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
@@ -39746,7 +39770,7 @@ function createBinder() {
39746
39770
  if (isJSDocTypeAlias(node))
39747
39771
  Debug.assert(isInJSFile(node));
39748
39772
  if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) {
39749
- if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) {
39773
+ if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 2048 /* Default */) && !getDeclarationName(node)) {
39750
39774
  return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
39751
39775
  }
39752
39776
  const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0;
@@ -39787,7 +39811,7 @@ function createBinder() {
39787
39811
  return false;
39788
39812
  if (isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent))
39789
39813
  return true;
39790
- if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 1 /* Export */)
39814
+ if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 32 /* Export */)
39791
39815
  return true;
39792
39816
  return false;
39793
39817
  }
@@ -39818,7 +39842,7 @@ function createBinder() {
39818
39842
  const saveExceptionTarget = currentExceptionTarget;
39819
39843
  const saveActiveLabelList = activeLabelList;
39820
39844
  const saveHasExplicitReturn = hasExplicitReturn;
39821
- const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */;
39845
+ const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */;
39822
39846
  if (!isImmediatelyInvoked) {
39823
39847
  currentFlow = initFlowNode({ flags: 2 /* Start */ });
39824
39848
  if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) {
@@ -40865,7 +40889,7 @@ function createBinder() {
40865
40889
  function bindModuleDeclaration(node) {
40866
40890
  setExportContextFlag(node);
40867
40891
  if (isAmbientModule(node)) {
40868
- if (hasSyntacticModifier(node, 1 /* Export */)) {
40892
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
40869
40893
  errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible);
40870
40894
  }
40871
40895
  if (isModuleAugmentationExternal(node)) {
@@ -41926,7 +41950,7 @@ function createBinder() {
41926
41950
  }
41927
41951
  if (!isBindingPattern(node.name)) {
41928
41952
  const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent;
41929
- if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) {
41953
+ if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 32 /* Export */)) {
41930
41954
  declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);
41931
41955
  } else if (isBlockOrCatchScoped(node)) {
41932
41956
  bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */);
@@ -42078,7 +42102,7 @@ function isPurelyTypeDeclaration(s) {
42078
42102
  case 267 /* ModuleDeclaration */:
42079
42103
  return getModuleInstanceState(s) !== 1 /* Instantiated */;
42080
42104
  case 266 /* EnumDeclaration */:
42081
- return hasSyntacticModifier(s, 2048 /* Const */);
42105
+ return hasSyntacticModifier(s, 4096 /* Const */);
42082
42106
  default:
42083
42107
  return false;
42084
42108
  }
@@ -42895,7 +42919,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa
42895
42919
  if (getResolvePackageJsonExports(options)) {
42896
42920
  const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1);
42897
42921
  const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2);
42898
- const conditions = getConditions(options, importMode === 99 /* ESNext */);
42922
+ const conditions = getConditions(options, importMode);
42899
42923
  const fromExports = packageJsonContent.exports ? tryGetModuleNameFromExports(options, path, packageRootPath, packageName2, packageJsonContent.exports, conditions) : void 0;
42900
42924
  if (fromExports) {
42901
42925
  const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
@@ -45184,7 +45208,7 @@ function createTypeChecker(host) {
45184
45208
  if (lastLocation && lastLocation === location.name) {
45185
45209
  return false;
45186
45210
  }
45187
- if (location.asteriskToken || hasSyntacticModifier(location, 512 /* Async */)) {
45211
+ if (location.asteriskToken || hasSyntacticModifier(location, 1024 /* Async */)) {
45188
45212
  return true;
45189
45213
  }
45190
45214
  return !getImmediatelyInvokedFunctionExpression(location);
@@ -45348,8 +45372,17 @@ function createTypeChecker(host) {
45348
45372
  function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
45349
45373
  if (meaning & 111551 /* Value */) {
45350
45374
  if (isPrimitiveTypeName(name)) {
45351
- if (isExtendedByInterface(errorLocation)) {
45352
- error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
45375
+ const grandparent = errorLocation.parent.parent;
45376
+ if (grandparent && grandparent.parent && isHeritageClause(grandparent)) {
45377
+ const heritageKind = grandparent.token;
45378
+ const containerKind = grandparent.parent.kind;
45379
+ if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
45380
+ error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name));
45381
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
45382
+ error(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name));
45383
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) {
45384
+ error(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name));
45385
+ }
45353
45386
  } else {
45354
45387
  error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
45355
45388
  }
@@ -45381,16 +45414,6 @@ function createTypeChecker(host) {
45381
45414
  }
45382
45415
  return false;
45383
45416
  }
45384
- function isExtendedByInterface(node) {
45385
- const grandparent = node.parent.parent;
45386
- const parentOfGrandparent = grandparent.parent;
45387
- if (grandparent && parentOfGrandparent) {
45388
- const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */;
45389
- const isInterface = isInterfaceDeclaration(parentOfGrandparent);
45390
- return isExtending && isInterface;
45391
- }
45392
- return false;
45393
- }
45394
45417
  function maybeMappedType(node, symbol) {
45395
45418
  const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit");
45396
45419
  if (container && container.members.length === 1) {
@@ -45569,7 +45592,7 @@ function createTypeChecker(host) {
45569
45592
  return resolved;
45570
45593
  }
45571
45594
  function isSyntacticDefault(node) {
45572
- return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node);
45595
+ return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node);
45573
45596
  }
45574
45597
  function getUsageModeForExpression(usage) {
45575
45598
  return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0;
@@ -47495,20 +47518,20 @@ function createTypeChecker(host) {
47495
47518
  var _a, _b;
47496
47519
  if (!isDeclarationVisible(declaration)) {
47497
47520
  const anyImportSyntax = getAnyImportSyntax(declaration);
47498
- if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 1 /* Export */) && // import clause without export
47521
+ if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 32 /* Export */) && // import clause without export
47499
47522
  isDeclarationVisible(anyImportSyntax.parent)) {
47500
47523
  return addVisibleAlias(declaration, anyImportSyntax);
47501
- } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 1 /* Export */) && // unexported variable statement
47524
+ } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 32 /* Export */) && // unexported variable statement
47502
47525
  isDeclarationVisible(declaration.parent.parent.parent)) {
47503
47526
  return addVisibleAlias(declaration, declaration.parent.parent);
47504
- } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 1 /* Export */) && isDeclarationVisible(declaration.parent)) {
47527
+ } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 32 /* Export */) && isDeclarationVisible(declaration.parent)) {
47505
47528
  return addVisibleAlias(declaration, declaration);
47506
47529
  } else if (isBindingElement(declaration)) {
47507
- 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, 1 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) {
47530
+ 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)) {
47508
47531
  return addVisibleAlias(declaration, declaration.parent.parent.parent.parent);
47509
47532
  } else if (symbol.flags & 2 /* BlockScopedVariable */) {
47510
47533
  const variableStatement = findAncestor(declaration, isVariableStatement);
47511
- if (hasSyntacticModifier(variableStatement, 1 /* Export */)) {
47534
+ if (hasSyntacticModifier(variableStatement, 32 /* Export */)) {
47512
47535
  return true;
47513
47536
  }
47514
47537
  if (!isDeclarationVisible(variableStatement.parent)) {
@@ -47731,7 +47754,8 @@ function createTypeChecker(host) {
47731
47754
  visitedTypes: void 0,
47732
47755
  symbolDepth: void 0,
47733
47756
  inferTypeParameters: void 0,
47734
- approximateLength: 0
47757
+ approximateLength: 0,
47758
+ trackedSymbols: void 0
47735
47759
  };
47736
47760
  context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost);
47737
47761
  const resultingNode = cb(context);
@@ -48185,7 +48209,7 @@ function createTypeChecker(host) {
48185
48209
  }
48186
48210
  }
48187
48211
  function visitAndTransformType(type2, transform) {
48188
- var _a2, _b2;
48212
+ var _a2, _b2, _c;
48189
48213
  const typeId = type2.id;
48190
48214
  const isConstructorObject = getObjectFlags(type2) & 16 /* Anonymous */ && type2.symbol && type2.symbol.flags & 32 /* Class */;
48191
48215
  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;
@@ -48202,6 +48226,13 @@ function createTypeChecker(host) {
48202
48226
  }
48203
48227
  const cachedResult = (_a2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a2.get(key);
48204
48228
  if (cachedResult) {
48229
+ (_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach(
48230
+ ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
48231
+ symbol,
48232
+ enclosingDeclaration,
48233
+ meaning
48234
+ )
48235
+ );
48205
48236
  if (cachedResult.truncating) {
48206
48237
  context.truncating = true;
48207
48238
  }
@@ -48221,7 +48252,12 @@ function createTypeChecker(host) {
48221
48252
  const result = transform(type2);
48222
48253
  const addedLength = context.approximateLength - startLength;
48223
48254
  if (!context.reportedDiagnostic && !context.encounteredError) {
48224
- (_b2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _b2.set(key, { node: result, truncating: context.truncating, addedLength });
48255
+ (_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(key, {
48256
+ node: result,
48257
+ truncating: context.truncating,
48258
+ addedLength,
48259
+ trackedSymbols: context.trackedSymbols
48260
+ });
48225
48261
  }
48226
48262
  context.visitedTypes.delete(typeId);
48227
48263
  if (id) {
@@ -48463,7 +48499,7 @@ function createTypeChecker(host) {
48463
48499
  if (propertySymbol.flags & 4194304 /* Prototype */) {
48464
48500
  continue;
48465
48501
  }
48466
- if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (8 /* Private */ | 16 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) {
48502
+ if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (2 /* Private */ | 4 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) {
48467
48503
  context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName));
48468
48504
  }
48469
48505
  }
@@ -48766,7 +48802,7 @@ function createTypeChecker(host) {
48766
48802
  let modifiers = options == null ? void 0 : options.modifiers;
48767
48803
  if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) {
48768
48804
  const flags = modifiersToFlags(modifiers);
48769
- modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */);
48805
+ modifiers = factory.createModifiersFromModifierFlags(flags | 64 /* Abstract */);
48770
48806
  }
48771
48807
  const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration(
48772
48808
  modifiers,
@@ -49823,7 +49859,7 @@ function createTypeChecker(host) {
49823
49859
  const nsIndex = findIndex(statements, isModuleDeclaration);
49824
49860
  let ns = nsIndex !== -1 ? statements[nsIndex] : void 0;
49825
49861
  if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) {
49826
- const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 1 /* Export */));
49862
+ const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 32 /* Export */));
49827
49863
  const name = ns.name;
49828
49864
  let body = ns.body;
49829
49865
  if (length(excessExports)) {
@@ -49857,9 +49893,9 @@ function createTypeChecker(host) {
49857
49893
  }
49858
49894
  if (!find(statements, (s) => s !== ns && nodeHasName(s, name))) {
49859
49895
  results = [];
49860
- const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 1 /* Export */) || isExportAssignment(s) || isExportDeclaration(s));
49896
+ const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 32 /* Export */) || isExportAssignment(s) || isExportDeclaration(s));
49861
49897
  forEach(body.statements, (s) => {
49862
- addResult(s, mixinExportFlag ? 1 /* Export */ : 0 /* None */);
49898
+ addResult(s, mixinExportFlag ? 32 /* Export */ : 0 /* None */);
49863
49899
  });
49864
49900
  statements = [...filter(statements, (s) => s !== ns && s !== exportAssignment), ...results];
49865
49901
  }
@@ -49951,11 +49987,11 @@ function createTypeChecker(host) {
49951
49987
  return statements;
49952
49988
  }
49953
49989
  function addExportModifier(node) {
49954
- const flags = (getEffectiveModifierFlags(node) | 1 /* Export */) & ~2 /* Ambient */;
49990
+ const flags = (getEffectiveModifierFlags(node) | 32 /* Export */) & ~128 /* Ambient */;
49955
49991
  return factory.replaceModifiers(node, flags);
49956
49992
  }
49957
49993
  function removeExportModifier(node) {
49958
- const flags = getEffectiveModifierFlags(node) & ~1 /* Export */;
49994
+ const flags = getEffectiveModifierFlags(node) & ~32 /* Export */;
49959
49995
  return factory.replaceModifiers(node, flags);
49960
49996
  }
49961
49997
  function visitSymbolTable(symbolTable2, suppressNewPrivateContext, propertyAsAlias) {
@@ -49996,6 +50032,12 @@ function createTypeChecker(host) {
49996
50032
  if (context.reportedDiagnostic) {
49997
50033
  oldcontext.reportedDiagnostic = context.reportedDiagnostic;
49998
50034
  }
50035
+ if (context.trackedSymbols) {
50036
+ if (!oldContext.trackedSymbols)
50037
+ oldContext.trackedSymbols = context.trackedSymbols;
50038
+ else
50039
+ Debug.assert(context.trackedSymbols === oldContext.trackedSymbols);
50040
+ }
49999
50041
  context = oldContext;
50000
50042
  }
50001
50043
  }
@@ -50012,7 +50054,7 @@ function createTypeChecker(host) {
50012
50054
  if (needsPostExportDefault || needsExportDeclaration) {
50013
50055
  isPrivate = true;
50014
50056
  }
50015
- const modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 1024 /* Default */ : 0);
50057
+ const modifierFlags = (!isPrivate ? 32 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 2048 /* Default */ : 0);
50016
50058
  const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && escapedSymbolName !== "export=" /* ExportEquals */;
50017
50059
  const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol);
50018
50060
  if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) {
@@ -50082,7 +50124,7 @@ function createTypeChecker(host) {
50082
50124
  ),
50083
50125
  textRange
50084
50126
  );
50085
- addResult(statement, name !== localName ? modifierFlags & ~1 /* Export */ : modifierFlags);
50127
+ addResult(statement, name !== localName ? modifierFlags & ~32 /* Export */ : modifierFlags);
50086
50128
  if (name !== localName && !isPrivate) {
50087
50129
  addResult(
50088
50130
  factory.createExportDeclaration(
@@ -50187,14 +50229,14 @@ function createTypeChecker(host) {
50187
50229
  if (canHaveModifiers(node)) {
50188
50230
  let newModifierFlags = 0 /* None */;
50189
50231
  const enclosingDeclaration2 = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration);
50190
- if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) {
50191
- newModifierFlags |= 1 /* Export */;
50232
+ if (additionalModifierFlags & 32 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) {
50233
+ newModifierFlags |= 32 /* Export */;
50192
50234
  }
50193
- if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) {
50194
- newModifierFlags |= 2 /* Ambient */;
50235
+ if (addingDeclare && !(newModifierFlags & 32 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) {
50236
+ newModifierFlags |= 128 /* Ambient */;
50195
50237
  }
50196
- if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) {
50197
- newModifierFlags |= 1024 /* Default */;
50238
+ if (additionalModifierFlags & 2048 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) {
50239
+ newModifierFlags |= 2048 /* Default */;
50198
50240
  }
50199
50241
  if (newModifierFlags) {
50200
50242
  node = factory.replaceModifiers(node, newModifierFlags | getEffectiveModifierFlags(node));
@@ -50316,7 +50358,7 @@ function createTypeChecker(host) {
50316
50358
  function serializeEnum(symbol, symbolName2, modifierFlags) {
50317
50359
  addResult(
50318
50360
  factory.createEnumDeclaration(
50319
- factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 2048 /* Const */ : 0),
50361
+ factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 4096 /* Const */ : 0),
50320
50362
  getInternalSymbolName(symbol, symbolName2),
50321
50363
  map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => {
50322
50364
  const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0;
@@ -50400,7 +50442,7 @@ function createTypeChecker(host) {
50400
50442
  factory.createIdentifier("default" /* Default */)
50401
50443
  )])
50402
50444
  ) : d);
50403
- const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 1 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced;
50445
+ const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 32 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced;
50404
50446
  fakespace = factory.updateModuleDeclaration(
50405
50447
  fakespace,
50406
50448
  fakespace.modifiers,
@@ -50503,7 +50545,7 @@ function createTypeChecker(host) {
50503
50545
  );
50504
50546
  const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */));
50505
50547
  const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(
50506
- factory.createModifiersFromModifierFlags(8 /* Private */),
50548
+ factory.createModifiersFromModifierFlags(2 /* Private */),
50507
50549
  [],
50508
50550
  /*body*/
50509
50551
  void 0
@@ -50856,7 +50898,7 @@ function createTypeChecker(host) {
50856
50898
  const varName = getUnusedName(name, symbol);
50857
50899
  const typeToSerialize = getWidenedType(getTypeOfSymbol(getMergedSymbol(symbol)));
50858
50900
  if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) {
50859
- serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */);
50901
+ serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 32 /* Export */);
50860
50902
  } else {
50861
50903
  const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;
50862
50904
  const statement = factory.createVariableStatement(
@@ -50873,7 +50915,7 @@ function createTypeChecker(host) {
50873
50915
  );
50874
50916
  addResult(
50875
50917
  statement,
50876
- target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 2 /* Ambient */ : name === varName ? 1 /* Export */ : 0 /* None */
50918
+ target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 128 /* Ambient */ : name === varName ? 32 /* Export */ : 0 /* None */
50877
50919
  );
50878
50920
  }
50879
50921
  if (isExportAssignmentCompatibleSymbolName) {
@@ -50909,14 +50951,14 @@ function createTypeChecker(host) {
50909
50951
  return function serializePropertySymbol(p, isStatic2, baseType) {
50910
50952
  var _a2, _b, _c, _d, _e;
50911
50953
  const modifierFlags = getDeclarationModifierFlagsFromSymbol(p);
50912
- const isPrivate = !!(modifierFlags & 8 /* Private */);
50954
+ const isPrivate = !!(modifierFlags & 2 /* Private */);
50913
50955
  if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) {
50914
50956
  return [];
50915
50957
  }
50916
50958
  if (p.flags & 4194304 /* Prototype */ || p.escapedName === "constructor" || baseType && getPropertyOfType(baseType, p.escapedName) && isReadonlySymbol(getPropertyOfType(baseType, p.escapedName)) === isReadonlySymbol(p) && (p.flags & 16777216 /* Optional */) === (getPropertyOfType(baseType, p.escapedName).flags & 16777216 /* Optional */) && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName))) {
50917
50959
  return [];
50918
50960
  }
50919
- const flag = modifierFlags & ~512 /* Async */ | (isStatic2 ? 32 /* Static */ : 0);
50961
+ const flag = modifierFlags & ~1024 /* Async */ | (isStatic2 ? 256 /* Static */ : 0);
50920
50962
  const name = getPropertyNameNodeForSymbol(p, context);
50921
50963
  const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
50922
50964
  if (p.flags & 98304 /* Accessor */ && useAccessors) {
@@ -50958,7 +51000,7 @@ function createTypeChecker(host) {
50958
51000
  ));
50959
51001
  }
50960
51002
  if (p.flags & 32768 /* GetAccessor */) {
50961
- const isPrivate2 = modifierFlags & 8 /* Private */;
51003
+ const isPrivate2 = modifierFlags & 2 /* Private */;
50962
51004
  result.push(setTextRange(
50963
51005
  factory.createGetAccessorDeclaration(
50964
51006
  factory.createModifiersFromModifierFlags(flag),
@@ -50975,7 +51017,7 @@ function createTypeChecker(host) {
50975
51017
  } else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) {
50976
51018
  return setTextRange(
50977
51019
  createProperty2(
50978
- factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag),
51020
+ factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag),
50979
51021
  name,
50980
51022
  p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,
50981
51023
  isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled),
@@ -50990,10 +51032,10 @@ function createTypeChecker(host) {
50990
51032
  if (p.flags & (8192 /* Method */ | 16 /* Function */)) {
50991
51033
  const type = getTypeOfSymbol(p);
50992
51034
  const signatures = getSignaturesOfType(type, 0 /* Call */);
50993
- if (flag & 8 /* Private */) {
51035
+ if (flag & 2 /* Private */) {
50994
51036
  return setTextRange(
50995
51037
  createProperty2(
50996
- factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag),
51038
+ factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag),
50997
51039
  name,
50998
51040
  p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,
50999
51041
  /*type*/
@@ -51069,7 +51111,7 @@ function createTypeChecker(host) {
51069
51111
  let privateProtected = 0;
51070
51112
  for (const s of signatures) {
51071
51113
  if (s.declaration) {
51072
- privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 8 /* Private */ | 16 /* Protected */);
51114
+ privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 2 /* Private */ | 4 /* Protected */);
51073
51115
  }
51074
51116
  }
51075
51117
  if (privateProtected) {
@@ -51262,10 +51304,10 @@ function createTypeChecker(host) {
51262
51304
  return result || types;
51263
51305
  }
51264
51306
  function visibilityToString(flags) {
51265
- if (flags === 8 /* Private */) {
51307
+ if (flags === 2 /* Private */) {
51266
51308
  return "private";
51267
51309
  }
51268
- if (flags === 16 /* Protected */) {
51310
+ if (flags === 4 /* Protected */) {
51269
51311
  return "protected";
51270
51312
  }
51271
51313
  return "public";
@@ -51383,7 +51425,7 @@ function createTypeChecker(host) {
51383
51425
  return true;
51384
51426
  }
51385
51427
  const parent = getDeclarationContainer(node);
51386
- if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent.kind !== 312 /* SourceFile */ && parent.flags & 33554432 /* Ambient */)) {
51428
+ if (!(getCombinedModifierFlagsCached(node) & 32 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent.kind !== 312 /* SourceFile */ && parent.flags & 33554432 /* Ambient */)) {
51387
51429
  return isGlobalSourceFile(parent);
51388
51430
  }
51389
51431
  return isDeclarationVisible(parent);
@@ -51393,7 +51435,7 @@ function createTypeChecker(host) {
51393
51435
  case 178 /* SetAccessor */:
51394
51436
  case 174 /* MethodDeclaration */:
51395
51437
  case 173 /* MethodSignature */:
51396
- if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) {
51438
+ if (hasEffectiveModifier(node, 2 /* Private */ | 4 /* Protected */)) {
51397
51439
  return false;
51398
51440
  }
51399
51441
  case 176 /* Constructor */:
@@ -51612,7 +51654,7 @@ function createTypeChecker(host) {
51612
51654
  const unspreadableToRestKeys = [];
51613
51655
  for (const prop of getPropertiesOfType(source)) {
51614
51656
  const literalTypeFromProperty = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
51615
- if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) && isSpreadableProperty(prop)) {
51657
+ if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) && isSpreadableProperty(prop)) {
51616
51658
  spreadableProperties.push(prop);
51617
51659
  } else {
51618
51660
  unspreadableToRestKeys.push(literalTypeFromProperty);
@@ -51818,7 +51860,7 @@ function createTypeChecker(host) {
51818
51860
  if (declaredType) {
51819
51861
  return addOptionality(declaredType, isProperty, isOptional);
51820
51862
  }
51821
- if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) {
51863
+ if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 32 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) {
51822
51864
  if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined2(declaration.initializer))) {
51823
51865
  return autoType;
51824
51866
  }
@@ -51866,7 +51908,7 @@ function createTypeChecker(host) {
51866
51908
  if (isPropertyDeclaration(declaration) && (noImplicitAny || isInJSFile(declaration))) {
51867
51909
  if (!hasStaticModifier(declaration)) {
51868
51910
  const constructor = findConstructorDeclaration(declaration.parent);
51869
- const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0;
51911
+ const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0;
51870
51912
  return type && addOptionality(
51871
51913
  type,
51872
51914
  /*isProperty*/
@@ -51875,7 +51917,7 @@ function createTypeChecker(host) {
51875
51917
  );
51876
51918
  } else {
51877
51919
  const staticBlocks = filter(declaration.parent.members, isClassStaticBlockDeclaration);
51878
- const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0;
51920
+ const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0;
51879
51921
  return type && addOptionality(
51880
51922
  type,
51881
51923
  /*isProperty*/
@@ -51979,7 +52021,7 @@ function createTypeChecker(host) {
51979
52021
  return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType);
51980
52022
  }
51981
52023
  function getFlowTypeOfProperty(reference, prop) {
51982
- const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 2 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType;
52024
+ const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 128 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType;
51983
52025
  return getFlowTypeOfReference(reference, autoType, initialType);
51984
52026
  }
51985
52027
  function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) {
@@ -52603,6 +52645,9 @@ function createTypeChecker(host) {
52603
52645
  function getTypeOfAlias(symbol) {
52604
52646
  const links = getSymbolLinks(symbol);
52605
52647
  if (!links.type) {
52648
+ if (!pushTypeResolution(symbol, 0 /* Type */)) {
52649
+ return errorType;
52650
+ }
52606
52651
  const targetSymbol = resolveAlias(symbol);
52607
52652
  const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration(
52608
52653
  getDeclarationOfAliasSymbol(symbol),
@@ -52611,6 +52656,10 @@ function createTypeChecker(host) {
52611
52656
  );
52612
52657
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
52613
52658
  links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
52659
+ if (!popTypeResolution()) {
52660
+ reportCircularityError(exportSymbol ?? symbol);
52661
+ return links.type = errorType;
52662
+ }
52614
52663
  }
52615
52664
  return links.type;
52616
52665
  }
@@ -52624,12 +52673,19 @@ function createTypeChecker(host) {
52624
52673
  }
52625
52674
  function reportCircularityError(symbol) {
52626
52675
  const declaration = symbol.valueDeclaration;
52627
- if (getEffectiveTypeAnnotationNode(declaration)) {
52628
- error(symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
52629
- return errorType;
52630
- }
52631
- if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) {
52632
- error(symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
52676
+ if (declaration) {
52677
+ if (getEffectiveTypeAnnotationNode(declaration)) {
52678
+ error(symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
52679
+ return errorType;
52680
+ }
52681
+ if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) {
52682
+ error(symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
52683
+ }
52684
+ } else if (symbol.flags & 2097152 /* Alias */) {
52685
+ const node = getDeclarationOfAliasSymbol(symbol);
52686
+ if (node) {
52687
+ error(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));
52688
+ }
52633
52689
  }
52634
52690
  return anyType;
52635
52691
  }
@@ -53632,7 +53688,7 @@ function createTypeChecker(host) {
53632
53688
  const baseConstructorType = getBaseConstructorTypeOfClass(classType);
53633
53689
  const baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */);
53634
53690
  const declaration = getClassLikeDeclarationOfSymbol(classType.symbol);
53635
- const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */);
53691
+ const isAbstract = !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */);
53636
53692
  if (baseSignatures.length === 0) {
53637
53693
  return [createSignature(
53638
53694
  /*declaration*/
@@ -54408,7 +54464,7 @@ function createTypeChecker(host) {
54408
54464
  }
54409
54465
  function isConstTypeVariable(type, depth = 0) {
54410
54466
  var _a;
54411
- return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* 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) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
54467
+ 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) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
54412
54468
  }
54413
54469
  function getConstraintOfIndexedAccess(type) {
54414
54470
  return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
@@ -54734,7 +54790,7 @@ function createTypeChecker(host) {
54734
54790
  } else if (!isUnion && !isReadonlySymbol(prop)) {
54735
54791
  checkFlags &= ~8 /* Readonly */;
54736
54792
  }
54737
- checkFlags |= (!(modifiers & 24 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 16 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 8 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 32 /* Static */ ? 2048 /* ContainsStatic */ : 0);
54793
+ checkFlags |= (!(modifiers & 6 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 4 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 2 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 256 /* Static */ ? 2048 /* ContainsStatic */ : 0);
54738
54794
  if (!isPrototypeProperty(prop)) {
54739
54795
  syntheticFlag = 2 /* SyntheticProperty */;
54740
54796
  }
@@ -55186,7 +55242,7 @@ function createTypeChecker(host) {
55186
55242
  if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) {
55187
55243
  flags |= 1 /* HasRestParameter */;
55188
55244
  }
55189
- if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 256 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 256 /* Abstract */)) {
55245
+ if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 64 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 64 /* Abstract */)) {
55190
55246
  flags |= 4 /* Abstract */;
55191
55247
  }
55192
55248
  links.resolvedSignature = createSignature(
@@ -55556,7 +55612,7 @@ function createTypeChecker(host) {
55556
55612
  if (parameter.type) {
55557
55613
  forEachType(getTypeFromTypeNode(parameter.type), (keyType) => {
55558
55614
  if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) {
55559
- indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 64 /* Readonly */), declaration));
55615
+ indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 8 /* Readonly */), declaration));
55560
55616
  }
55561
55617
  });
55562
55618
  }
@@ -57381,7 +57437,7 @@ function createTypeChecker(host) {
57381
57437
  return neverType;
57382
57438
  }
57383
57439
  function getLiteralTypeFromProperty(prop, include, includeNonPublic) {
57384
- if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) {
57440
+ if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 6 /* NonPublicAccessibilityModifier */)) {
57385
57441
  let type = getSymbolLinks(getLateBoundSymbol(prop)).nameType;
57386
57442
  if (!type) {
57387
57443
  const name = getNameOfDeclaration(prop.valueDeclaration);
@@ -57815,7 +57871,7 @@ function createTypeChecker(host) {
57815
57871
  }
57816
57872
  function isPatternLiteralPlaceholderType(type) {
57817
57873
  if (type.flags & 2097152 /* Intersection */) {
57818
- return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t));
57874
+ return !isGenericType(type) && some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 98304 /* Nullable */)) || isPatternLiteralPlaceholderType(t));
57819
57875
  }
57820
57876
  return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
57821
57877
  }
@@ -58326,7 +58382,7 @@ function createTypeChecker(host) {
58326
58382
  function getAnonymousPartialType(type2) {
58327
58383
  const members = createSymbolTable();
58328
58384
  for (const prop of getPropertiesOfType(type2)) {
58329
- if (getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) {
58385
+ if (getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) {
58330
58386
  } else if (isSpreadableProperty(prop)) {
58331
58387
  const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
58332
58388
  const flags = 4 /* Property */ | 16777216 /* Optional */;
@@ -58388,7 +58444,7 @@ function createTypeChecker(host) {
58388
58444
  const skippedPrivateMembers = /* @__PURE__ */ new Set();
58389
58445
  const indexInfos = left === emptyObjectType ? getIndexInfosOfType(right) : getUnionIndexInfos([left, right]);
58390
58446
  for (const rightProp of getPropertiesOfType(right)) {
58391
- if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) {
58447
+ if (getDeclarationModifierFlagsFromSymbol(rightProp) & (2 /* Private */ | 4 /* Protected */)) {
58392
58448
  skippedPrivateMembers.add(rightProp.escapedName);
58393
58449
  } else if (isSpreadableProperty(rightProp)) {
58394
58450
  members.set(rightProp.escapedName, getSpreadSymbol(rightProp, readonly));
@@ -61955,25 +62011,25 @@ function createTypeChecker(host) {
61955
62011
  function propertyRelatedTo(source2, target2, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState, skipOptional) {
61956
62012
  const sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
61957
62013
  const targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
61958
- if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) {
62014
+ if (sourcePropFlags & 2 /* Private */ || targetPropFlags & 2 /* Private */) {
61959
62015
  if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {
61960
62016
  if (reportErrors2) {
61961
- if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) {
62017
+ if (sourcePropFlags & 2 /* Private */ && targetPropFlags & 2 /* Private */) {
61962
62018
  reportError(Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp));
61963
62019
  } else {
61964
- reportError(Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 8 /* Private */ ? source2 : target2), typeToString(sourcePropFlags & 8 /* Private */ ? target2 : source2));
62020
+ reportError(Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 2 /* Private */ ? source2 : target2), typeToString(sourcePropFlags & 2 /* Private */ ? target2 : source2));
61965
62021
  }
61966
62022
  }
61967
62023
  return 0 /* False */;
61968
62024
  }
61969
- } else if (targetPropFlags & 16 /* Protected */) {
62025
+ } else if (targetPropFlags & 4 /* Protected */) {
61970
62026
  if (!isValidOverrideOf(sourceProp, targetProp)) {
61971
62027
  if (reportErrors2) {
61972
62028
  reportError(Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source2), typeToString(getDeclaringClass(targetProp) || target2));
61973
62029
  }
61974
62030
  return 0 /* False */;
61975
62031
  }
61976
- } else if (sourcePropFlags & 16 /* Protected */) {
62032
+ } else if (sourcePropFlags & 4 /* Protected */) {
61977
62033
  if (reportErrors2) {
61978
62034
  reportError(Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2));
61979
62035
  }
@@ -62503,15 +62559,15 @@ function createTypeChecker(host) {
62503
62559
  if (!sourceSignature.declaration || !targetSignature.declaration) {
62504
62560
  return true;
62505
62561
  }
62506
- const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 24 /* NonPublicAccessibilityModifier */);
62507
- const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 24 /* NonPublicAccessibilityModifier */);
62508
- if (targetAccessibility === 8 /* Private */) {
62562
+ const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 6 /* NonPublicAccessibilityModifier */);
62563
+ const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 6 /* NonPublicAccessibilityModifier */);
62564
+ if (targetAccessibility === 2 /* Private */) {
62509
62565
  return true;
62510
62566
  }
62511
- if (targetAccessibility === 16 /* Protected */ && sourceAccessibility !== 8 /* Private */) {
62567
+ if (targetAccessibility === 4 /* Protected */ && sourceAccessibility !== 2 /* Private */) {
62512
62568
  return true;
62513
62569
  }
62514
- if (targetAccessibility !== 16 /* Protected */ && !sourceAccessibility) {
62570
+ if (targetAccessibility !== 4 /* Protected */ && !sourceAccessibility) {
62515
62571
  return true;
62516
62572
  }
62517
62573
  if (reportErrors2) {
@@ -62611,7 +62667,7 @@ function createTypeChecker(host) {
62611
62667
  const variances = [];
62612
62668
  for (const tp of typeParameters) {
62613
62669
  const modifiers = getTypeParameterModifiers(tp);
62614
- let variance = modifiers & 65536 /* Out */ ? modifiers & 32768 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 32768 /* In */ ? 2 /* Contravariant */ : void 0;
62670
+ let variance = modifiers & 16384 /* Out */ ? modifiers & 8192 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 8192 /* In */ ? 2 /* Contravariant */ : void 0;
62615
62671
  if (variance === void 0) {
62616
62672
  let unmeasurable = false;
62617
62673
  let unreliable = false;
@@ -62659,7 +62715,7 @@ function createTypeChecker(host) {
62659
62715
  }
62660
62716
  function getTypeParameterModifiers(tp) {
62661
62717
  var _a;
62662
- return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (32768 /* In */ | 65536 /* Out */ | 2048 /* Const */);
62718
+ return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (8192 /* In */ | 16384 /* Out */ | 4096 /* Const */);
62663
62719
  }
62664
62720
  function hasCovariantVoidArgument(typeArguments, variances) {
62665
62721
  for (let i = 0; i < variances.length; i++) {
@@ -62744,10 +62800,10 @@ function createTypeChecker(host) {
62744
62800
  });
62745
62801
  }
62746
62802
  function isValidOverrideOf(sourceProp, targetProp) {
62747
- return !forEachProperty(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 16 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false);
62803
+ return !forEachProperty(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 4 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false);
62748
62804
  }
62749
62805
  function isClassDerivedFromDeclaringClasses(checkClass, prop, writing) {
62750
- return forEachProperty(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 16 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass;
62806
+ return forEachProperty(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 4 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass;
62751
62807
  }
62752
62808
  function isDeeplyNestedType(type, stack, depth, maxDepth = 3) {
62753
62809
  if (depth >= maxDepth) {
@@ -62824,8 +62880,8 @@ function createTypeChecker(host) {
62824
62880
  if (sourceProp === targetProp) {
62825
62881
  return -1 /* True */;
62826
62882
  }
62827
- const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */;
62828
- const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */;
62883
+ const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 6 /* NonPublicAccessibilityModifier */;
62884
+ const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 6 /* NonPublicAccessibilityModifier */;
62829
62885
  if (sourcePropAccessibility !== targetPropAccessibility) {
62830
62886
  return 0 /* False */;
62831
62887
  }
@@ -66819,7 +66875,7 @@ function createTypeChecker(host) {
66819
66875
  if (languageVersion < 2 /* ES2015 */) {
66820
66876
  if (container.kind === 219 /* ArrowFunction */) {
66821
66877
  error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
66822
- } else if (hasSyntacticModifier(container, 512 /* Async */)) {
66878
+ } else if (hasSyntacticModifier(container, 1024 /* Async */)) {
66823
66879
  error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
66824
66880
  }
66825
66881
  }
@@ -67232,7 +67288,7 @@ function createTypeChecker(host) {
67232
67288
  let inAsyncFunction = false;
67233
67289
  if (!isCallExpression2) {
67234
67290
  while (container && container.kind === 219 /* ArrowFunction */) {
67235
- if (hasSyntacticModifier(container, 512 /* Async */))
67291
+ if (hasSyntacticModifier(container, 1024 /* Async */))
67236
67292
  inAsyncFunction = true;
67237
67293
  container = getSuperContainer(
67238
67294
  container,
@@ -67241,7 +67297,7 @@ function createTypeChecker(host) {
67241
67297
  );
67242
67298
  needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */;
67243
67299
  }
67244
- if (container && hasSyntacticModifier(container, 512 /* Async */))
67300
+ if (container && hasSyntacticModifier(container, 1024 /* Async */))
67245
67301
  inAsyncFunction = true;
67246
67302
  }
67247
67303
  let nodeCheckFlag = 0;
@@ -67573,7 +67629,24 @@ function createTypeChecker(host) {
67573
67629
  }
67574
67630
  const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
67575
67631
  if (signature && !isResolvingReturnTypeOfSignature(signature)) {
67576
- return getReturnTypeOfSignature(signature);
67632
+ const returnType2 = getReturnTypeOfSignature(signature);
67633
+ const functionFlags = getFunctionFlags(functionDecl);
67634
+ if (functionFlags & 1 /* Generator */) {
67635
+ return filterType(returnType2, (t) => {
67636
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType(
67637
+ t,
67638
+ functionFlags,
67639
+ /*errorNode*/
67640
+ void 0
67641
+ );
67642
+ });
67643
+ }
67644
+ if (functionFlags & 2 /* Async */) {
67645
+ return filterType(returnType2, (t) => {
67646
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t);
67647
+ });
67648
+ }
67649
+ return returnType2;
67577
67650
  }
67578
67651
  const iife = getImmediatelyInvokedFunctionExpression(functionDecl);
67579
67652
  if (iife) {
@@ -67786,7 +67859,7 @@ function createTypeChecker(host) {
67786
67859
  type,
67787
67860
  (t) => {
67788
67861
  var _a;
67789
- if (isGenericMappedType(t) && (!t.declaration.nameType || isFilteringMappedType(t))) {
67862
+ if (isGenericMappedType(t) && !t.declaration.nameType) {
67790
67863
  const constraint = getConstraintTypeFromMappedType(t);
67791
67864
  const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
67792
67865
  const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
@@ -69429,20 +69502,20 @@ function createTypeChecker(host) {
69429
69502
  return false;
69430
69503
  }
69431
69504
  }
69432
- if (flags & 256 /* Abstract */) {
69505
+ if (flags & 64 /* Abstract */) {
69433
69506
  if (errorNode) {
69434
69507
  error(errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
69435
69508
  }
69436
69509
  return false;
69437
69510
  }
69438
- if (!(flags & 32 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) {
69511
+ if (!(flags & 256 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) {
69439
69512
  if (errorNode) {
69440
69513
  error(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop));
69441
69514
  }
69442
69515
  return false;
69443
69516
  }
69444
69517
  }
69445
- if (flags & 256 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) {
69518
+ if (flags & 64 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) {
69446
69519
  const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
69447
69520
  if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) {
69448
69521
  if (errorNode) {
@@ -69451,10 +69524,10 @@ function createTypeChecker(host) {
69451
69524
  return false;
69452
69525
  }
69453
69526
  }
69454
- if (!(flags & 24 /* NonPublicAccessibilityModifier */)) {
69527
+ if (!(flags & 6 /* NonPublicAccessibilityModifier */)) {
69455
69528
  return true;
69456
69529
  }
69457
- if (flags & 8 /* Private */) {
69530
+ if (flags & 2 /* Private */) {
69458
69531
  const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
69459
69532
  if (!isNodeWithinClass(location, declaringClassDeclaration)) {
69460
69533
  if (errorNode) {
@@ -69474,14 +69547,14 @@ function createTypeChecker(host) {
69474
69547
  if (!enclosingClass) {
69475
69548
  enclosingClass = getEnclosingClassFromThisParameter(location);
69476
69549
  enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing);
69477
- if (flags & 32 /* Static */ || !enclosingClass) {
69550
+ if (flags & 256 /* Static */ || !enclosingClass) {
69478
69551
  if (errorNode) {
69479
69552
  error(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType));
69480
69553
  }
69481
69554
  return false;
69482
69555
  }
69483
69556
  }
69484
- if (flags & 32 /* Static */) {
69557
+ if (flags & 256 /* Static */) {
69485
69558
  return true;
69486
69559
  }
69487
69560
  if (containingType.flags & 262144 /* TypeParameter */) {
@@ -69901,7 +69974,7 @@ function createTypeChecker(host) {
69901
69974
  }
69902
69975
  let diagnosticMessage;
69903
69976
  const declarationName = idText(right);
69904
- if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) {
69977
+ if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 256 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) {
69905
69978
  diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName);
69906
69979
  } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) {
69907
69980
  diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName);
@@ -70155,7 +70228,7 @@ function createTypeChecker(host) {
70155
70228
  if (!valueDeclaration) {
70156
70229
  return;
70157
70230
  }
70158
- const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 8 /* Private */);
70231
+ const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 2 /* Private */);
70159
70232
  const hasPrivateIdentifier = prop.valueDeclaration && isNamedDeclaration(prop.valueDeclaration) && isPrivateIdentifier(prop.valueDeclaration.name);
70160
70233
  if (!hasPrivateModifier && !hasPrivateIdentifier) {
70161
70234
  return;
@@ -71600,7 +71673,7 @@ function createTypeChecker(host) {
71600
71673
  return resolveErrorCall(node);
71601
71674
  }
71602
71675
  const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol);
71603
- if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) {
71676
+ if (valueDecl && hasSyntacticModifier(valueDecl, 64 /* Abstract */)) {
71604
71677
  error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class);
71605
71678
  return resolveErrorCall(node);
71606
71679
  }
@@ -71663,7 +71736,7 @@ function createTypeChecker(host) {
71663
71736
  return true;
71664
71737
  }
71665
71738
  const declaration = signature.declaration;
71666
- const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */);
71739
+ const modifiers = getSelectedEffectiveModifierFlags(declaration, 6 /* NonPublicAccessibilityModifier */);
71667
71740
  if (!modifiers || declaration.kind !== 176 /* Constructor */) {
71668
71741
  return true;
71669
71742
  }
@@ -71671,16 +71744,16 @@ function createTypeChecker(host) {
71671
71744
  const declaringClass = getDeclaredTypeOfSymbol(declaration.parent.symbol);
71672
71745
  if (!isNodeWithinClass(node, declaringClassDeclaration)) {
71673
71746
  const containingClass = getContainingClass(node);
71674
- if (containingClass && modifiers & 16 /* Protected */) {
71747
+ if (containingClass && modifiers & 4 /* Protected */) {
71675
71748
  const containingType = getTypeOfNode(containingClass);
71676
71749
  if (typeHasProtectedAccessibleBase(declaration.parent.symbol, containingType)) {
71677
71750
  return true;
71678
71751
  }
71679
71752
  }
71680
- if (modifiers & 8 /* Private */) {
71753
+ if (modifiers & 2 /* Private */) {
71681
71754
  error(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass));
71682
71755
  }
71683
- if (modifiers & 16 /* Protected */) {
71756
+ if (modifiers & 4 /* Protected */) {
71684
71757
  error(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass));
71685
71758
  }
71686
71759
  return false;
@@ -73657,7 +73730,7 @@ function createTypeChecker(host) {
73657
73730
  return !setProp;
73658
73731
  }
73659
73732
  function isReadonlySymbol(symbol) {
73660
- return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* 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));
73733
+ 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));
73661
73734
  }
73662
73735
  function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) {
73663
73736
  var _a, _b;
@@ -74774,7 +74847,15 @@ function createTypeChecker(host) {
74774
74847
  checkExternalEmitHelpers(node, 256 /* Values */);
74775
74848
  }
74776
74849
  }
74777
- const returnType = getReturnTypeFromAnnotation(func);
74850
+ let returnType = getReturnTypeFromAnnotation(func);
74851
+ if (returnType && returnType.flags & 1048576 /* Union */) {
74852
+ returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType(
74853
+ t,
74854
+ functionFlags,
74855
+ /*errorNode*/
74856
+ void 0
74857
+ ));
74858
+ }
74778
74859
  const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync);
74779
74860
  const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType;
74780
74861
  const signatureNextType = iterationTypes && iterationTypes.nextType || anyType;
@@ -75395,15 +75476,15 @@ function createTypeChecker(host) {
75395
75476
  var _a, _b;
75396
75477
  if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) {
75397
75478
  const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node));
75398
- const modifiers = getTypeParameterModifiers(typeParameter) & (32768 /* In */ | 65536 /* Out */);
75479
+ const modifiers = getTypeParameterModifiers(typeParameter) & (8192 /* In */ | 16384 /* Out */);
75399
75480
  if (modifiers) {
75400
75481
  const symbol = getSymbolOfDeclaration(node.parent);
75401
75482
  if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) {
75402
75483
  error(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
75403
- } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) {
75484
+ } else if (modifiers === 8192 /* In */ || modifiers === 16384 /* Out */) {
75404
75485
  (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) });
75405
- const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
75406
- const target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
75486
+ const source = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
75487
+ const target = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
75407
75488
  const saveVarianceTypeParameter = typeParameter;
75408
75489
  varianceTypeParameter = typeParameter;
75409
75490
  checkTypeAssignableTo(source, target, node, Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
@@ -75417,7 +75498,7 @@ function createTypeChecker(host) {
75417
75498
  checkGrammarModifiers(node);
75418
75499
  checkVariableLikeDeclaration(node);
75419
75500
  const func = getContainingFunction(node);
75420
- if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) {
75501
+ if (hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) {
75421
75502
  if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) {
75422
75503
  error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
75423
75504
  }
@@ -75587,11 +75668,7 @@ function createTypeChecker(host) {
75587
75668
  if (returnType === voidType) {
75588
75669
  error(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation);
75589
75670
  } else {
75590
- const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType;
75591
- const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType;
75592
- const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType;
75593
- const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */));
75594
- checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation);
75671
+ checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation);
75595
75672
  }
75596
75673
  } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) {
75597
75674
  checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation);
@@ -75602,6 +75679,13 @@ function createTypeChecker(host) {
75602
75679
  }
75603
75680
  }
75604
75681
  }
75682
+ function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) {
75683
+ const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType;
75684
+ const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType;
75685
+ const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType;
75686
+ const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */));
75687
+ return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode);
75688
+ }
75605
75689
  function checkClassForDuplicateDeclarations(node) {
75606
75690
  const instanceNames = /* @__PURE__ */ new Map();
75607
75691
  const staticNames = /* @__PURE__ */ new Map();
@@ -75749,7 +75833,7 @@ function createTypeChecker(host) {
75749
75833
  checkGrammarComputedPropertyName(node.name);
75750
75834
  checkVariableLikeDeclaration(node);
75751
75835
  setNodeLinksForPrivateIdentifierScope(node);
75752
- if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) {
75836
+ if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) {
75753
75837
  error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name));
75754
75838
  }
75755
75839
  }
@@ -75766,7 +75850,7 @@ function createTypeChecker(host) {
75766
75850
  error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator);
75767
75851
  }
75768
75852
  checkFunctionOrMethodDeclaration(node);
75769
- if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) {
75853
+ if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) {
75770
75854
  error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name));
75771
75855
  }
75772
75856
  if (isPrivateIdentifier(node.name) && !getContainingClass(node)) {
@@ -75823,7 +75907,7 @@ function createTypeChecker(host) {
75823
75907
  if (classExtendsNull) {
75824
75908
  error(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null);
75825
75909
  }
75826
- const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */)));
75910
+ const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 31 /* ParameterPropertyModifier */)));
75827
75911
  if (superCallShouldBeRootLevel) {
75828
75912
  if (!superCallIsRootLevelInConstructor(superCall, node.body)) {
75829
75913
  error(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers);
@@ -75892,11 +75976,11 @@ function createTypeChecker(host) {
75892
75976
  getNodeLinks(getter).flags |= 1 /* TypeChecked */;
75893
75977
  const getterFlags = getEffectiveModifierFlags(getter);
75894
75978
  const setterFlags = getEffectiveModifierFlags(setter);
75895
- if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) {
75979
+ if ((getterFlags & 64 /* Abstract */) !== (setterFlags & 64 /* Abstract */)) {
75896
75980
  error(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract);
75897
75981
  error(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract);
75898
75982
  }
75899
- if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) {
75983
+ if (getterFlags & 4 /* Protected */ && !(setterFlags & (4 /* Protected */ | 2 /* Private */)) || getterFlags & 2 /* Private */ && !(setterFlags & 2 /* Private */)) {
75900
75984
  error(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);
75901
75985
  error(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);
75902
75986
  }
@@ -76076,7 +76160,7 @@ function createTypeChecker(host) {
76076
76160
  const propertyName = getPropertyNameFromIndex(indexType, accessNode);
76077
76161
  if (propertyName) {
76078
76162
  const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName));
76079
- if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) {
76163
+ if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 6 /* NonPublicAccessibilityModifier */) {
76080
76164
  error(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName));
76081
76165
  return errorType;
76082
76166
  }
@@ -76174,16 +76258,16 @@ function createTypeChecker(host) {
76174
76258
  getTypeFromTypeNode(node);
76175
76259
  }
76176
76260
  function isPrivateWithinAmbient(node) {
76177
- return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */);
76261
+ return (hasEffectiveModifier(node, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */);
76178
76262
  }
76179
76263
  function getEffectiveDeclarationFlags(n, flagsToCheck) {
76180
76264
  let flags = getCombinedModifierFlagsCached(n);
76181
76265
  if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) {
76182
76266
  const container = getEnclosingContainer(n);
76183
- if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) {
76184
- flags |= 1 /* Export */;
76267
+ if (container && container.flags & 128 /* ExportContext */ && !(flags & 128 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) {
76268
+ flags |= 32 /* Export */;
76185
76269
  }
76186
- flags |= 2 /* Ambient */;
76270
+ flags |= 128 /* Ambient */;
76187
76271
  }
76188
76272
  return flags & flagsToCheck;
76189
76273
  }
@@ -76201,13 +76285,13 @@ function createTypeChecker(host) {
76201
76285
  const canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck2);
76202
76286
  forEach(overloads, (o) => {
76203
76287
  const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags;
76204
- if (deviation & 1 /* Export */) {
76288
+ if (deviation & 32 /* Export */) {
76205
76289
  error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
76206
- } else if (deviation & 2 /* Ambient */) {
76290
+ } else if (deviation & 128 /* Ambient */) {
76207
76291
  error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
76208
- } else if (deviation & (8 /* Private */ | 16 /* Protected */)) {
76292
+ } else if (deviation & (2 /* Private */ | 4 /* Protected */)) {
76209
76293
  error(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
76210
- } else if (deviation & 256 /* Abstract */) {
76294
+ } else if (deviation & 64 /* Abstract */) {
76211
76295
  error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
76212
76296
  }
76213
76297
  });
@@ -76224,7 +76308,7 @@ function createTypeChecker(host) {
76224
76308
  });
76225
76309
  }
76226
76310
  }
76227
- const flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 8 /* Private */ | 16 /* Protected */ | 256 /* Abstract */;
76311
+ const flagsToCheck = 32 /* Export */ | 128 /* Ambient */ | 2 /* Private */ | 4 /* Protected */ | 64 /* Abstract */;
76228
76312
  let someNodeFlags = 0 /* None */;
76229
76313
  let allNodeFlags = flagsToCheck;
76230
76314
  let someHaveQuestionToken = false;
@@ -76272,7 +76356,7 @@ function createTypeChecker(host) {
76272
76356
  if (isConstructor) {
76273
76357
  error(errorNode, Diagnostics.Constructor_implementation_is_missing);
76274
76358
  } else {
76275
- if (hasSyntacticModifier(node, 256 /* Abstract */)) {
76359
+ if (hasSyntacticModifier(node, 64 /* Abstract */)) {
76276
76360
  error(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive);
76277
76361
  } else {
76278
76362
  error(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration);
@@ -76358,7 +76442,7 @@ function createTypeChecker(host) {
76358
76442
  }
76359
76443
  });
76360
76444
  }
76361
- if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 256 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) {
76445
+ if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 64 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) {
76362
76446
  reportImplementationExpectedError(lastSeenNonAmbientDeclaration);
76363
76447
  }
76364
76448
  if (hasOverloads) {
@@ -76401,9 +76485,9 @@ function createTypeChecker(host) {
76401
76485
  let defaultExportedDeclarationSpaces = 0 /* None */;
76402
76486
  for (const d of symbol.declarations) {
76403
76487
  const declarationSpaces = getDeclarationSpaces(d);
76404
- const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 1 /* Export */ | 1024 /* Default */);
76405
- if (effectiveDeclarationFlags & 1 /* Export */) {
76406
- if (effectiveDeclarationFlags & 1024 /* Default */) {
76488
+ const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 32 /* Export */ | 2048 /* Default */);
76489
+ if (effectiveDeclarationFlags & 32 /* Export */) {
76490
+ if (effectiveDeclarationFlags & 2048 /* Default */) {
76407
76491
  defaultExportedDeclarationSpaces |= declarationSpaces;
76408
76492
  } else {
76409
76493
  exportedDeclarationSpaces |= declarationSpaces;
@@ -77044,6 +77128,12 @@ function createTypeChecker(host) {
77044
77128
  }
77045
77129
  }
77046
77130
  }
77131
+ function checkJSDocThisTag(node) {
77132
+ const host2 = getEffectiveJSDocHost(node);
77133
+ if (host2 && isArrowFunction(host2)) {
77134
+ error(node.tagName, Diagnostics.An_arrow_function_cannot_have_a_this_parameter);
77135
+ }
77136
+ }
77047
77137
  function checkJSDocImplementsTag(node) {
77048
77138
  const classLike = getEffectiveJSDocHost(node);
77049
77139
  if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) {
@@ -77206,13 +77296,13 @@ function createTypeChecker(host) {
77206
77296
  break;
77207
77297
  }
77208
77298
  const symbol = getSymbolOfDeclaration(member);
77209
- if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) {
77299
+ if (!symbol.isReferenced && (hasEffectiveModifier(member, 2 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) {
77210
77300
  addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol)));
77211
77301
  }
77212
77302
  break;
77213
77303
  case 176 /* Constructor */:
77214
77304
  for (const parameter of member.parameters) {
77215
- if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) {
77305
+ if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 2 /* Private */)) {
77216
77306
  addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol)));
77217
77307
  }
77218
77308
  }
@@ -77658,7 +77748,7 @@ function createTypeChecker(host) {
77658
77748
  }
77659
77749
  forEach(node.name.elements, checkSourceElement);
77660
77750
  }
77661
- if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) {
77751
+ if (node.initializer && isParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) {
77662
77752
  error(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
77663
77753
  return;
77664
77754
  }
@@ -77788,7 +77878,7 @@ function createTypeChecker(host) {
77788
77878
  if (hasQuestionToken(left) !== hasQuestionToken(right)) {
77789
77879
  return false;
77790
77880
  }
77791
- const interestingFlags = 8 /* Private */ | 16 /* Protected */ | 512 /* Async */ | 256 /* Abstract */ | 64 /* Readonly */ | 32 /* Static */;
77881
+ const interestingFlags = 2 /* Private */ | 4 /* Protected */ | 1024 /* Async */ | 64 /* Abstract */ | 8 /* Readonly */ | 256 /* Static */;
77792
77882
  return getSelectedEffectiveModifierFlags(left, interestingFlags) === getSelectedEffectiveModifierFlags(right, interestingFlags);
77793
77883
  }
77794
77884
  function checkVariableDeclaration(node) {
@@ -79116,7 +79206,7 @@ function createTypeChecker(host) {
79116
79206
  if (legacyDecorators && firstDecorator && some(node.members, (p) => hasStaticModifier(p) && isPrivateIdentifierClassElementDeclaration(p))) {
79117
79207
  grammarErrorOnNode(firstDecorator, Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator);
79118
79208
  }
79119
- if (!node.name && !hasSyntacticModifier(node, 1024 /* Default */)) {
79209
+ if (!node.name && !hasSyntacticModifier(node, 2048 /* Default */)) {
79120
79210
  grammarErrorOnFirstToken(node, Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name);
79121
79211
  }
79122
79212
  checkClassLikeDeclaration(node);
@@ -79182,7 +79272,7 @@ function createTypeChecker(host) {
79182
79272
  error(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);
79183
79273
  } else {
79184
79274
  const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */);
79185
- if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) {
79275
+ if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 64 /* Abstract */)) {
79186
79276
  error(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract);
79187
79277
  }
79188
79278
  }
@@ -79396,7 +79486,7 @@ function createTypeChecker(host) {
79396
79486
  const signatures = getSignaturesOfType(type, 1 /* Construct */);
79397
79487
  if (signatures.length) {
79398
79488
  const declaration = signatures[0].declaration;
79399
- if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) {
79489
+ if (declaration && hasEffectiveModifier(declaration, 2 /* Private */)) {
79400
79490
  const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol);
79401
79491
  if (!isNodeWithinClass(node, typeClassDeclaration)) {
79402
79492
  error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol));
@@ -79416,7 +79506,7 @@ function createTypeChecker(host) {
79416
79506
  const baseTypes = baseTypeNode && getBaseTypes(type);
79417
79507
  const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0;
79418
79508
  const baseStaticType = getBaseConstructorTypeOfClass(type);
79419
- const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16384 /* Override */);
79509
+ const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16 /* Override */);
79420
79510
  return checkMemberForOverrideModifier(
79421
79511
  node,
79422
79512
  staticType,
@@ -79457,7 +79547,7 @@ function createTypeChecker(host) {
79457
79547
  Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration.");
79458
79548
  if (derived === base) {
79459
79549
  const derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol);
79460
- if (baseDeclarationFlags & 256 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 256 /* Abstract */))) {
79550
+ if (baseDeclarationFlags & 64 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 64 /* Abstract */))) {
79461
79551
  for (const otherBaseType of getBaseTypes(type)) {
79462
79552
  if (otherBaseType === baseType)
79463
79553
  continue;
@@ -79500,7 +79590,7 @@ function createTypeChecker(host) {
79500
79590
  }
79501
79591
  } else {
79502
79592
  const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
79503
- if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) {
79593
+ if (baseDeclarationFlags & 2 /* Private */ || derivedDeclarationFlags & 2 /* Private */) {
79504
79594
  continue;
79505
79595
  }
79506
79596
  let errorMessage;
@@ -79517,7 +79607,7 @@ function createTypeChecker(host) {
79517
79607
  error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
79518
79608
  } else if (useDefineForClassFields) {
79519
79609
  const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);
79520
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
79610
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
79521
79611
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
79522
79612
  const propName = uninitialized.name;
79523
79613
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -79544,7 +79634,7 @@ function createTypeChecker(host) {
79544
79634
  }
79545
79635
  }
79546
79636
  function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {
79547
- return baseDeclarationFlags & 256 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent);
79637
+ return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent);
79548
79638
  }
79549
79639
  function getNonInheritedProperties(type, baseTypes, properties) {
79550
79640
  if (!length(baseTypes)) {
@@ -79609,7 +79699,7 @@ function createTypeChecker(host) {
79609
79699
  }
79610
79700
  const constructor = findConstructorDeclaration(node);
79611
79701
  for (const member of node.members) {
79612
- if (getEffectiveModifierFlags(member) & 2 /* Ambient */) {
79702
+ if (getEffectiveModifierFlags(member) & 128 /* Ambient */) {
79613
79703
  continue;
79614
79704
  }
79615
79705
  if (!isStatic(member) && isPropertyWithoutInitializer(member)) {
@@ -80196,7 +80286,7 @@ function createTypeChecker(host) {
80196
80286
  name
80197
80287
  );
80198
80288
  }
80199
- if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) {
80289
+ if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 32 /* Export */)) {
80200
80290
  error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName);
80201
80291
  }
80202
80292
  break;
@@ -80318,7 +80408,7 @@ function createTypeChecker(host) {
80318
80408
  checkGrammarModifiers(node);
80319
80409
  if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) {
80320
80410
  checkImportBinding(node);
80321
- if (hasSyntacticModifier(node, 1 /* Export */)) {
80411
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
80322
80412
  markExportAsReferenced(node);
80323
80413
  }
80324
80414
  if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
@@ -80730,6 +80820,8 @@ function createTypeChecker(host) {
80730
80820
  return checkJSDocAccessibilityModifiers(node);
80731
80821
  case 357 /* JSDocSatisfiesTag */:
80732
80822
  return checkJSDocSatisfiesTag(node);
80823
+ case 350 /* JSDocThisTag */:
80824
+ return checkJSDocThisTag(node);
80733
80825
  case 199 /* IndexedAccessType */:
80734
80826
  return checkIndexedAccessType(node);
80735
80827
  case 200 /* MappedType */:
@@ -81956,7 +82048,7 @@ function createTypeChecker(host) {
81956
82048
  return true;
81957
82049
  }
81958
82050
  const target = getSymbolLinks(symbol).aliasTarget;
81959
- if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
82051
+ if (target && getEffectiveModifierFlags(node) & 32 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
81960
82052
  return true;
81961
82053
  }
81962
82054
  }
@@ -81981,10 +82073,10 @@ function createTypeChecker(host) {
81981
82073
  return false;
81982
82074
  }
81983
82075
  function isRequiredInitializedParameter(parameter) {
81984
- return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */);
82076
+ return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
81985
82077
  }
81986
82078
  function isOptionalUninitializedParameterProperty(parameter) {
81987
- return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */);
82079
+ return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
81988
82080
  }
81989
82081
  function isExpandoFunctionDeclaration(node) {
81990
82082
  const declaration = getParseTreeNode(node, isFunctionDeclaration);
@@ -82838,10 +82930,10 @@ function createTypeChecker(host) {
82838
82930
  return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
82839
82931
  }
82840
82932
  }
82841
- if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) {
82933
+ if (flags & ~(2080 /* ExportDefault */ | 32768 /* Decorator */)) {
82842
82934
  return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here);
82843
82935
  }
82844
- if (hasLeadingDecorators && flags & 126975 /* Modifier */) {
82936
+ if (hasLeadingDecorators && flags & 98303 /* Modifier */) {
82845
82937
  Debug.assertIsDefined(firstDecorator);
82846
82938
  const sourceFile = getSourceFileOfNode(modifier);
82847
82939
  if (!hasParseDiagnostics(sourceFile)) {
@@ -82853,10 +82945,10 @@ function createTypeChecker(host) {
82853
82945
  }
82854
82946
  return false;
82855
82947
  }
82856
- flags |= 131072 /* Decorator */;
82857
- if (!(flags & 126975 /* Modifier */)) {
82948
+ flags |= 32768 /* Decorator */;
82949
+ if (!(flags & 98303 /* Modifier */)) {
82858
82950
  hasLeadingDecorators = true;
82859
- } else if (flags & 1 /* Export */) {
82951
+ } else if (flags & 32 /* Export */) {
82860
82952
  sawExportBeforeDecorators = true;
82861
82953
  }
82862
82954
  firstDecorator ?? (firstDecorator = modifier);
@@ -82885,39 +82977,39 @@ function createTypeChecker(host) {
82885
82977
  }
82886
82978
  break;
82887
82979
  case 164 /* OverrideKeyword */:
82888
- if (flags & 16384 /* Override */) {
82980
+ if (flags & 16 /* Override */) {
82889
82981
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override");
82890
- } else if (flags & 2 /* Ambient */) {
82982
+ } else if (flags & 128 /* Ambient */) {
82891
82983
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "override", "declare");
82892
- } else if (flags & 64 /* Readonly */) {
82984
+ } else if (flags & 8 /* Readonly */) {
82893
82985
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "readonly");
82894
- } else if (flags & 128 /* Accessor */) {
82986
+ } else if (flags & 512 /* Accessor */) {
82895
82987
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "accessor");
82896
- } else if (flags & 512 /* Async */) {
82988
+ } else if (flags & 1024 /* Async */) {
82897
82989
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "async");
82898
82990
  }
82899
- flags |= 16384 /* Override */;
82991
+ flags |= 16 /* Override */;
82900
82992
  lastOverride = modifier;
82901
82993
  break;
82902
82994
  case 125 /* PublicKeyword */:
82903
82995
  case 124 /* ProtectedKeyword */:
82904
82996
  case 123 /* PrivateKeyword */:
82905
82997
  const text = visibilityToString(modifierToFlag(modifier.kind));
82906
- if (flags & 28 /* AccessibilityModifier */) {
82998
+ if (flags & 7 /* AccessibilityModifier */) {
82907
82999
  return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen);
82908
- } else if (flags & 16384 /* Override */) {
83000
+ } else if (flags & 16 /* Override */) {
82909
83001
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "override");
82910
- } else if (flags & 32 /* Static */) {
83002
+ } else if (flags & 256 /* Static */) {
82911
83003
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "static");
82912
- } else if (flags & 128 /* Accessor */) {
83004
+ } else if (flags & 512 /* Accessor */) {
82913
83005
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "accessor");
82914
- } else if (flags & 64 /* Readonly */) {
83006
+ } else if (flags & 8 /* Readonly */) {
82915
83007
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly");
82916
- } else if (flags & 512 /* Async */) {
83008
+ } else if (flags & 1024 /* Async */) {
82917
83009
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
82918
83010
  } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) {
82919
83011
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
82920
- } else if (flags & 256 /* Abstract */) {
83012
+ } else if (flags & 64 /* Abstract */) {
82921
83013
  if (modifier.kind === 123 /* PrivateKeyword */) {
82922
83014
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract");
82923
83015
  } else {
@@ -82929,60 +83021,60 @@ function createTypeChecker(host) {
82929
83021
  flags |= modifierToFlag(modifier.kind);
82930
83022
  break;
82931
83023
  case 126 /* StaticKeyword */:
82932
- if (flags & 32 /* Static */) {
83024
+ if (flags & 256 /* Static */) {
82933
83025
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static");
82934
- } else if (flags & 64 /* Readonly */) {
83026
+ } else if (flags & 8 /* Readonly */) {
82935
83027
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "readonly");
82936
- } else if (flags & 512 /* Async */) {
83028
+ } else if (flags & 1024 /* Async */) {
82937
83029
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
82938
- } else if (flags & 128 /* Accessor */) {
83030
+ } else if (flags & 512 /* Accessor */) {
82939
83031
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor");
82940
83032
  } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) {
82941
83033
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
82942
83034
  } else if (node.kind === 169 /* Parameter */) {
82943
83035
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
82944
- } else if (flags & 256 /* Abstract */) {
83036
+ } else if (flags & 64 /* Abstract */) {
82945
83037
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract");
82946
- } else if (flags & 16384 /* Override */) {
83038
+ } else if (flags & 16 /* Override */) {
82947
83039
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "override");
82948
83040
  }
82949
- flags |= 32 /* Static */;
83041
+ flags |= 256 /* Static */;
82950
83042
  lastStatic = modifier;
82951
83043
  break;
82952
83044
  case 129 /* AccessorKeyword */:
82953
- if (flags & 128 /* Accessor */) {
83045
+ if (flags & 512 /* Accessor */) {
82954
83046
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor");
82955
- } else if (flags & 64 /* Readonly */) {
83047
+ } else if (flags & 8 /* Readonly */) {
82956
83048
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly");
82957
- } else if (flags & 2 /* Ambient */) {
83049
+ } else if (flags & 128 /* Ambient */) {
82958
83050
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare");
82959
83051
  } else if (node.kind !== 172 /* PropertyDeclaration */) {
82960
83052
  return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration);
82961
83053
  }
82962
- flags |= 128 /* Accessor */;
83054
+ flags |= 512 /* Accessor */;
82963
83055
  break;
82964
83056
  case 148 /* ReadonlyKeyword */:
82965
- if (flags & 64 /* Readonly */) {
83057
+ if (flags & 8 /* Readonly */) {
82966
83058
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly");
82967
83059
  } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) {
82968
83060
  return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
82969
- } else if (flags & 128 /* Accessor */) {
83061
+ } else if (flags & 512 /* Accessor */) {
82970
83062
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor");
82971
83063
  }
82972
- flags |= 64 /* Readonly */;
83064
+ flags |= 8 /* Readonly */;
82973
83065
  break;
82974
83066
  case 95 /* ExportKeyword */:
82975
83067
  if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later
82976
83068
  node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) {
82977
83069
  return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
82978
83070
  }
82979
- if (flags & 1 /* Export */) {
83071
+ if (flags & 32 /* Export */) {
82980
83072
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "export");
82981
- } else if (flags & 2 /* Ambient */) {
83073
+ } else if (flags & 128 /* Ambient */) {
82982
83074
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare");
82983
- } else if (flags & 256 /* Abstract */) {
83075
+ } else if (flags & 64 /* Abstract */) {
82984
83076
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "abstract");
82985
- } else if (flags & 512 /* Async */) {
83077
+ } else if (flags & 1024 /* Async */) {
82986
83078
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async");
82987
83079
  } else if (isClassLike(node.parent)) {
82988
83080
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export");
@@ -82993,7 +83085,7 @@ function createTypeChecker(host) {
82993
83085
  } else if (blockScopeKind === 6 /* AwaitUsing */) {
82994
83086
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export");
82995
83087
  }
82996
- flags |= 1 /* Export */;
83088
+ flags |= 32 /* Export */;
82997
83089
  break;
82998
83090
  case 90 /* DefaultKeyword */:
82999
83091
  const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent;
@@ -83003,19 +83095,19 @@ function createTypeChecker(host) {
83003
83095
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default");
83004
83096
  } else if (blockScopeKind === 6 /* AwaitUsing */) {
83005
83097
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default");
83006
- } else if (!(flags & 1 /* Export */)) {
83098
+ } else if (!(flags & 32 /* Export */)) {
83007
83099
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default");
83008
83100
  } else if (sawExportBeforeDecorators) {
83009
83101
  return grammarErrorOnNode(firstDecorator, Diagnostics.Decorators_are_not_valid_here);
83010
83102
  }
83011
- flags |= 1024 /* Default */;
83103
+ flags |= 2048 /* Default */;
83012
83104
  break;
83013
83105
  case 138 /* DeclareKeyword */:
83014
- if (flags & 2 /* Ambient */) {
83106
+ if (flags & 128 /* Ambient */) {
83015
83107
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare");
83016
- } else if (flags & 512 /* Async */) {
83108
+ } else if (flags & 1024 /* Async */) {
83017
83109
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
83018
- } else if (flags & 16384 /* Override */) {
83110
+ } else if (flags & 16 /* Override */) {
83019
83111
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override");
83020
83112
  } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) {
83021
83113
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare");
@@ -83029,62 +83121,62 @@ function createTypeChecker(host) {
83029
83121
  return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
83030
83122
  } else if (isPrivateIdentifierClassElementDeclaration(node)) {
83031
83123
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare");
83032
- } else if (flags & 128 /* Accessor */) {
83124
+ } else if (flags & 512 /* Accessor */) {
83033
83125
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "declare", "accessor");
83034
83126
  }
83035
- flags |= 2 /* Ambient */;
83127
+ flags |= 128 /* Ambient */;
83036
83128
  lastDeclare = modifier;
83037
83129
  break;
83038
83130
  case 128 /* AbstractKeyword */:
83039
- if (flags & 256 /* Abstract */) {
83131
+ if (flags & 64 /* Abstract */) {
83040
83132
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract");
83041
83133
  }
83042
83134
  if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) {
83043
83135
  if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) {
83044
83136
  return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);
83045
83137
  }
83046
- if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) {
83138
+ if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 64 /* Abstract */))) {
83047
83139
  const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class;
83048
83140
  return grammarErrorOnNode(modifier, message);
83049
83141
  }
83050
- if (flags & 32 /* Static */) {
83142
+ if (flags & 256 /* Static */) {
83051
83143
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract");
83052
83144
  }
83053
- if (flags & 8 /* Private */) {
83145
+ if (flags & 2 /* Private */) {
83054
83146
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract");
83055
83147
  }
83056
- if (flags & 512 /* Async */ && lastAsync) {
83148
+ if (flags & 1024 /* Async */ && lastAsync) {
83057
83149
  return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract");
83058
83150
  }
83059
- if (flags & 16384 /* Override */) {
83151
+ if (flags & 16 /* Override */) {
83060
83152
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "override");
83061
83153
  }
83062
- if (flags & 128 /* Accessor */) {
83154
+ if (flags & 512 /* Accessor */) {
83063
83155
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "accessor");
83064
83156
  }
83065
83157
  }
83066
83158
  if (isNamedDeclaration(node) && node.name.kind === 81 /* PrivateIdentifier */) {
83067
83159
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract");
83068
83160
  }
83069
- flags |= 256 /* Abstract */;
83161
+ flags |= 64 /* Abstract */;
83070
83162
  break;
83071
83163
  case 134 /* AsyncKeyword */:
83072
- if (flags & 512 /* Async */) {
83164
+ if (flags & 1024 /* Async */) {
83073
83165
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async");
83074
- } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) {
83166
+ } else if (flags & 128 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) {
83075
83167
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
83076
83168
  } else if (node.kind === 169 /* Parameter */) {
83077
83169
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async");
83078
83170
  }
83079
- if (flags & 256 /* Abstract */) {
83171
+ if (flags & 64 /* Abstract */) {
83080
83172
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract");
83081
83173
  }
83082
- flags |= 512 /* Async */;
83174
+ flags |= 1024 /* Async */;
83083
83175
  lastAsync = modifier;
83084
83176
  break;
83085
83177
  case 103 /* InKeyword */:
83086
83178
  case 147 /* OutKeyword */:
83087
- const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */;
83179
+ const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 8192 /* In */ : 16384 /* Out */;
83088
83180
  const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out";
83089
83181
  if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) {
83090
83182
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText);
@@ -83092,7 +83184,7 @@ function createTypeChecker(host) {
83092
83184
  if (flags & inOutFlag) {
83093
83185
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, inOutText);
83094
83186
  }
83095
- if (inOutFlag & 32768 /* In */ && flags & 65536 /* Out */) {
83187
+ if (inOutFlag & 8192 /* In */ && flags & 16384 /* Out */) {
83096
83188
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "in", "out");
83097
83189
  }
83098
83190
  flags |= inOutFlag;
@@ -83101,24 +83193,24 @@ function createTypeChecker(host) {
83101
83193
  }
83102
83194
  }
83103
83195
  if (node.kind === 176 /* Constructor */) {
83104
- if (flags & 32 /* Static */) {
83196
+ if (flags & 256 /* Static */) {
83105
83197
  return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
83106
83198
  }
83107
- if (flags & 16384 /* Override */) {
83199
+ if (flags & 16 /* Override */) {
83108
83200
  return grammarErrorOnNode(lastOverride, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override");
83109
83201
  }
83110
- if (flags & 512 /* Async */) {
83202
+ if (flags & 1024 /* Async */) {
83111
83203
  return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async");
83112
83204
  }
83113
83205
  return false;
83114
- } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) {
83206
+ } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 128 /* Ambient */) {
83115
83207
  return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare");
83116
- } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) {
83208
+ } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) {
83117
83209
  return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);
83118
- } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) {
83210
+ } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && node.dotDotDotToken) {
83119
83211
  return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);
83120
83212
  }
83121
- if (flags & 512 /* Async */) {
83213
+ if (flags & 1024 /* Async */) {
83122
83214
  return checkGrammarAsyncModifier(node, lastAsync);
83123
83215
  }
83124
83216
  return false;
@@ -83638,12 +83730,12 @@ function createTypeChecker(host) {
83638
83730
  if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(accessor.name)) {
83639
83731
  return grammarErrorOnNode(accessor.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);
83640
83732
  }
83641
- if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 256 /* Abstract */)) {
83733
+ if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 64 /* Abstract */)) {
83642
83734
  return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, Diagnostics._0_expected, "{");
83643
83735
  }
83644
83736
  }
83645
83737
  if (accessor.body) {
83646
- if (hasSyntacticModifier(accessor, 256 /* Abstract */)) {
83738
+ if (hasSyntacticModifier(accessor, 64 /* Abstract */)) {
83647
83739
  return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
83648
83740
  }
83649
83741
  if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) {
@@ -83715,7 +83807,7 @@ function createTypeChecker(host) {
83715
83807
  }
83716
83808
  break;
83717
83809
  case 171 /* PropertySignature */:
83718
- if (!hasSyntacticModifier(parent, 64 /* Readonly */)) {
83810
+ if (!hasSyntacticModifier(parent, 8 /* Readonly */)) {
83719
83811
  return grammarErrorOnNode(parent.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);
83720
83812
  }
83721
83813
  break;
@@ -83885,7 +83977,7 @@ function createTypeChecker(host) {
83885
83977
  const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context;
83886
83978
  return grammarErrorOnNode(node.exclamationToken, message);
83887
83979
  }
83888
- if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) {
83980
+ if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 32 /* Export */)) {
83889
83981
  checkESModuleMarker(node.name);
83890
83982
  }
83891
83983
  return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name);
@@ -84075,7 +84167,7 @@ function createTypeChecker(host) {
84075
84167
  }
84076
84168
  }
84077
84169
  function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {
84078
- if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) {
84170
+ if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 128 /* Ambient */ | 32 /* Export */ | 2048 /* Default */)) {
84079
84171
  return false;
84080
84172
  }
84081
84173
  return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier);
@@ -84390,12 +84482,14 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl {
84390
84482
  this.canTrackSymbol = !!((_a = this.inner) == null ? void 0 : _a.trackSymbol);
84391
84483
  }
84392
84484
  trackSymbol(symbol, enclosingDeclaration, meaning) {
84393
- var _a;
84485
+ var _a, _b;
84394
84486
  if (((_a = this.inner) == null ? void 0 : _a.trackSymbol) && !this.disableTrackSymbol) {
84395
84487
  if (this.inner.trackSymbol(symbol, enclosingDeclaration, meaning)) {
84396
84488
  this.onDiagnosticReported();
84397
84489
  return true;
84398
84490
  }
84491
+ if (!(symbol.flags & 262144 /* TypeParameter */))
84492
+ ((_b = this.context).trackedSymbols ?? (_b.trackedSymbols = [])).push([symbol, enclosingDeclaration, meaning]);
84399
84493
  }
84400
84494
  return false;
84401
84495
  }
@@ -86280,15 +86374,15 @@ function collectExternalModuleInfo(context, sourceFile) {
86280
86374
  }
86281
86375
  break;
86282
86376
  case 243 /* VariableStatement */:
86283
- if (hasSyntacticModifier(node, 1 /* Export */)) {
86377
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
86284
86378
  for (const decl of node.declarationList.declarations) {
86285
86379
  exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings);
86286
86380
  }
86287
86381
  }
86288
86382
  break;
86289
86383
  case 262 /* FunctionDeclaration */:
86290
- if (hasSyntacticModifier(node, 1 /* Export */)) {
86291
- if (hasSyntacticModifier(node, 1024 /* Default */)) {
86384
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
86385
+ if (hasSyntacticModifier(node, 2048 /* Default */)) {
86292
86386
  if (!hasExportDefault) {
86293
86387
  multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node));
86294
86388
  hasExportDefault = true;
@@ -86304,8 +86398,8 @@ function collectExternalModuleInfo(context, sourceFile) {
86304
86398
  }
86305
86399
  break;
86306
86400
  case 263 /* ClassDeclaration */:
86307
- if (hasSyntacticModifier(node, 1 /* Export */)) {
86308
- if (hasSyntacticModifier(node, 1024 /* Default */)) {
86401
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
86402
+ if (hasSyntacticModifier(node, 2048 /* Default */)) {
86309
86403
  if (!hasExportDefault) {
86310
86404
  multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node));
86311
86405
  hasExportDefault = true;
@@ -87170,7 +87264,7 @@ function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpre
87170
87264
  // src/compiler/transformers/namedEvaluation.ts
87171
87265
  function getAssignedNameOfIdentifier(factory2, name, expression) {
87172
87266
  const original = getOriginalNode(skipOuterExpressions(expression));
87173
- if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) {
87267
+ if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 2048 /* Default */)) {
87174
87268
  return factory2.createStringLiteral("default");
87175
87269
  }
87176
87270
  return factory2.createStringLiteralFromNode(name);
@@ -87524,13 +87618,13 @@ function transformTypeScript(context) {
87524
87618
  break;
87525
87619
  case 263 /* ClassDeclaration */:
87526
87620
  case 262 /* FunctionDeclaration */:
87527
- if (hasSyntacticModifier(node, 2 /* Ambient */)) {
87621
+ if (hasSyntacticModifier(node, 128 /* Ambient */)) {
87528
87622
  break;
87529
87623
  }
87530
87624
  if (node.name) {
87531
87625
  recordEmittedDeclarationInScope(node);
87532
87626
  } else {
87533
- Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */));
87627
+ Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 2048 /* Default */));
87534
87628
  }
87535
87629
  break;
87536
87630
  }
@@ -87585,7 +87679,7 @@ function transformTypeScript(context) {
87585
87679
  function namespaceElementVisitorWorker(node) {
87586
87680
  if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) {
87587
87681
  return void 0;
87588
- } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) {
87682
+ } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 32 /* Export */)) {
87589
87683
  return visitTypeScript(node);
87590
87684
  }
87591
87685
  return node;
@@ -87643,7 +87737,7 @@ function transformTypeScript(context) {
87643
87737
  function modifierVisitor(node) {
87644
87738
  if (isDecorator(node))
87645
87739
  return void 0;
87646
- if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) {
87740
+ if (modifierToFlag(node.kind) & 28895 /* TypeScriptModifier */) {
87647
87741
  return void 0;
87648
87742
  } else if (currentNamespace && node.kind === 95 /* ExportKeyword */) {
87649
87743
  return void 0;
@@ -87651,7 +87745,7 @@ function transformTypeScript(context) {
87651
87745
  return node;
87652
87746
  }
87653
87747
  function visitTypeScript(node) {
87654
- if (isStatement(node) && hasSyntacticModifier(node, 2 /* Ambient */)) {
87748
+ if (isStatement(node) && hasSyntacticModifier(node, 128 /* Ambient */)) {
87655
87749
  return factory2.createNotEmittedStatement(node);
87656
87750
  }
87657
87751
  switch (node.kind) {
@@ -88141,7 +88235,7 @@ function transformTypeScript(context) {
88141
88235
  return !nodeIsMissing(node.body);
88142
88236
  }
88143
88237
  function visitPropertyDeclaration(node, parent) {
88144
- const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */);
88238
+ const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 64 /* Abstract */);
88145
88239
  if (isAmbient && !(legacyDecorators && hasDecorators(node))) {
88146
88240
  return void 0;
88147
88241
  }
@@ -88150,7 +88244,7 @@ function transformTypeScript(context) {
88150
88244
  if (isAmbient) {
88151
88245
  return factory2.updatePropertyDeclaration(
88152
88246
  node,
88153
- concatenate(modifiers, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
88247
+ concatenate(modifiers, factory2.createModifiersFromModifierFlags(128 /* Ambient */)),
88154
88248
  Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
88155
88249
  /*questionOrExclamationToken*/
88156
88250
  void 0,
@@ -88313,7 +88407,7 @@ function transformTypeScript(context) {
88313
88407
  );
88314
88408
  }
88315
88409
  function shouldEmitAccessorDeclaration(node) {
88316
- return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 256 /* Abstract */));
88410
+ return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 64 /* Abstract */));
88317
88411
  }
88318
88412
  function visitGetAccessor(node, parent) {
88319
88413
  if (!(node.transformFlags & 1 /* ContainsTypeScript */)) {
@@ -89046,16 +89140,16 @@ function transformTypeScript(context) {
89046
89140
  }
89047
89141
  }
89048
89142
  function isExportOfNamespace(node) {
89049
- return currentNamespace !== void 0 && hasSyntacticModifier(node, 1 /* Export */);
89143
+ return currentNamespace !== void 0 && hasSyntacticModifier(node, 32 /* Export */);
89050
89144
  }
89051
89145
  function isExternalModuleExport(node) {
89052
- return currentNamespace === void 0 && hasSyntacticModifier(node, 1 /* Export */);
89146
+ return currentNamespace === void 0 && hasSyntacticModifier(node, 32 /* Export */);
89053
89147
  }
89054
89148
  function isNamedExternalModuleExport(node) {
89055
- return isExternalModuleExport(node) && !hasSyntacticModifier(node, 1024 /* Default */);
89149
+ return isExternalModuleExport(node) && !hasSyntacticModifier(node, 2048 /* Default */);
89056
89150
  }
89057
89151
  function isDefaultExternalModuleExport(node) {
89058
- return isExternalModuleExport(node) && hasSyntacticModifier(node, 1024 /* Default */);
89152
+ return isExternalModuleExport(node) && hasSyntacticModifier(node, 2048 /* Default */);
89059
89153
  }
89060
89154
  function createExportMemberAssignmentStatement(node) {
89061
89155
  const expression = factory2.createAssignment(
@@ -90388,8 +90482,8 @@ function transformClassFields(context) {
90388
90482
  getClassLexicalEnvironment().classThis = node.emitNode.classThis;
90389
90483
  }
90390
90484
  const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */;
90391
- const isExport = hasSyntacticModifier(node, 1 /* Export */);
90392
- const isDefault = hasSyntacticModifier(node, 1024 /* Default */);
90485
+ const isExport = hasSyntacticModifier(node, 32 /* Export */);
90486
+ const isDefault = hasSyntacticModifier(node, 2048 /* Default */);
90393
90487
  let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);
90394
90488
  const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause);
90395
90489
  const { members, prologue } = transformClassMembers(node);
@@ -90935,7 +91029,7 @@ function transformClassFields(context) {
90935
91029
  return void 0;
90936
91030
  }
90937
91031
  const propertyOriginalNode = getOriginalNode(property);
90938
- if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) {
91032
+ if (hasSyntacticModifier(propertyOriginalNode, 64 /* Abstract */)) {
90939
91033
  return void 0;
90940
91034
  }
90941
91035
  let initializer = visitNode(property.initializer, visitor, isExpression);
@@ -91971,8 +92065,8 @@ function transformLegacyDecorators(context) {
91971
92065
  return addRange([updated], decorationStatements);
91972
92066
  }
91973
92067
  function transformClassDeclarationWithClassDecorators(node, name) {
91974
- const isExport = hasSyntacticModifier(node, 1 /* Export */);
91975
- const isDefault = hasSyntacticModifier(node, 1024 /* Default */);
92068
+ const isExport = hasSyntacticModifier(node, 32 /* Export */);
92069
+ const isDefault = hasSyntacticModifier(node, 2048 /* Default */);
91976
92070
  const modifiers = visitNodes2(node.modifiers, (node2) => isExportOrDefaultModifier(node2) || isDecorator(node2) ? void 0 : node2, isModifierLike);
91977
92071
  const location = moveRangePastModifiers(node);
91978
92072
  const classAlias = getClassAliasIfNeeded(node);
@@ -91993,7 +92087,7 @@ function transformLegacyDecorators(context) {
91993
92087
  let members = visitNodes2(node.members, visitor, isClassElement);
91994
92088
  let decorationStatements = [];
91995
92089
  ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members));
91996
- const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member));
92090
+ const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 256 /* Static */) || isClassStaticBlockDeclaration(member));
91997
92091
  if (assignClassAliasInStaticBlock) {
91998
92092
  members = setTextRange(
91999
92093
  factory2.createNodeArray([
@@ -92124,7 +92218,7 @@ function transformLegacyDecorators(context) {
92124
92218
  );
92125
92219
  }
92126
92220
  function visitPropertyDeclaration(node) {
92127
- if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) {
92221
+ if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 128 /* Ambient */)) {
92128
92222
  return void 0;
92129
92223
  }
92130
92224
  return finishClassElement(
@@ -92212,7 +92306,7 @@ function transformLegacyDecorators(context) {
92212
92306
  const memberName = getExpressionForPropertyName(
92213
92307
  member,
92214
92308
  /*generateNameForComputedPropertyName*/
92215
- !hasSyntacticModifier(member, 2 /* Ambient */)
92309
+ !hasSyntacticModifier(member, 128 /* Ambient */)
92216
92310
  );
92217
92311
  const descriptor = languageVersion > 0 /* ES3 */ ? isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull() : void 0;
92218
92312
  const helper = emitHelpers().createDecorateHelper(
@@ -92995,8 +93089,8 @@ function transformESDecorators(context) {
92995
93089
  const statements = [];
92996
93090
  const originalClass = getOriginalNode(node, isClassLike) ?? node;
92997
93091
  const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default");
92998
- const isExport = hasSyntacticModifier(node, 1 /* Export */);
92999
- const isDefault = hasSyntacticModifier(node, 1024 /* Default */);
93092
+ const isExport = hasSyntacticModifier(node, 32 /* Export */);
93093
+ const isDefault = hasSyntacticModifier(node, 2048 /* Default */);
93000
93094
  if (!node.name) {
93001
93095
  node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className);
93002
93096
  }
@@ -95307,7 +95401,7 @@ function transformES2018(context) {
95307
95401
  return visitEachChild(node, visitor, context);
95308
95402
  }
95309
95403
  function visitVariableStatement(node) {
95310
- if (hasSyntacticModifier(node, 1 /* Export */)) {
95404
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
95311
95405
  const savedExportedVariableStatement = exportedVariableStatement;
95312
95406
  exportedVariableStatement = true;
95313
95407
  const visited = visitEachChild(node, visitor, context);
@@ -96519,7 +96613,7 @@ function transformESNext(context) {
96519
96613
  addRange(topLevelStatements, endLexicalEnvironment());
96520
96614
  if (exportVars.length) {
96521
96615
  topLevelStatements.push(factory2.createVariableStatement(
96522
- factory2.createModifiersFromModifierFlags(1 /* Export */),
96616
+ factory2.createModifiersFromModifierFlags(32 /* Export */),
96523
96617
  factory2.createVariableDeclarationList(
96524
96618
  exportVars,
96525
96619
  1 /* Let */
@@ -96816,8 +96910,8 @@ function transformESNext(context) {
96816
96910
  if (!node.name && defaultExportBinding) {
96817
96911
  return node;
96818
96912
  }
96819
- const isExported = hasSyntacticModifier(node, 1 /* Export */);
96820
- const isDefault = hasSyntacticModifier(node, 1024 /* Default */);
96913
+ const isExported = hasSyntacticModifier(node, 32 /* Export */);
96914
+ const isDefault = hasSyntacticModifier(node, 2048 /* Default */);
96821
96915
  let expression = factory2.converters.convertToClassExpression(node);
96822
96916
  if (node.name) {
96823
96917
  hoistBindingIdentifier(
@@ -96865,7 +96959,7 @@ function transformESNext(context) {
96865
96959
  }
96866
96960
  function hoistVariableStatement(node) {
96867
96961
  let expressions;
96868
- const isExported = hasSyntacticModifier(node, 1 /* Export */);
96962
+ const isExported = hasSyntacticModifier(node, 32 /* Export */);
96869
96963
  for (const variable of node.declarationList.declarations) {
96870
96964
  hoistBindingElement(variable, isExported, variable);
96871
96965
  if (variable.initializer) {
@@ -97453,7 +97547,7 @@ function transformJsx(context) {
97453
97547
  }
97454
97548
  function transformJsxSpreadAttributeToProps(node) {
97455
97549
  if (isObjectLiteralExpression(node.expression) && !hasProto(node.expression)) {
97456
- return node.expression.properties;
97550
+ return sameMap(node.expression.properties, (p) => Debug.checkDefined(visitNode(p, visitor, isObjectLiteralElementLike)));
97457
97551
  }
97458
97552
  return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
97459
97553
  }
@@ -98397,8 +98491,8 @@ function transformES2015(context) {
98397
98491
  setTextRange(statement, node);
98398
98492
  startOnNewLine(statement);
98399
98493
  statements.push(statement);
98400
- if (hasSyntacticModifier(node, 1 /* Export */)) {
98401
- const exportStatement = hasSyntacticModifier(node, 1024 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node));
98494
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
98495
+ const exportStatement = hasSyntacticModifier(node, 2048 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node));
98402
98496
  setOriginalNode(exportStatement, statement);
98403
98497
  statements.push(exportStatement);
98404
98498
  }
@@ -99590,7 +99684,7 @@ function transformES2015(context) {
99590
99684
  return node.declarationList.declarations.length === 1 && !!node.declarationList.declarations[0].initializer && !!(getInternalEmitFlags(node.declarationList.declarations[0].initializer) & 1 /* TypeScriptClassWrapper */);
99591
99685
  }
99592
99686
  function visitVariableStatement(node) {
99593
- const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */);
99687
+ const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 32 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */);
99594
99688
  let updated;
99595
99689
  if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) {
99596
99690
  let assignments;
@@ -104539,7 +104633,7 @@ function transformModule(context) {
104539
104633
  Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
104540
104634
  let statements;
104541
104635
  if (moduleKind !== 2 /* AMD */) {
104542
- if (hasSyntacticModifier(node, 1 /* Export */)) {
104636
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
104543
104637
  statements = append(
104544
104638
  statements,
104545
104639
  setOriginalNode(
@@ -104585,7 +104679,7 @@ function transformModule(context) {
104585
104679
  );
104586
104680
  }
104587
104681
  } else {
104588
- if (hasSyntacticModifier(node, 1 /* Export */)) {
104682
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
104589
104683
  statements = append(
104590
104684
  statements,
104591
104685
  setOriginalNode(
@@ -104723,7 +104817,7 @@ function transformModule(context) {
104723
104817
  }
104724
104818
  function visitFunctionDeclaration(node) {
104725
104819
  let statements;
104726
- if (hasSyntacticModifier(node, 1 /* Export */)) {
104820
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
104727
104821
  statements = append(
104728
104822
  statements,
104729
104823
  setOriginalNode(
@@ -104760,7 +104854,7 @@ function transformModule(context) {
104760
104854
  }
104761
104855
  function visitClassDeclaration(node) {
104762
104856
  let statements;
104763
- if (hasSyntacticModifier(node, 1 /* Export */)) {
104857
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
104764
104858
  statements = append(
104765
104859
  statements,
104766
104860
  setOriginalNode(
@@ -104794,7 +104888,7 @@ function transformModule(context) {
104794
104888
  let statements;
104795
104889
  let variables;
104796
104890
  let expressions;
104797
- if (hasSyntacticModifier(node, 1 /* Export */)) {
104891
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
104798
104892
  let modifiers;
104799
104893
  let removeCommentsOnExpressions = false;
104800
104894
  for (const variable of node.declarationList.declarations) {
@@ -104980,8 +105074,8 @@ function transformModule(context) {
104980
105074
  return statements;
104981
105075
  }
104982
105076
  const seen = new IdentifierNameMap();
104983
- if (hasSyntacticModifier(decl, 1 /* Export */)) {
104984
- const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl);
105077
+ if (hasSyntacticModifier(decl, 32 /* Export */)) {
105078
+ const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl);
104985
105079
  statements = appendExportStatement(
104986
105080
  statements,
104987
105081
  seen,
@@ -105468,7 +105562,7 @@ function transformSystemModule(context) {
105468
105562
  addRange(statements, hoistedStatements);
105469
105563
  insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
105470
105564
  const exportStarFunction = addExportStarIfNeeded(statements);
105471
- const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(512 /* Async */) : void 0;
105565
+ const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(1024 /* Async */) : void 0;
105472
105566
  const moduleObject = factory2.createObjectLiteralExpression(
105473
105567
  [
105474
105568
  factory2.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)),
@@ -105670,7 +105764,7 @@ function transformSystemModule(context) {
105670
105764
  factory2.createAssignment(importVariableName, parameterName)
105671
105765
  )
105672
105766
  );
105673
- if (hasSyntacticModifier(entry, 1 /* Export */)) {
105767
+ if (hasSyntacticModifier(entry, 32 /* Export */)) {
105674
105768
  statements.push(
105675
105769
  factory2.createExpressionStatement(
105676
105770
  factory2.createCallExpression(
@@ -105823,7 +105917,7 @@ function transformSystemModule(context) {
105823
105917
  );
105824
105918
  }
105825
105919
  function visitFunctionDeclaration(node) {
105826
- if (hasSyntacticModifier(node, 1 /* Export */)) {
105920
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
105827
105921
  hoistedStatements = append(
105828
105922
  hoistedStatements,
105829
105923
  factory2.updateFunctionDeclaration(
@@ -105910,7 +106004,7 @@ function transformSystemModule(context) {
105910
106004
  statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList));
105911
106005
  } else {
105912
106006
  let expressions;
105913
- const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */);
106007
+ const isExportedDeclaration = hasSyntacticModifier(node, 32 /* Export */);
105914
106008
  for (const variable of node.declarationList.declarations) {
105915
106009
  if (variable.initializer) {
105916
106010
  expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration));
@@ -106046,8 +106140,8 @@ function transformSystemModule(context) {
106046
106140
  return statements;
106047
106141
  }
106048
106142
  let excludeName;
106049
- if (hasSyntacticModifier(decl, 1 /* Export */)) {
106050
- const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createStringLiteral("default") : decl.name;
106143
+ if (hasSyntacticModifier(decl, 32 /* Export */)) {
106144
+ const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createStringLiteral("default") : decl.name;
106051
106145
  statements = appendExportStatement(statements, exportName, factory2.getLocalName(decl));
106052
106146
  excludeName = getTextOfIdentifierOrLiteral(exportName);
106053
106147
  }
@@ -106792,7 +106886,7 @@ function transformECMAScriptModule(context) {
106792
106886
  return singleOrMany(statements);
106793
106887
  }
106794
106888
  function appendExportsOfImportEqualsDeclaration(statements, node) {
106795
- if (hasSyntacticModifier(node, 1 /* Export */)) {
106889
+ if (hasSyntacticModifier(node, 32 /* Export */)) {
106796
106890
  statements = append(
106797
106891
  statements,
106798
106892
  factory2.createExportDeclaration(
@@ -107002,7 +107096,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) {
107002
107096
  } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isIndexSignatureDeclaration(node)) {
107003
107097
  return getReturnTypeVisibilityError;
107004
107098
  } else if (isParameter(node)) {
107005
- if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 8 /* Private */)) {
107099
+ if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 2 /* Private */)) {
107006
107100
  return getVariableDeclarationTypeVisibilityError;
107007
107101
  }
107008
107102
  return getParameterDeclarationTypeVisibilityError;
@@ -107020,7 +107114,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) {
107020
107114
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
107021
107115
  if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) {
107022
107116
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
107023
- } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
107117
+ } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 2 /* Private */)) {
107024
107118
  if (isStatic(node)) {
107025
107119
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
107026
107120
  } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) {
@@ -107741,7 +107835,7 @@ function transformDeclarations(context) {
107741
107835
  return void 0;
107742
107836
  }
107743
107837
  function ensureType(node, type, ignorePrivate) {
107744
- if (!ignorePrivate && hasEffectiveModifier(node, 8 /* Private */)) {
107838
+ if (!ignorePrivate && hasEffectiveModifier(node, 2 /* Private */)) {
107745
107839
  return;
107746
107840
  }
107747
107841
  if (shouldPrintWithInitializer(node)) {
@@ -107821,7 +107915,7 @@ function transformDeclarations(context) {
107821
107915
  }
107822
107916
  }
107823
107917
  function updateParamsList(node, params, modifierMask) {
107824
- if (hasEffectiveModifier(node, 8 /* Private */)) {
107918
+ if (hasEffectiveModifier(node, 2 /* Private */)) {
107825
107919
  return factory2.createNodeArray();
107826
107920
  }
107827
107921
  const newParams = map(params, (p) => ensureParameter(p, modifierMask));
@@ -107866,7 +107960,7 @@ function transformDeclarations(context) {
107866
107960
  return factory2.createNodeArray(newParams || emptyArray);
107867
107961
  }
107868
107962
  function ensureTypeParams(node, params) {
107869
- return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
107963
+ return hasEffectiveModifier(node, 2 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
107870
107964
  }
107871
107965
  function isEnclosingDeclaration(node) {
107872
107966
  return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
@@ -108052,7 +108146,7 @@ function transformDeclarations(context) {
108052
108146
  const oldWithinObjectLiteralType = suppressNewDiagnosticContexts;
108053
108147
  let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */;
108054
108148
  if (isMethodDeclaration(input) || isMethodSignature(input)) {
108055
- if (hasEffectiveModifier(input, 8 /* Private */)) {
108149
+ if (hasEffectiveModifier(input, 2 /* Private */)) {
108056
108150
  if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input)
108057
108151
  return;
108058
108152
  return cleanup(factory2.createPropertyDeclaration(
@@ -108140,7 +108234,7 @@ function transformDeclarations(context) {
108140
108234
  input,
108141
108235
  ensureModifiers(input),
108142
108236
  input.name,
108143
- updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)),
108237
+ updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)),
108144
108238
  ensureType(input, accessorType),
108145
108239
  /*body*/
108146
108240
  void 0
@@ -108157,7 +108251,7 @@ function transformDeclarations(context) {
108157
108251
  input,
108158
108252
  ensureModifiers(input),
108159
108253
  input.name,
108160
- updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)),
108254
+ updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)),
108161
108255
  /*body*/
108162
108256
  void 0
108163
108257
  ));
@@ -108314,7 +108408,7 @@ function transformDeclarations(context) {
108314
108408
  }
108315
108409
  }
108316
108410
  function isPrivateMethodTypeParameter(node) {
108317
- return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */);
108411
+ return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 2 /* Private */);
108318
108412
  }
108319
108413
  function visitDeclarationStatements(input) {
108320
108414
  if (!isPreservedDeclarationStatement(input)) {
@@ -108373,10 +108467,10 @@ function transformDeclarations(context) {
108373
108467
  return input;
108374
108468
  }
108375
108469
  function stripExportModifiers(statement) {
108376
- if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 1024 /* Default */) || !canHaveModifiers(statement)) {
108470
+ if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 2048 /* Default */) || !canHaveModifiers(statement)) {
108377
108471
  return statement;
108378
108472
  }
108379
- const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */));
108473
+ const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (131071 /* All */ ^ 32 /* Export */));
108380
108474
  return factory2.replaceModifiers(statement, modifiers);
108381
108475
  }
108382
108476
  function updateModuleDeclarationAndKeyword(node, modifiers, name, body) {
@@ -108526,10 +108620,10 @@ function transformDeclarations(context) {
108526
108620
  ));
108527
108621
  }
108528
108622
  const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */);
108529
- if (!hasEffectiveModifier(clean2, 1024 /* Default */)) {
108623
+ if (!hasEffectiveModifier(clean2, 2048 /* Default */)) {
108530
108624
  return [clean2, namespaceDecl];
108531
108625
  }
108532
- const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~1025 /* ExportDefault */ | 2 /* Ambient */);
108626
+ const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~2080 /* ExportDefault */ | 128 /* Ambient */);
108533
108627
  const cleanDeclaration = factory2.updateFunctionDeclaration(
108534
108628
  clean2,
108535
108629
  modifiers,
@@ -108621,7 +108715,7 @@ function transformDeclarations(context) {
108621
108715
  if (ctor) {
108622
108716
  const oldDiag2 = getSymbolAccessibilityDiagnostic;
108623
108717
  parameterProperties = compact(flatMap(ctor.parameters, (param) => {
108624
- if (!hasSyntacticModifier(param, 16476 /* ParameterPropertyModifier */) || shouldStripInternal(param))
108718
+ if (!hasSyntacticModifier(param, 31 /* ParameterPropertyModifier */) || shouldStripInternal(param))
108625
108719
  return;
108626
108720
  getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param);
108627
108721
  if (param.name.kind === 80 /* Identifier */) {
@@ -108850,11 +108944,11 @@ function transformDeclarations(context) {
108850
108944
  return factory2.createModifiersFromModifierFlags(newFlags);
108851
108945
  }
108852
108946
  function ensureModifierFlags(node) {
108853
- let mask = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */);
108854
- let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */;
108947
+ let mask = 131071 /* All */ ^ (1 /* Public */ | 1024 /* Async */ | 16 /* Override */);
108948
+ let additions = needsDeclare && !isAlwaysType(node) ? 128 /* Ambient */ : 0 /* None */;
108855
108949
  const parentIsFile = node.parent.kind === 312 /* SourceFile */;
108856
108950
  if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) {
108857
- mask ^= 2 /* Ambient */;
108951
+ mask ^= 128 /* Ambient */;
108858
108952
  additions = 0 /* None */;
108859
108953
  }
108860
108954
  return maskModifierFlags(node, mask, additions);
@@ -108896,13 +108990,13 @@ function isAlwaysType(node) {
108896
108990
  function maskModifiers(factory2, node, modifierMask, modifierAdditions) {
108897
108991
  return factory2.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions));
108898
108992
  }
108899
- function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public */, modifierAdditions = 0 /* None */) {
108993
+ function maskModifierFlags(node, modifierMask = 131071 /* All */ ^ 1 /* Public */, modifierAdditions = 0 /* None */) {
108900
108994
  let flags = getEffectiveModifierFlags(node) & modifierMask | modifierAdditions;
108901
- if (flags & 1024 /* Default */ && !(flags & 1 /* Export */)) {
108902
- flags ^= 1 /* Export */;
108995
+ if (flags & 2048 /* Default */ && !(flags & 32 /* Export */)) {
108996
+ flags ^= 32 /* Export */;
108903
108997
  }
108904
- if (flags & 1024 /* Default */ && flags & 2 /* Ambient */) {
108905
- flags ^= 2 /* Ambient */;
108998
+ if (flags & 2048 /* Default */ && flags & 128 /* Ambient */) {
108999
+ flags ^= 128 /* Ambient */;
108906
109000
  }
108907
109001
  return flags;
108908
109002
  }
@@ -108915,7 +109009,7 @@ function canHaveLiteralInitializer(node) {
108915
109009
  switch (node.kind) {
108916
109010
  case 172 /* PropertyDeclaration */:
108917
109011
  case 171 /* PropertySignature */:
108918
- return !hasEffectiveModifier(node, 8 /* Private */);
109012
+ return !hasEffectiveModifier(node, 2 /* Private */);
108919
109013
  case 169 /* Parameter */:
108920
109014
  case 260 /* VariableDeclaration */:
108921
109015
  return true;
@@ -117674,7 +117768,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
117674
117768
  }
117675
117769
  }
117676
117770
  } else if (isModuleDeclaration(node)) {
117677
- if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 2 /* Ambient */) || file.isDeclarationFile)) {
117771
+ if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 128 /* Ambient */) || file.isDeclarationFile)) {
117678
117772
  node.name.parent = node;
117679
117773
  const nameText = getTextOfIdentifierOrLiteral(node.name);
117680
117774
  if (isExternalModuleFile || inAmbientModule && !isExternalModuleNameRelative(nameText)) {