typescript 5.0.0-dev.20221215 → 5.0.0-dev.20221217

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.
@@ -42,7 +42,7 @@ var ts = (() => {
42
42
  "src/compiler/corePublic.ts"() {
43
43
  "use strict";
44
44
  versionMajorMinor = "5.0";
45
- version = `${versionMajorMinor}.0-dev.20221215`;
45
+ version = `${versionMajorMinor}.0-dev.20221217`;
46
46
  Comparison = /* @__PURE__ */ ((Comparison3) => {
47
47
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
48
48
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3573,7 +3573,7 @@ ${lanes.join("\n")}
3573
3573
  const name = DiagnosticCategory[d.category];
3574
3574
  return lowerCase ? name.toLowerCase() : name;
3575
3575
  }
3576
- var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
3576
+ var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas, DeprecationVersion;
3577
3577
  var init_types = __esm({
3578
3578
  "src/compiler/types.ts"() {
3579
3579
  "use strict";
@@ -4060,18 +4060,18 @@ ${lanes.join("\n")}
4060
4060
  RelationComparisonResult3[RelationComparisonResult3["ReportsMask"] = 24] = "ReportsMask";
4061
4061
  return RelationComparisonResult3;
4062
4062
  })(RelationComparisonResult || {});
4063
- GeneratedIdentifierFlags = /* @__PURE__ */ ((GeneratedIdentifierFlags3) => {
4064
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["None"] = 0] = "None";
4065
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["Auto"] = 1] = "Auto";
4066
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["Loop"] = 2] = "Loop";
4067
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["Unique"] = 3] = "Unique";
4068
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["Node"] = 4] = "Node";
4069
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["KindMask"] = 7] = "KindMask";
4070
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["ReservedInNestedScopes"] = 8] = "ReservedInNestedScopes";
4071
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["Optimistic"] = 16] = "Optimistic";
4072
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["FileLevel"] = 32] = "FileLevel";
4073
- GeneratedIdentifierFlags3[GeneratedIdentifierFlags3["AllowNameSubstitution"] = 64] = "AllowNameSubstitution";
4074
- return GeneratedIdentifierFlags3;
4063
+ GeneratedIdentifierFlags = /* @__PURE__ */ ((GeneratedIdentifierFlags2) => {
4064
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["None"] = 0] = "None";
4065
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Auto"] = 1] = "Auto";
4066
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Loop"] = 2] = "Loop";
4067
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Unique"] = 3] = "Unique";
4068
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Node"] = 4] = "Node";
4069
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["KindMask"] = 7] = "KindMask";
4070
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["ReservedInNestedScopes"] = 8] = "ReservedInNestedScopes";
4071
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Optimistic"] = 16] = "Optimistic";
4072
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["FileLevel"] = 32] = "FileLevel";
4073
+ GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["AllowNameSubstitution"] = 64] = "AllowNameSubstitution";
4074
+ return GeneratedIdentifierFlags2;
4075
4075
  })(GeneratedIdentifierFlags || {});
4076
4076
  TokenFlags = /* @__PURE__ */ ((TokenFlags2) => {
4077
4077
  TokenFlags2[TokenFlags2["None"] = 0] = "None";
@@ -4673,7 +4673,7 @@ ${lanes.join("\n")}
4673
4673
  })(DiagnosticCategory || {});
4674
4674
  ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => {
4675
4675
  ModuleResolutionKind3[ModuleResolutionKind3["Classic"] = 1] = "Classic";
4676
- ModuleResolutionKind3[ModuleResolutionKind3["NodeJs"] = 2] = "NodeJs";
4676
+ ModuleResolutionKind3[ModuleResolutionKind3["Node10"] = 2] = "Node10";
4677
4677
  ModuleResolutionKind3[ModuleResolutionKind3["Node16"] = 3] = "Node16";
4678
4678
  ModuleResolutionKind3[ModuleResolutionKind3["NodeNext"] = 99] = "NodeNext";
4679
4679
  ModuleResolutionKind3[ModuleResolutionKind3["Bundler"] = 100] = "Bundler";
@@ -5229,6 +5229,12 @@ ${lanes.join("\n")}
5229
5229
  kind: 4 /* MultiLine */
5230
5230
  }
5231
5231
  };
5232
+ DeprecationVersion = /* @__PURE__ */ ((DeprecationVersion2) => {
5233
+ DeprecationVersion2["v5_0"] = "5.0";
5234
+ DeprecationVersion2["v5_5"] = "5.5";
5235
+ DeprecationVersion2["v6_0"] = "6.0";
5236
+ return DeprecationVersion2;
5237
+ })(DeprecationVersion || {});
5232
5238
  }
5233
5239
  });
5234
5240
 
@@ -7196,6 +7202,7 @@ ${lanes.join("\n")}
7196
7202
  _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, 1 /* Error */, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),
7197
7203
  accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, 1 /* Error */, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."),
7198
7204
  An_accessor_property_cannot_be_declared_optional: diag(1276, 1 /* Error */, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."),
7205
+ _0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: diag(1277, 1 /* Error */, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", "'{0}' modifier can only appear on a type parameter of a function, method or class"),
7199
7206
  with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
7200
7207
  await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
7201
7208
  The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
@@ -7814,7 +7821,7 @@ ${lanes.join("\n")}
7814
7821
  Its_element_type_0_is_not_a_valid_JSX_element: diag(2789, 1 /* Error */, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."),
7815
7822
  The_operand_of_a_delete_operator_must_be_optional: diag(2790, 1 /* Error */, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."),
7816
7823
  Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: diag(2791, 1 /* Error */, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),
7817
- Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option: diag(2792, 1 /* Error */, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"),
7824
+ Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option: diag(2792, 1 /* Error */, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),
7818
7825
  The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: diag(2793, 1 /* Error */, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),
7819
7826
  Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: diag(2794, 1 /* Error */, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),
7820
7827
  The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, 1 /* Error */, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),
@@ -7996,7 +8003,7 @@ ${lanes.join("\n")}
7996
8003
  Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, 1 /* Error */, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),
7997
8004
  Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, 1 /* Error */, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),
7998
8005
  Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, 1 /* Error */, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),
7999
- Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy: diag(5070, 1 /* Error */, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."),
8006
+ Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic: diag(5070, 1 /* Error */, "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),
8000
8007
  Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, 1 /* Error */, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."),
8001
8008
  Unknown_build_option_0: diag(5072, 1 /* Error */, "Unknown_build_option_0_5072", "Unknown build option '{0}'."),
8002
8009
  Build_option_0_requires_a_value_of_type_1: diag(5073, 1 /* Error */, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."),
@@ -8027,6 +8034,9 @@ ${lanes.join("\n")}
8027
8034
  Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
8028
8035
  Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(5099, 1 /* Error */, "Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Aster_5099", `Import assignment is not allowed when 'moduleResolution' is set to 'bundler'. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
8029
8036
  Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_bundler_Consider_using_export_default_or_another_module_format_instead: diag(5100, 1 /* Error */, "Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_bundler_Consider_using_export_defau_5100", "Export assignment cannot be used when 'moduleResolution' is set to 'bundler'. Consider using 'export default' or another module format instead."),
8037
+ Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify 'ignoreDeprecations: "{2}"' to silence this error.`),
8038
+ Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."),
8039
+ Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."),
8030
8040
  Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
8031
8041
  Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
8032
8042
  Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
@@ -11469,12 +11479,10 @@ ${lanes.join("\n")}
11469
11479
  }
11470
11480
  function getEffectiveTypeParameterDeclarations(node) {
11471
11481
  if (isJSDocSignature(node)) {
11472
- if (isJSDoc(node.parent)) {
11473
- const overloadTag = find(node.parent.tags, (tag) => {
11474
- return isJSDocOverloadTag(tag) && tag.typeExpression === node;
11475
- });
11476
- if (overloadTag) {
11477
- return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0);
11482
+ if (isJSDocOverloadTag(node.parent)) {
11483
+ const jsDoc = getJSDocRoot(node.parent);
11484
+ if (jsDoc && length(jsDoc.tags)) {
11485
+ return flatMap(jsDoc.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0);
11478
11486
  }
11479
11487
  }
11480
11488
  return emptyArray;
@@ -11631,10 +11639,10 @@ ${lanes.join("\n")}
11631
11639
  return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind);
11632
11640
  }
11633
11641
  function isGeneratedIdentifier(node) {
11634
- return isIdentifier(node) && (node.autoGenerateFlags & 7 /* KindMask */) > 0 /* None */;
11642
+ return isIdentifier(node) && node.autoGenerate !== void 0;
11635
11643
  }
11636
11644
  function isGeneratedPrivateIdentifier(node) {
11637
- return isPrivateIdentifier(node) && (node.autoGenerateFlags & 7 /* KindMask */) > 0 /* None */;
11645
+ return isPrivateIdentifier(node) && node.autoGenerate !== void 0;
11638
11646
  }
11639
11647
  function isPrivateIdentifierClassElementDeclaration(node) {
11640
11648
  return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name);
@@ -13005,7 +13013,7 @@ ${lanes.join("\n")}
13005
13013
  switch (name.kind) {
13006
13014
  case 79 /* Identifier */:
13007
13015
  case 80 /* PrivateIdentifier */:
13008
- return name.autoGenerateFlags ? void 0 : name.escapedText;
13016
+ return name.autoGenerate ? void 0 : name.escapedText;
13009
13017
  case 10 /* StringLiteral */:
13010
13018
  case 8 /* NumericLiteral */:
13011
13019
  case 14 /* NoSubstitutionTemplateLiteral */:
@@ -16204,7 +16212,7 @@ ${lanes.join("\n")}
16204
16212
  watcher.close();
16205
16213
  }
16206
16214
  function getCheckFlags(symbol) {
16207
- return symbol.flags & 33554432 /* Transient */ ? symbol.checkFlags : 0;
16215
+ return symbol.flags & 33554432 /* Transient */ ? symbol.links.checkFlags : 0;
16208
16216
  }
16209
16217
  function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) {
16210
16218
  if (s.valueDeclaration) {
@@ -16213,7 +16221,7 @@ ${lanes.join("\n")}
16213
16221
  return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */;
16214
16222
  }
16215
16223
  if (getCheckFlags(s) & 6 /* Synthetic */) {
16216
- const checkFlags = s.checkFlags;
16224
+ const checkFlags = s.links.checkFlags;
16217
16225
  const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 8 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 4 /* Public */ : 16 /* Protected */;
16218
16226
  const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 32 /* Static */ : 0;
16219
16227
  return accessModifier | staticModifier;
@@ -16471,9 +16479,16 @@ ${lanes.join("\n")}
16471
16479
  this.escapedName = name;
16472
16480
  this.declarations = void 0;
16473
16481
  this.valueDeclaration = void 0;
16474
- this.id = void 0;
16475
- this.mergeId = void 0;
16482
+ this.id = 0;
16483
+ this.mergeId = 0;
16476
16484
  this.parent = void 0;
16485
+ this.members = void 0;
16486
+ this.exports = void 0;
16487
+ this.exportSymbol = void 0;
16488
+ this.constEnumOnlyModule = void 0;
16489
+ this.isReferenced = void 0;
16490
+ this.isAssigned = void 0;
16491
+ this.links = void 0;
16477
16492
  }
16478
16493
  function Type3(checker, flags) {
16479
16494
  this.flags = flags;
@@ -16775,7 +16790,7 @@ ${lanes.join("\n")}
16775
16790
  if (moduleResolution === void 0) {
16776
16791
  switch (getEmitModuleKind(compilerOptions)) {
16777
16792
  case 1 /* CommonJS */:
16778
- moduleResolution = 2 /* NodeJs */;
16793
+ moduleResolution = 2 /* Node10 */;
16779
16794
  break;
16780
16795
  case 100 /* Node16 */:
16781
16796
  moduleResolution = 3 /* Node16 */;
@@ -19284,15 +19299,23 @@ ${lanes.join("\n")}
19284
19299
  const node = baseFactory2.createBaseIdentifierNode(79 /* Identifier */);
19285
19300
  node.originalKeywordKind = originalKeywordKind;
19286
19301
  node.escapedText = escapedText;
19287
- node.autoGenerateFlags = 0 /* None */;
19302
+ node.autoGenerate = void 0;
19303
+ node.typeArguments = void 0;
19304
+ node.hasExtendedUnicodeEscape = void 0;
19305
+ node.jsDoc = void 0;
19306
+ node.jsDocCache = void 0;
19307
+ node.flowNode = void 0;
19308
+ node.symbol = void 0;
19288
19309
  return node;
19289
19310
  }
19290
19311
  function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {
19291
19312
  const node = createBaseIdentifier(escapeLeadingUnderscores(text), void 0);
19292
- node.autoGenerateFlags = autoGenerateFlags;
19293
- node.autoGenerateId = nextAutoGenerateId;
19294
- node.autoGeneratePrefix = prefix;
19295
- node.autoGenerateSuffix = suffix;
19313
+ node.autoGenerate = {
19314
+ flags: autoGenerateFlags,
19315
+ id: nextAutoGenerateId,
19316
+ prefix,
19317
+ suffix
19318
+ };
19296
19319
  nextAutoGenerateId++;
19297
19320
  return node;
19298
19321
  }
@@ -19306,10 +19329,6 @@ ${lanes.join("\n")}
19306
19329
  const node = createBaseIdentifier(escapeLeadingUnderscores(text), originalKeywordKind);
19307
19330
  node.typeArguments = asNodeArray(typeArguments);
19308
19331
  node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
19309
- node.jsDoc = void 0;
19310
- node.jsDocCache = void 0;
19311
- node.flowNode = void 0;
19312
- node.symbol = void 0;
19313
19332
  if (node.originalKeywordKind === 133 /* AwaitKeyword */) {
19314
19333
  node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;
19315
19334
  }
@@ -19354,7 +19373,7 @@ ${lanes.join("\n")}
19354
19373
  function createBasePrivateIdentifier(escapedText) {
19355
19374
  const node = baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */);
19356
19375
  node.escapedText = escapedText;
19357
- node.autoGenerateFlags = 0 /* None */;
19376
+ node.autoGenerate = void 0;
19358
19377
  node.transformFlags |= 16777216 /* ContainsClassFields */;
19359
19378
  return node;
19360
19379
  }
@@ -19365,10 +19384,12 @@ ${lanes.join("\n")}
19365
19384
  }
19366
19385
  function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {
19367
19386
  const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text));
19368
- node.autoGenerateFlags = autoGenerateFlags;
19369
- node.autoGenerateId = nextAutoGenerateId;
19370
- node.autoGeneratePrefix = prefix;
19371
- node.autoGenerateSuffix = suffix;
19387
+ node.autoGenerate = {
19388
+ flags: autoGenerateFlags,
19389
+ id: nextAutoGenerateId,
19390
+ prefix,
19391
+ suffix
19392
+ };
19372
19393
  nextAutoGenerateId++;
19373
19394
  return node;
19374
19395
  }
@@ -22161,10 +22182,7 @@ ${lanes.join("\n")}
22161
22182
  function cloneGeneratedIdentifier(node) {
22162
22183
  const clone2 = createBaseIdentifier(node.escapedText, void 0);
22163
22184
  clone2.flags |= node.flags & ~8 /* Synthesized */;
22164
- clone2.autoGenerateFlags = node.autoGenerateFlags;
22165
- clone2.autoGenerateId = node.autoGenerateId;
22166
- clone2.autoGeneratePrefix = node.autoGeneratePrefix;
22167
- clone2.autoGenerateSuffix = node.autoGenerateSuffix;
22185
+ clone2.autoGenerate = { ...node.autoGenerate };
22168
22186
  clone2.transformFlags = node.transformFlags;
22169
22187
  setOriginalNode(clone2, node);
22170
22188
  return clone2;
@@ -22185,10 +22203,7 @@ ${lanes.join("\n")}
22185
22203
  function cloneGeneratedPrivateIdentifier(node) {
22186
22204
  const clone2 = createBasePrivateIdentifier(node.escapedText);
22187
22205
  clone2.flags |= node.flags & ~8 /* Synthesized */;
22188
- clone2.autoGenerateFlags = node.autoGenerateFlags;
22189
- clone2.autoGenerateId = node.autoGenerateId;
22190
- clone2.autoGeneratePrefix = node.autoGeneratePrefix;
22191
- clone2.autoGenerateSuffix = node.autoGenerateSuffix;
22206
+ clone2.autoGenerate = { ...node.autoGenerate };
22192
22207
  clone2.transformFlags = node.transformFlags;
22193
22208
  setOriginalNode(clone2, node);
22194
22209
  return clone2;
@@ -25467,13 +25482,13 @@ ${lanes.join("\n")}
25467
25482
  return setTextRange(factory2.createNodeArray([], nodes.hasTrailingComma), nodes);
25468
25483
  }
25469
25484
  function getNodeForGeneratedName(name) {
25470
- if (name.autoGenerateFlags & 4 /* Node */) {
25471
- const autoGenerateId = name.autoGenerateId;
25485
+ if (name.autoGenerate.flags & 4 /* Node */) {
25486
+ const autoGenerateId = name.autoGenerate.id;
25472
25487
  let node = name;
25473
25488
  let original = node.original;
25474
25489
  while (original) {
25475
25490
  node = original;
25476
- if (isMemberName(node) && !!(node.autoGenerateFlags & 4 /* Node */) && node.autoGenerateId !== autoGenerateId) {
25491
+ if (isMemberName(node) && (node.autoGenerate === void 0 || !!(node.autoGenerate.flags & 4 /* Node */) && node.autoGenerate.id !== autoGenerateId)) {
25477
25492
  break;
25478
25493
  }
25479
25494
  original = node.original;
@@ -26508,6 +26523,7 @@ ${lanes.join("\n")}
26508
26523
  [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
26509
26524
  [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
26510
26525
  [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
26526
+ [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
26511
26527
  [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
26512
26528
  return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type);
26513
26529
  },
@@ -27464,7 +27480,7 @@ ${lanes.join("\n")}
27464
27480
  case ParsingContext.ArrayBindingElements:
27465
27481
  return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern();
27466
27482
  case ParsingContext.TypeParameters:
27467
- return token() === 101 /* InKeyword */ || isIdentifier2();
27483
+ return token() === 101 /* InKeyword */ || token() === 85 /* ConstKeyword */ || isIdentifier2();
27468
27484
  case ParsingContext.ArrayLiteralMembers:
27469
27485
  switch (token()) {
27470
27486
  case 27 /* CommaToken */:
@@ -28169,7 +28185,7 @@ ${lanes.join("\n")}
28169
28185
  }
28170
28186
  function parseTypeParameter() {
28171
28187
  const pos = getNodePos();
28172
- const modifiers = parseModifiers();
28188
+ const modifiers = parseModifiers(true);
28173
28189
  const name = parseIdentifier();
28174
28190
  let constraint;
28175
28191
  let expression;
@@ -29132,11 +29148,12 @@ ${lanes.join("\n")}
29132
29148
  return Tristate.False;
29133
29149
  } else {
29134
29150
  Debug.assert(first2 === 29 /* LessThanToken */);
29135
- if (!isIdentifier2()) {
29151
+ if (!isIdentifier2() && token() !== 85 /* ConstKeyword */) {
29136
29152
  return Tristate.False;
29137
29153
  }
29138
29154
  if (languageVariant === 1 /* JSX */) {
29139
29155
  const isArrowFunctionInJsx = lookAhead(() => {
29156
+ parseOptional(85 /* ConstKeyword */);
29140
29157
  const third = nextToken();
29141
29158
  if (third === 94 /* ExtendsKeyword */) {
29142
29159
  const fourth = nextToken();
@@ -30859,10 +30876,10 @@ ${lanes.join("\n")}
30859
30876
  }
30860
30877
  return list && createNodeArray2(list, pos);
30861
30878
  }
30862
- function tryParseModifier(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStaticModifier) {
30879
+ function tryParseModifier(permitConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStaticModifier) {
30863
30880
  const pos = getNodePos();
30864
30881
  const kind = token();
30865
- if (token() === 85 /* ConstKeyword */ && permitInvalidConstAsModifier) {
30882
+ if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) {
30866
30883
  if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) {
30867
30884
  return void 0;
30868
30885
  }
@@ -30886,10 +30903,10 @@ ${lanes.join("\n")}
30886
30903
  setTextRangePosEnd(decoratorsAndModifiers, decorators.pos, modifiers.end);
30887
30904
  return decoratorsAndModifiers;
30888
30905
  }
30889
- function parseModifiers(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock) {
30906
+ function parseModifiers(permitConstAsModifier, stopOnStartOfClassStaticBlock) {
30890
30907
  const pos = getNodePos();
30891
30908
  let list, modifier, hasSeenStatic = false;
30892
- while (modifier = tryParseModifier(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStatic)) {
30909
+ while (modifier = tryParseModifier(permitConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStatic)) {
30893
30910
  if (modifier.kind === 124 /* StaticKeyword */)
30894
30911
  hasSeenStatic = true;
30895
30912
  list = append(list, modifier);
@@ -32662,8 +32679,9 @@ ${lanes.join("\n")}
32662
32679
  return createDiagnosticForInvalidCustomType(opt, createCompilerDiagnostic);
32663
32680
  }
32664
32681
  function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
32665
- const namesOfType = arrayFrom(opt.type.keys()).map((key) => `'${key}'`).join(", ");
32666
- return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, namesOfType);
32682
+ const namesOfType = arrayFrom(opt.type.keys());
32683
+ const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((key) => `'${key}'`).join(", ");
32684
+ return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
32667
32685
  }
32668
32686
  function parseCustomTypeOption(opt, value, errors) {
32669
32687
  return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
@@ -33851,7 +33869,7 @@ ${lanes.join("\n")}
33851
33869
  }
33852
33870
  return extendedConfigPath;
33853
33871
  }
33854
- const resolved = nodeModuleNameResolver(extendedConfig, combinePaths(basePath, "tsconfig.json"), { moduleResolution: 2 /* NodeJs */ }, host, void 0, void 0, true);
33872
+ const resolved = nodeModuleNameResolver(extendedConfig, combinePaths(basePath, "tsconfig.json"), { moduleResolution: 2 /* Node10 */ }, host, void 0, void 0, true);
33855
33873
  if (resolved.resolvedModule) {
33856
33874
  return resolved.resolvedModule.resolvedFileName;
33857
33875
  }
@@ -35060,12 +35078,14 @@ ${lanes.join("\n")}
35060
35078
  {
35061
35079
  name: "moduleResolution",
35062
35080
  type: new Map(getEntries({
35063
- node: 2 /* NodeJs */,
35081
+ node10: 2 /* Node10 */,
35082
+ node: 2 /* Node10 */,
35064
35083
  classic: 1 /* Classic */,
35065
35084
  node16: 3 /* Node16 */,
35066
35085
  nodenext: 99 /* NodeNext */,
35067
35086
  bundler: 100 /* Bundler */
35068
35087
  })),
35088
+ deprecatedKeys: /* @__PURE__ */ new Set(["node"]),
35069
35089
  affectsModuleResolution: true,
35070
35090
  paramType: Diagnostics.STRATEGY,
35071
35091
  category: Diagnostics.Modules,
@@ -35585,6 +35605,11 @@ ${lanes.join("\n")}
35585
35605
  description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
35586
35606
  category: Diagnostics.Language_and_Environment,
35587
35607
  defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules
35608
+ },
35609
+ {
35610
+ name: "ignoreDeprecations",
35611
+ type: "string",
35612
+ defaultValueDescription: void 0
35588
35613
  }
35589
35614
  ];
35590
35615
  optionDeclarations = [
@@ -36498,7 +36523,7 @@ ${lanes.join("\n")}
36498
36523
  if (moduleResolution === void 0) {
36499
36524
  switch (getEmitModuleKind(compilerOptions)) {
36500
36525
  case 1 /* CommonJS */:
36501
- moduleResolution = 2 /* NodeJs */;
36526
+ moduleResolution = 2 /* Node10 */;
36502
36527
  break;
36503
36528
  case 100 /* Node16 */:
36504
36529
  moduleResolution = 3 /* Node16 */;
@@ -36526,7 +36551,7 @@ ${lanes.join("\n")}
36526
36551
  case 99 /* NodeNext */:
36527
36552
  result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
36528
36553
  break;
36529
- case 2 /* NodeJs */:
36554
+ case 2 /* Node10 */:
36530
36555
  result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
36531
36556
  break;
36532
36557
  case 1 /* Classic */:
@@ -36702,7 +36727,7 @@ ${lanes.join("\n")}
36702
36727
  0 /* None */,
36703
36728
  moduleName,
36704
36729
  initialDir,
36705
- { moduleResolution: 2 /* NodeJs */, allowJs: true },
36730
+ { moduleResolution: 2 /* Node10 */, allowJs: true },
36706
36731
  host,
36707
36732
  void 0,
36708
36733
  2 /* JavaScript */,
@@ -36755,7 +36780,7 @@ ${lanes.join("\n")}
36755
36780
  trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
36756
36781
  }
36757
36782
  let result;
36758
- if (getEmitModuleResolutionKind(compilerOptions) === 2 /* NodeJs */) {
36783
+ if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
36759
36784
  const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
36760
36785
  const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
36761
36786
  result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
@@ -41385,8 +41410,6 @@ ${lanes.join("\n")}
41385
41410
  });
41386
41411
 
41387
41412
  // src/compiler/checker.ts
41388
- function SymbolLinks() {
41389
- }
41390
41413
  function NodeLinks() {
41391
41414
  this.flags = 0 /* None */;
41392
41415
  }
@@ -42033,6 +42056,11 @@ ${lanes.join("\n")}
42033
42056
  let lastFlowNode;
42034
42057
  let lastFlowNodeReachable;
42035
42058
  let flowTypeCache;
42059
+ const contextualTypeNodes = [];
42060
+ const contextualTypes = [];
42061
+ let contextualTypeCount = 0;
42062
+ let currentInferenceNode;
42063
+ let currentInferenceContext;
42036
42064
  const emptyStringType = getStringLiteralType("");
42037
42065
  const zeroType = getNumberLiteralType(0);
42038
42066
  const zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: "0" });
@@ -42241,7 +42269,8 @@ ${lanes.join("\n")}
42241
42269
  function createSymbol(flags, name, checkFlags) {
42242
42270
  symbolCount++;
42243
42271
  const symbol = new Symbol46(flags | 33554432 /* Transient */, name);
42244
- symbol.checkFlags = checkFlags || 0 /* None */;
42272
+ symbol.links = new SymbolLinks();
42273
+ symbol.links.checkFlags = checkFlags || 0 /* None */;
42245
42274
  return symbol;
42246
42275
  }
42247
42276
  function getExcludedSymbolFlags(flags) {
@@ -42466,18 +42495,16 @@ ${lanes.join("\n")}
42466
42495
  }
42467
42496
  }
42468
42497
  function getSymbolLinks(symbol) {
42498
+ var _a2;
42469
42499
  if (symbol.flags & 33554432 /* Transient */)
42470
- return symbol;
42500
+ return symbol.links;
42471
42501
  const id = getSymbolId(symbol);
42472
- return symbolLinks[id] || (symbolLinks[id] = new SymbolLinks());
42502
+ return (_a2 = symbolLinks[id]) != null ? _a2 : symbolLinks[id] = new SymbolLinks();
42473
42503
  }
42474
42504
  function getNodeLinks(node) {
42475
42505
  const nodeId = getNodeId(node);
42476
42506
  return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
42477
42507
  }
42478
- function tryGetNodeLinks(node) {
42479
- return node.id ? nodeLinks[node.id] : void 0;
42480
- }
42481
42508
  function isGlobalSourceFile(node) {
42482
42509
  return node.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(node);
42483
42510
  }
@@ -44003,7 +44030,7 @@ ${lanes.join("\n")}
44003
44030
  }
44004
44031
  function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) {
44005
44032
  const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
44006
- const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations;
44033
+ const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations;
44007
44034
  return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage);
44008
44035
  }
44009
44036
  function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation = false) {
@@ -44269,8 +44296,8 @@ ${lanes.join("\n")}
44269
44296
  const result = createSymbol(symbol.flags, symbol.escapedName);
44270
44297
  result.declarations = symbol.declarations ? symbol.declarations.slice() : [];
44271
44298
  result.parent = symbol.parent;
44272
- result.target = symbol;
44273
- result.originatingImport = referenceParent;
44299
+ result.links.target = symbol;
44300
+ result.links.originatingImport = referenceParent;
44274
44301
  if (symbol.valueDeclaration)
44275
44302
  result.valueDeclaration = symbol.valueDeclaration;
44276
44303
  if (symbol.constEnumOnlyModule)
@@ -44280,7 +44307,7 @@ ${lanes.join("\n")}
44280
44307
  if (symbol.exports)
44281
44308
  result.exports = new Map(symbol.exports);
44282
44309
  const resolvedModuleType = resolveStructuredTypeMembers(moduleType);
44283
- result.type = createAnonymousType(result, resolvedModuleType.members, emptyArray, emptyArray, resolvedModuleType.indexInfos);
44310
+ result.links.type = createAnonymousType(result, resolvedModuleType.members, emptyArray, emptyArray, resolvedModuleType.indexInfos);
44284
44311
  return result;
44285
44312
  }
44286
44313
  function hasExportAssignmentSymbol(moduleSymbol) {
@@ -45735,7 +45762,7 @@ ${lanes.join("\n")}
45735
45762
  }
45736
45763
  function shouldUsePlaceholderForProperty(propertySymbol, context) {
45737
45764
  var _a2;
45738
- return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a2 = context.reverseMappedStack) == null ? void 0 : _a2[0]) && !(getObjectFlags(last(context.reverseMappedStack).propertyType) & 16 /* Anonymous */));
45765
+ return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a2 = context.reverseMappedStack) == null ? void 0 : _a2[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
45739
45766
  }
45740
45767
  function addPropertyToElementList(propertySymbol, context, typeElements) {
45741
45768
  var _a2;
@@ -45954,7 +45981,7 @@ ${lanes.join("\n")}
45954
45981
  function typeParameterToDeclarationWithConstraint(type, context, constraintNode) {
45955
45982
  const savedContextFlags = context.flags;
45956
45983
  context.flags &= ~512 /* WriteTypeParametersInQualifiedName */;
45957
- const modifiers = factory.createModifiersFromModifierFlags(getVarianceModifiers(type));
45984
+ const modifiers = factory.createModifiersFromModifierFlags(getTypeParameterModifiers(type));
45958
45985
  const name = typeParameterToName(type, context);
45959
45986
  const defaultParameter = getDefaultFromTypeParameter(type);
45960
45987
  const defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context);
@@ -46111,7 +46138,7 @@ ${lanes.join("\n")}
46111
46138
  const params = getTypeParametersOfClassOrInterface(
46112
46139
  parentSymbol.flags & 2097152 /* Alias */ ? resolveAlias(parentSymbol) : parentSymbol
46113
46140
  );
46114
- typeParameterNodes = mapToTypeNodes(map(params, (t) => getMappedType(t, nextSymbol.mapper)), context);
46141
+ typeParameterNodes = mapToTypeNodes(map(params, (t) => getMappedType(t, nextSymbol.links.mapper)), context);
46115
46142
  } else {
46116
46143
  typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol, context);
46117
46144
  }
@@ -48588,7 +48615,7 @@ ${lanes.join("\n")}
48588
48615
  );
48589
48616
  }
48590
48617
  const union = createSymbol(s.flags | exportedMember.flags, name);
48591
- union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]);
48618
+ union.links.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]);
48592
48619
  union.valueDeclaration = exportedMember.valueDeclaration;
48593
48620
  union.declarations = concatenate(exportedMember.declarations, s.declarations);
48594
48621
  members.set(name, union);
@@ -48675,8 +48702,8 @@ ${lanes.join("\n")}
48675
48702
  const text = getPropertyNameFromType(exprType);
48676
48703
  const flags = 4 /* Property */ | (e.initializer ? 16777216 /* Optional */ : 0);
48677
48704
  const symbol = createSymbol(flags, text);
48678
- symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2);
48679
- symbol.bindingElement = e;
48705
+ symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2);
48706
+ symbol.links.bindingElement = e;
48680
48707
  members.set(symbol.escapedName, symbol);
48681
48708
  });
48682
48709
  const result = createAnonymousType(void 0, members, emptyArray, emptyArray, stringIndexInfo ? [stringIndexInfo] : emptyArray);
@@ -48784,7 +48811,7 @@ ${lanes.join("\n")}
48784
48811
  const result = createSymbol(fileSymbol.flags, "exports");
48785
48812
  result.declarations = fileSymbol.declarations ? fileSymbol.declarations.slice() : [];
48786
48813
  result.parent = symbol;
48787
- result.target = fileSymbol;
48814
+ result.links.target = fileSymbol;
48788
48815
  if (fileSymbol.valueDeclaration)
48789
48816
  result.valueDeclaration = fileSymbol.valueDeclaration;
48790
48817
  if (fileSymbol.members)
@@ -48950,7 +48977,8 @@ ${lanes.join("\n")}
48950
48977
  if (expando) {
48951
48978
  const merged = mergeJSSymbols(symbol, expando);
48952
48979
  if (merged) {
48953
- symbol = links = merged;
48980
+ symbol = merged;
48981
+ links = merged.links;
48954
48982
  }
48955
48983
  }
48956
48984
  originalLinks.type = links.type = getTypeOfFuncClassEnumModuleWorker(symbol);
@@ -49047,7 +49075,7 @@ ${lanes.join("\n")}
49047
49075
  function getWriteTypeOfSymbol(symbol) {
49048
49076
  const checkFlags = getCheckFlags(symbol);
49049
49077
  if (symbol.flags & 4 /* Property */) {
49050
- return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : symbol.writeType || symbol.type : getTypeOfSymbol(symbol);
49078
+ return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : symbol.links.writeType || symbol.links.type : getTypeOfSymbol(symbol);
49051
49079
  }
49052
49080
  if (symbol.flags & 98304 /* Accessor */) {
49053
49081
  return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol);
@@ -49449,7 +49477,8 @@ ${lanes.join("\n")}
49449
49477
  const kind = symbol.flags & 32 /* Class */ ? 1 /* Class */ : 2 /* Interface */;
49450
49478
  const merged = mergeJSSymbols(symbol, symbol.valueDeclaration && getAssignedClassSymbol(symbol.valueDeclaration));
49451
49479
  if (merged) {
49452
- symbol = links = merged;
49480
+ symbol = merged;
49481
+ links = merged.links;
49453
49482
  }
49454
49483
  const type = originalLinks.declaredType = links.declaredType = createObjectType(kind, symbol);
49455
49484
  const outerTypeParameters = getOuterTypeParametersOfClassOrInterface(symbol);
@@ -49725,7 +49754,7 @@ ${lanes.join("\n")}
49725
49754
  error(declName || decl, Diagnostics.Duplicate_property_0, name);
49726
49755
  lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */);
49727
49756
  }
49728
- lateSymbol.nameType = type;
49757
+ lateSymbol.links.nameType = type;
49729
49758
  addDeclarationToLateBoundSymbol(lateSymbol, decl, symbolFlags);
49730
49759
  if (lateSymbol.parent) {
49731
49760
  Debug.assert(lateSymbol.parent === parent2, "Existing symbol parent should match new one");
@@ -49931,7 +49960,7 @@ ${lanes.join("\n")}
49931
49960
  const flags = restType.target.elementFlags[i];
49932
49961
  const checkFlags = flags & 12 /* Variable */ ? 32768 /* RestParameter */ : flags & 2 /* Optional */ ? 16384 /* OptionalParameter */ : 0;
49933
49962
  const symbol = createSymbol(1 /* FunctionScopedVariable */, name, checkFlags);
49934
- symbol.type = flags & 4 /* Rest */ ? createArrayType(t) : t;
49963
+ symbol.links.type = flags & 4 /* Rest */ ? createArrayType(t) : t;
49935
49964
  return symbol;
49936
49965
  });
49937
49966
  return concatenate(sig.parameters.slice(0, restIndex), restParams);
@@ -50091,14 +50120,14 @@ ${lanes.join("\n")}
50091
50120
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
50092
50121
  paramName || `arg${i}`
50093
50122
  );
50094
- paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
50123
+ paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
50095
50124
  params[i] = paramSymbol;
50096
50125
  }
50097
50126
  if (needsExtraRestElement) {
50098
50127
  const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
50099
- restParamSymbol.type = createArrayType(getTypeAtPosition(shorter, longestCount));
50128
+ restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
50100
50129
  if (shorter === right) {
50101
- restParamSymbol.type = instantiateType(restParamSymbol.type, mapper);
50130
+ restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
50102
50131
  }
50103
50132
  params[longestCount] = restParamSymbol;
50104
50133
  }
@@ -50318,16 +50347,16 @@ ${lanes.join("\n")}
50318
50347
  const checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0);
50319
50348
  const inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags);
50320
50349
  inferredProp.declarations = prop.declarations;
50321
- inferredProp.nameType = getSymbolLinks(prop).nameType;
50322
- inferredProp.propertyType = getTypeOfSymbol(prop);
50350
+ inferredProp.links.nameType = getSymbolLinks(prop).nameType;
50351
+ inferredProp.links.propertyType = getTypeOfSymbol(prop);
50323
50352
  if (type.constraintType.type.flags & 8388608 /* IndexedAccess */ && type.constraintType.type.objectType.flags & 262144 /* TypeParameter */ && type.constraintType.type.indexType.flags & 262144 /* TypeParameter */) {
50324
50353
  const newTypeParam = type.constraintType.type.objectType;
50325
50354
  const newMappedType = replaceIndexedAccess(type.mappedType, type.constraintType.type, newTypeParam);
50326
- inferredProp.mappedType = newMappedType;
50327
- inferredProp.constraintType = getIndexType(newTypeParam);
50355
+ inferredProp.links.mappedType = newMappedType;
50356
+ inferredProp.links.constraintType = getIndexType(newTypeParam);
50328
50357
  } else {
50329
- inferredProp.mappedType = type.mappedType;
50330
- inferredProp.constraintType = type.constraintType;
50358
+ inferredProp.links.mappedType = type.mappedType;
50359
+ inferredProp.links.constraintType = type.constraintType;
50331
50360
  }
50332
50361
  members.set(prop.escapedName, inferredProp);
50333
50362
  }
@@ -50403,8 +50432,8 @@ ${lanes.join("\n")}
50403
50432
  const propName = getPropertyNameFromType(propNameType);
50404
50433
  const existingProp = members.get(propName);
50405
50434
  if (existingProp) {
50406
- existingProp.nameType = getUnionType([existingProp.nameType, propNameType]);
50407
- existingProp.keyType = getUnionType([existingProp.keyType, keyType]);
50435
+ existingProp.links.nameType = getUnionType([existingProp.links.nameType, propNameType]);
50436
+ existingProp.links.keyType = getUnionType([existingProp.links.keyType, keyType]);
50408
50437
  } else {
50409
50438
  const modifiersProp = isTypeUsableAsPropertyName(keyType) ? getPropertyOfType(modifiersType, getPropertyNameFromType(keyType)) : void 0;
50410
50439
  const isOptional = !!(templateModifiers & 4 /* IncludeOptional */ || !(templateModifiers & 8 /* ExcludeOptional */) && modifiersProp && modifiersProp.flags & 16777216 /* Optional */);
@@ -50416,11 +50445,11 @@ ${lanes.join("\n")}
50416
50445
  propName,
50417
50446
  lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0)
50418
50447
  );
50419
- prop.mappedType = type;
50420
- prop.nameType = propNameType;
50421
- prop.keyType = keyType;
50448
+ prop.links.mappedType = type;
50449
+ prop.links.nameType = propNameType;
50450
+ prop.links.keyType = keyType;
50422
50451
  if (modifiersProp) {
50423
- prop.syntheticOrigin = modifiersProp;
50452
+ prop.links.syntheticOrigin = modifiersProp;
50424
50453
  prop.declarations = nameType ? void 0 : modifiersProp.declarations;
50425
50454
  }
50426
50455
  members.set(propName, prop);
@@ -50434,23 +50463,23 @@ ${lanes.join("\n")}
50434
50463
  }
50435
50464
  }
50436
50465
  function getTypeOfMappedSymbol(symbol) {
50437
- if (!symbol.type) {
50438
- const mappedType = symbol.mappedType;
50466
+ if (!symbol.links.type) {
50467
+ const mappedType = symbol.links.mappedType;
50439
50468
  if (!pushTypeResolution(symbol, 0 /* Type */)) {
50440
50469
  mappedType.containsError = true;
50441
50470
  return errorType;
50442
50471
  }
50443
50472
  const templateType = getTemplateTypeFromMappedType(mappedType.target || mappedType);
50444
- const mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.keyType);
50473
+ const mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.links.keyType);
50445
50474
  const propType = instantiateType(templateType, mapper);
50446
- let type = strictNullChecks && symbol.flags & 16777216 /* Optional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType, true) : symbol.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType;
50475
+ let type = strictNullChecks && symbol.flags & 16777216 /* Optional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(propType, true) : symbol.links.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType;
50447
50476
  if (!popTypeResolution()) {
50448
50477
  error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
50449
50478
  type = errorType;
50450
50479
  }
50451
- symbol.type = type;
50480
+ symbol.links.type = type;
50452
50481
  }
50453
- return symbol.type;
50482
+ return symbol.links.type;
50454
50483
  }
50455
50484
  function getTypeParameterFromMappedType(type) {
50456
50485
  return type.typeParameter || (type.typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(type.declaration.typeParameter)));
@@ -50620,6 +50649,10 @@ ${lanes.join("\n")}
50620
50649
  function getConstraintOfTypeParameter(typeParameter) {
50621
50650
  return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0;
50622
50651
  }
50652
+ function isConstTypeVariable(type) {
50653
+ var _a2;
50654
+ return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
50655
+ }
50623
50656
  function getConstraintOfIndexedAccess(type) {
50624
50657
  return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
50625
50658
  }
@@ -50865,7 +50898,7 @@ ${lanes.join("\n")}
50865
50898
  return getReducedType(getApparentType(getReducedType(type)));
50866
50899
  }
50867
50900
  function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) {
50868
- var _a2, _b;
50901
+ var _a2, _b, _c;
50869
50902
  let singleProp;
50870
50903
  let propSet;
50871
50904
  let indexTypes;
@@ -50933,10 +50966,11 @@ ${lanes.join("\n")}
50933
50966
  }
50934
50967
  if (!propSet && !(checkFlags & 16 /* ReadPartial */) && !indexTypes) {
50935
50968
  if (mergedInstantiations) {
50936
- const clone2 = createSymbolWithType(singleProp, singleProp.type);
50937
- clone2.parent = (_b = (_a2 = singleProp.valueDeclaration) == null ? void 0 : _a2.symbol) == null ? void 0 : _b.parent;
50938
- clone2.containingType = containingType;
50939
- clone2.mapper = singleProp.mapper;
50969
+ const links = (_a2 = tryCast(singleProp, isTransientSymbol)) == null ? void 0 : _a2.links;
50970
+ const clone2 = createSymbolWithType(singleProp, links == null ? void 0 : links.type);
50971
+ clone2.parent = (_c = (_b = singleProp.valueDeclaration) == null ? void 0 : _b.symbol) == null ? void 0 : _c.parent;
50972
+ clone2.links.containingType = containingType;
50973
+ clone2.links.mapper = links == null ? void 0 : links.mapper;
50940
50974
  return clone2;
50941
50975
  } else {
50942
50976
  return singleProp;
@@ -50978,7 +51012,7 @@ ${lanes.join("\n")}
50978
51012
  }
50979
51013
  addRange(propTypes, indexTypes);
50980
51014
  const result = createSymbol(4 /* Property */ | (optionalFlag != null ? optionalFlag : 0), name, syntheticFlag | checkFlags);
50981
- result.containingType = containingType;
51015
+ result.links.containingType = containingType;
50982
51016
  if (!hasNonUniformValueDeclaration && firstValueDeclaration) {
50983
51017
  result.valueDeclaration = firstValueDeclaration;
50984
51018
  if (firstValueDeclaration.symbol.parent) {
@@ -50986,16 +51020,16 @@ ${lanes.join("\n")}
50986
51020
  }
50987
51021
  }
50988
51022
  result.declarations = declarations;
50989
- result.nameType = nameType;
51023
+ result.links.nameType = nameType;
50990
51024
  if (propTypes.length > 2) {
50991
- result.checkFlags |= 65536 /* DeferredType */;
50992
- result.deferralParent = containingType;
50993
- result.deferralConstituents = propTypes;
50994
- result.deferralWriteConstituents = writeTypes;
51025
+ result.links.checkFlags |= 65536 /* DeferredType */;
51026
+ result.links.deferralParent = containingType;
51027
+ result.links.deferralConstituents = propTypes;
51028
+ result.links.deferralWriteConstituents = writeTypes;
50995
51029
  } else {
50996
- result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
51030
+ result.links.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
50997
51031
  if (writeTypes) {
50998
- result.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes);
51032
+ result.links.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes);
50999
51033
  }
51000
51034
  }
51001
51035
  return result;
@@ -51332,12 +51366,12 @@ ${lanes.join("\n")}
51332
51366
  const lastParamVariadicType = firstDefined(lastParamTags, (p) => p.typeExpression && isJSDocVariadicType(p.typeExpression.type) ? p.typeExpression.type : void 0);
51333
51367
  const syntheticArgsSymbol = createSymbol(3 /* Variable */, "args", 32768 /* RestParameter */);
51334
51368
  if (lastParamVariadicType) {
51335
- syntheticArgsSymbol.type = createArrayType(getTypeFromTypeNode(lastParamVariadicType.type));
51369
+ syntheticArgsSymbol.links.type = createArrayType(getTypeFromTypeNode(lastParamVariadicType.type));
51336
51370
  } else {
51337
- syntheticArgsSymbol.checkFlags |= 65536 /* DeferredType */;
51338
- syntheticArgsSymbol.deferralParent = neverType;
51339
- syntheticArgsSymbol.deferralConstituents = [anyArrayType];
51340
- syntheticArgsSymbol.deferralWriteConstituents = [anyArrayType];
51371
+ syntheticArgsSymbol.links.checkFlags |= 65536 /* DeferredType */;
51372
+ syntheticArgsSymbol.links.deferralParent = neverType;
51373
+ syntheticArgsSymbol.links.deferralConstituents = [anyArrayType];
51374
+ syntheticArgsSymbol.links.deferralWriteConstituents = [anyArrayType];
51341
51375
  }
51342
51376
  if (lastParamVariadicType) {
51343
51377
  parameters.pop();
@@ -51951,7 +51985,7 @@ ${lanes.join("\n")}
51951
51985
  if (!result) {
51952
51986
  unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
51953
51987
  result.parent = parentSymbol;
51954
- result.declaredType = unresolvedType;
51988
+ result.links.declaredType = unresolvedType;
51955
51989
  }
51956
51990
  return result;
51957
51991
  }
@@ -52228,7 +52262,7 @@ ${lanes.join("\n")}
52228
52262
  const importMetaType = getGlobalImportMetaType();
52229
52263
  const metaPropertySymbol = createSymbol(4 /* Property */, "meta", 8 /* Readonly */);
52230
52264
  metaPropertySymbol.parent = symbol;
52231
- metaPropertySymbol.type = importMetaType;
52265
+ metaPropertySymbol.links.type = importMetaType;
52232
52266
  const members = createSymbolTable([metaPropertySymbol]);
52233
52267
  symbol.members = members;
52234
52268
  deferredGlobalImportMetaExpressionType = createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);
@@ -52453,8 +52487,8 @@ ${lanes.join("\n")}
52453
52487
  "" + i,
52454
52488
  readonly ? 8 /* Readonly */ : 0
52455
52489
  );
52456
- property.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i];
52457
- property.type = typeParameter;
52490
+ property.links.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i];
52491
+ property.links.type = typeParameter;
52458
52492
  properties.push(property);
52459
52493
  }
52460
52494
  }
@@ -52462,12 +52496,12 @@ ${lanes.join("\n")}
52462
52496
  const fixedLength = properties.length;
52463
52497
  const lengthSymbol = createSymbol(4 /* Property */, "length", readonly ? 8 /* Readonly */ : 0);
52464
52498
  if (combinedFlags & 12 /* Variable */) {
52465
- lengthSymbol.type = numberType;
52499
+ lengthSymbol.links.type = numberType;
52466
52500
  } else {
52467
52501
  const literalTypes = [];
52468
52502
  for (let i = minLength; i <= arity; i++)
52469
52503
  literalTypes.push(getNumberLiteralType(i));
52470
- lengthSymbol.type = getUnionType(literalTypes);
52504
+ lengthSymbol.links.type = getUnionType(literalTypes);
52471
52505
  }
52472
52506
  properties.push(lengthSymbol);
52473
52507
  const type = createObjectType(8 /* Tuple */ | 4 /* Reference */);
@@ -54061,10 +54095,10 @@ ${lanes.join("\n")}
54061
54095
  const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
54062
54096
  const flags = 4 /* Property */ | 16777216 /* Optional */;
54063
54097
  const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0));
54064
- result.type = isSetonlyAccessor ? undefinedType : addOptionality(getTypeOfSymbol(prop), true);
54098
+ result.links.type = isSetonlyAccessor ? undefinedType : addOptionality(getTypeOfSymbol(prop), true);
54065
54099
  result.declarations = prop.declarations;
54066
- result.nameType = getSymbolLinks(prop).nameType;
54067
- result.syntheticOrigin = prop;
54100
+ result.links.nameType = getSymbolLinks(prop).nameType;
54101
+ result.links.syntheticOrigin = prop;
54068
54102
  members.set(prop.escapedName, result);
54069
54103
  }
54070
54104
  }
@@ -54131,11 +54165,11 @@ ${lanes.join("\n")}
54131
54165
  const declarations = concatenate(leftProp.declarations, rightProp.declarations);
54132
54166
  const flags = 4 /* Property */ | leftProp.flags & 16777216 /* Optional */;
54133
54167
  const result = createSymbol(flags, leftProp.escapedName);
54134
- result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
54135
- result.leftSpread = leftProp;
54136
- result.rightSpread = rightProp;
54168
+ result.links.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
54169
+ result.links.leftSpread = leftProp;
54170
+ result.links.rightSpread = rightProp;
54137
54171
  result.declarations = declarations;
54138
- result.nameType = getSymbolLinks(leftProp).nameType;
54172
+ result.links.nameType = getSymbolLinks(leftProp).nameType;
54139
54173
  members.set(leftProp.escapedName, result);
54140
54174
  }
54141
54175
  } else {
@@ -54157,10 +54191,10 @@ ${lanes.join("\n")}
54157
54191
  }
54158
54192
  const flags = 4 /* Property */ | prop.flags & 16777216 /* Optional */;
54159
54193
  const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0));
54160
- result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop);
54194
+ result.links.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop);
54161
54195
  result.declarations = prop.declarations;
54162
- result.nameType = getSymbolLinks(prop).nameType;
54163
- result.syntheticOrigin = prop;
54196
+ result.links.nameType = getSymbolLinks(prop).nameType;
54197
+ result.links.syntheticOrigin = prop;
54164
54198
  return result;
54165
54199
  }
54166
54200
  function getIndexInfoWithReadonly(info, readonly) {
@@ -54525,13 +54559,13 @@ ${lanes.join("\n")}
54525
54559
  const result = createSymbol(symbol.flags, symbol.escapedName, 1 /* Instantiated */ | getCheckFlags(symbol) & (8 /* Readonly */ | 4096 /* Late */ | 16384 /* OptionalParameter */ | 32768 /* RestParameter */));
54526
54560
  result.declarations = symbol.declarations;
54527
54561
  result.parent = symbol.parent;
54528
- result.target = symbol;
54529
- result.mapper = mapper;
54562
+ result.links.target = symbol;
54563
+ result.links.mapper = mapper;
54530
54564
  if (symbol.valueDeclaration) {
54531
54565
  result.valueDeclaration = symbol.valueDeclaration;
54532
54566
  }
54533
54567
  if (links.nameType) {
54534
- result.nameType = links.nameType;
54568
+ result.links.nameType = links.nameType;
54535
54569
  }
54536
54570
  return result;
54537
54571
  }
@@ -55046,13 +55080,10 @@ ${lanes.join("\n")}
55046
55080
  }
55047
55081
  }
55048
55082
  function checkExpressionForMutableLocationWithContextualType(next, sourcePropType) {
55049
- const links = getNodeLinks(next);
55050
- links.contextualType = sourcePropType;
55051
- try {
55052
- return checkExpressionForMutableLocation(next, 1 /* Contextual */, sourcePropType);
55053
- } finally {
55054
- links.contextualType = void 0;
55055
- }
55083
+ pushContextualType(next, sourcePropType);
55084
+ const result = checkExpressionForMutableLocation(next, 1 /* Contextual */);
55085
+ popContextualType();
55086
+ return result;
55056
55087
  }
55057
55088
  function elaborateElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) {
55058
55089
  let reportedError = false;
@@ -55251,19 +55282,13 @@ ${lanes.join("\n")}
55251
55282
  if (isTupleLikeType(source)) {
55252
55283
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
55253
55284
  }
55254
- const links = getNodeLinks(node);
55255
- const oldContext = links.contextualType;
55256
- links.contextualType = target;
55257
- try {
55258
- const tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, true);
55259
- links.contextualType = oldContext;
55260
- if (isTupleLikeType(tupleizedType)) {
55261
- return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer);
55262
- }
55263
- return false;
55264
- } finally {
55265
- links.contextualType = oldContext;
55285
+ pushContextualType(node, target);
55286
+ const tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, true);
55287
+ popContextualType();
55288
+ if (isTupleLikeType(tupleizedType)) {
55289
+ return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer);
55266
55290
  }
55291
+ return false;
55267
55292
  }
55268
55293
  function* generateObjectLiteralElements(node) {
55269
55294
  if (!length(node.properties))
@@ -56365,6 +56390,9 @@ ${lanes.join("\n")}
56365
56390
  if (result2 && !inPropertyCheck && (target2.flags & 2097152 /* Intersection */ && !isGenericObjectType(target2) && source2.flags & (524288 /* Object */ | 2097152 /* Intersection */) || isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => !!(getObjectFlags(t) & 262144 /* NonInferrableType */)))) {
56366
56391
  inPropertyCheck = true;
56367
56392
  result2 &= propertiesRelatedTo(source2, target2, reportErrors2, void 0, 0 /* None */);
56393
+ if (result2 && isObjectLiteralType2(source2) && getObjectFlags(source2) & 8192 /* FreshLiteral */) {
56394
+ result2 &= indexSignaturesRelatedTo(source2, target2, false, reportErrors2, 0 /* None */);
56395
+ }
56368
56396
  inPropertyCheck = false;
56369
56397
  }
56370
56398
  }
@@ -57266,7 +57294,7 @@ ${lanes.join("\n")}
57266
57294
  }
57267
57295
  return result2;
57268
57296
  }
57269
- function membersRelatedToIndexInfo(source2, targetInfo, reportErrors2) {
57297
+ function membersRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState) {
57270
57298
  let result2 = -1 /* True */;
57271
57299
  const keyType = targetInfo.keyType;
57272
57300
  const props = source2.flags & 2097152 /* Intersection */ ? getPropertiesOfUnionOrIntersectionType(source2) : getPropertiesOfObjectType(source2);
@@ -57277,7 +57305,7 @@ ${lanes.join("\n")}
57277
57305
  if (isApplicableIndexType(getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */), keyType)) {
57278
57306
  const propType = getNonMissingTypeOfSymbol(prop);
57279
57307
  const type = exactOptionalPropertyTypes || propType.flags & 32768 /* Undefined */ || keyType === numberType || !(prop.flags & 16777216 /* Optional */) ? propType : getTypeWithFacts(propType, 524288 /* NEUndefined */);
57280
- const related = isRelatedTo(type, targetInfo.type, 3 /* Both */, reportErrors2);
57308
+ const related = isRelatedTo(type, targetInfo.type, 3 /* Both */, reportErrors2, void 0, intersectionState);
57281
57309
  if (!related) {
57282
57310
  if (reportErrors2) {
57283
57311
  reportError(Diagnostics.Property_0_is_incompatible_with_index_signature, symbolToString(prop));
@@ -57331,7 +57359,7 @@ ${lanes.join("\n")}
57331
57359
  return indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors2);
57332
57360
  }
57333
57361
  if (!(intersectionState & 1 /* Source */) && isObjectTypeWithInferableIndex(source2)) {
57334
- return membersRelatedToIndexInfo(source2, targetInfo, reportErrors2);
57362
+ return membersRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);
57335
57363
  }
57336
57364
  if (reportErrors2) {
57337
57365
  reportError(Diagnostics.Index_signature_for_type_0_is_missing_in_type_1, typeToString(targetInfo.keyType), typeToString(source2));
@@ -57465,7 +57493,7 @@ ${lanes.join("\n")}
57465
57493
  links.variances = emptyArray;
57466
57494
  const variances = [];
57467
57495
  for (const tp of typeParameters) {
57468
- const modifiers = getVarianceModifiers(tp);
57496
+ const modifiers = getTypeParameterModifiers(tp);
57469
57497
  let variance = modifiers & 65536 /* Out */ ? modifiers & 32768 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 32768 /* In */ ? 2 /* Contravariant */ : void 0;
57470
57498
  if (variance === void 0) {
57471
57499
  let unmeasurable = false;
@@ -57508,9 +57536,9 @@ ${lanes.join("\n")}
57508
57536
  function isMarkerType(type) {
57509
57537
  return markerTypes.has(getTypeId(type));
57510
57538
  }
57511
- function getVarianceModifiers(tp) {
57512
- var _a2, _b;
57513
- return (some((_a2 = tp.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 32768 /* In */)) ? 32768 /* In */ : 0) | (some((_b = tp.symbol) == null ? void 0 : _b.declarations, (d) => hasSyntacticModifier(d, 65536 /* Out */)) ? 65536 /* Out */ : 0);
57539
+ function getTypeParameterModifiers(tp) {
57540
+ var _a2;
57541
+ return reduceLeft((_a2 = tp.symbol) == null ? void 0 : _a2.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (32768 /* In */ | 65536 /* Out */ | 2048 /* Const */);
57514
57542
  }
57515
57543
  function hasCovariantVoidArgument(typeArguments, variances) {
57516
57544
  for (let i = 0; i < variances.length; i++) {
@@ -57569,7 +57597,7 @@ ${lanes.join("\n")}
57569
57597
  }
57570
57598
  function forEachProperty2(prop, callback) {
57571
57599
  if (getCheckFlags(prop) & 6 /* Synthetic */) {
57572
- for (const t of prop.containingType.types) {
57600
+ for (const t of prop.links.containingType.types) {
57573
57601
  const p = getPropertyOfType(t, prop.escapedName);
57574
57602
  const result = p && forEachProperty2(p, callback);
57575
57603
  if (result) {
@@ -57983,14 +58011,14 @@ ${lanes.join("\n")}
57983
58011
  const symbol = createSymbol(source.flags, source.escapedName, getCheckFlags(source) & 8 /* Readonly */);
57984
58012
  symbol.declarations = source.declarations;
57985
58013
  symbol.parent = source.parent;
57986
- symbol.type = type;
57987
- symbol.target = source;
58014
+ symbol.links.type = type;
58015
+ symbol.links.target = source;
57988
58016
  if (source.valueDeclaration) {
57989
58017
  symbol.valueDeclaration = source.valueDeclaration;
57990
58018
  }
57991
58019
  const nameType = getSymbolLinks(source).nameType;
57992
58020
  if (nameType) {
57993
- symbol.nameType = nameType;
58021
+ symbol.links.nameType = nameType;
57994
58022
  }
57995
58023
  return symbol;
57996
58024
  }
@@ -58371,7 +58399,7 @@ ${lanes.join("\n")}
58371
58399
  }
58372
58400
  const name = escapeLeadingUnderscores(t.value);
58373
58401
  const literalProp = createSymbol(4 /* Property */, name);
58374
- literalProp.type = anyType;
58402
+ literalProp.links.type = anyType;
58375
58403
  if (t.symbol) {
58376
58404
  literalProp.declarations = t.symbol.declarations;
58377
58405
  literalProp.valueDeclaration = t.symbol.valueDeclaration;
@@ -58419,7 +58447,7 @@ ${lanes.join("\n")}
58419
58447
  function getTypeOfReverseMappedSymbol(symbol) {
58420
58448
  const links = getSymbolLinks(symbol);
58421
58449
  if (!links.type) {
58422
- links.type = inferReverseMappedType(symbol.propertyType, symbol.mappedType, symbol.constraintType);
58450
+ links.type = inferReverseMappedType(symbol.links.propertyType, symbol.links.mappedType, symbol.links.constraintType);
58423
58451
  }
58424
58452
  return links.type;
58425
58453
  }
@@ -59147,7 +59175,7 @@ ${lanes.join("\n")}
59147
59175
  }
59148
59176
  function getCovariantInference(inference, signature) {
59149
59177
  const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
59150
- const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter);
59178
+ const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
59151
59179
  const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
59152
59180
  const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
59153
59181
  const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
@@ -59402,10 +59430,10 @@ ${lanes.join("\n")}
59402
59430
  if (type && type.flags & 1048576 /* Union */) {
59403
59431
  const prop = getUnionOrIntersectionProperty(type, name);
59404
59432
  if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
59405
- if (prop.isDiscriminantProperty === void 0) {
59406
- prop.isDiscriminantProperty = (prop.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ && !isGenericType(getTypeOfSymbol(prop));
59433
+ if (prop.links.isDiscriminantProperty === void 0) {
59434
+ prop.links.isDiscriminantProperty = (prop.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ && !isGenericType(getTypeOfSymbol(prop));
59407
59435
  }
59408
- return !!prop.isDiscriminantProperty;
59436
+ return !!prop.links.isDiscriminantProperty;
59409
59437
  }
59410
59438
  }
59411
59439
  return false;
@@ -59927,7 +59955,7 @@ ${lanes.join("\n")}
59927
59955
  }
59928
59956
  if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
59929
59957
  if (getCheckFlags(symbol) & 262144 /* Mapped */) {
59930
- const origin = symbol.syntheticOrigin;
59958
+ const origin = symbol.links.syntheticOrigin;
59931
59959
  if (origin && getExplicitTypeOfSymbol(origin)) {
59932
59960
  return getTypeOfSymbol(symbol);
59933
59961
  }
@@ -62008,7 +62036,7 @@ ${lanes.join("\n")}
62008
62036
  return nameStr !== void 0 && getTypeOfPropertyOfContextualType(thisType, nameStr) || void 0;
62009
62037
  }
62010
62038
  function isCircularMappedProperty(symbol) {
62011
- return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.type && findResolutionCycleStartIndex(symbol, 0 /* Type */) >= 0);
62039
+ return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type && findResolutionCycleStartIndex(symbol, 0 /* Type */) >= 0);
62012
62040
  }
62013
62041
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
62014
62042
  return mapType(type, (t) => {
@@ -62202,13 +62230,12 @@ ${lanes.join("\n")}
62202
62230
  return type;
62203
62231
  }
62204
62232
  function getContextualType2(node, contextFlags) {
62205
- var _a2;
62206
62233
  if (node.flags & 33554432 /* InWithStatement */) {
62207
62234
  return void 0;
62208
62235
  }
62209
- const contextualType = (_a2 = tryGetNodeLinks(node)) == null ? void 0 : _a2.contextualType;
62210
- if (contextualType) {
62211
- return contextualType;
62236
+ const index = findContextualNode(node);
62237
+ if (index >= 0) {
62238
+ return contextualTypes[index];
62212
62239
  }
62213
62240
  const { parent: parent2 } = node;
62214
62241
  switch (parent2.kind) {
@@ -62230,7 +62257,7 @@ ${lanes.join("\n")}
62230
62257
  return getContextualTypeForArgument(parent2, node);
62231
62258
  case 213 /* TypeAssertionExpression */:
62232
62259
  case 231 /* AsExpression */:
62233
- return isConstTypeReference(parent2.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(parent2.type);
62260
+ return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type);
62234
62261
  case 223 /* BinaryExpression */:
62235
62262
  return getContextualTypeForBinaryOperand(node, contextFlags);
62236
62263
  case 299 /* PropertyAssignment */:
@@ -62250,7 +62277,7 @@ ${lanes.join("\n")}
62250
62277
  return getContextualTypeForSubstitutionExpression(parent2.parent, node);
62251
62278
  case 214 /* ParenthesizedExpression */: {
62252
62279
  const tag = isInJSFile(parent2) ? getJSDocTypeTag(parent2) : void 0;
62253
- return !tag ? getContextualType2(parent2, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(tag.typeExpression.type);
62280
+ return !tag ? getContextualType2(parent2, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(tag.typeExpression.type);
62254
62281
  }
62255
62282
  case 232 /* NonNullExpression */:
62256
62283
  return getContextualType2(parent2, contextFlags);
@@ -62268,22 +62295,31 @@ ${lanes.join("\n")}
62268
62295
  return getContextualJsxElementAttributesType(parent2, contextFlags);
62269
62296
  }
62270
62297
  return void 0;
62271
- function tryFindWhenConstTypeReference(node2) {
62272
- return getContextualType2(node2, contextFlags);
62298
+ }
62299
+ function pushContextualType(node, type) {
62300
+ contextualTypeNodes[contextualTypeCount] = node;
62301
+ contextualTypes[contextualTypeCount] = type;
62302
+ contextualTypeCount++;
62303
+ }
62304
+ function popContextualType() {
62305
+ contextualTypeCount--;
62306
+ }
62307
+ function findContextualNode(node) {
62308
+ for (let i = contextualTypeCount - 1; i >= 0; i--) {
62309
+ if (node === contextualTypeNodes[i]) {
62310
+ return i;
62311
+ }
62273
62312
  }
62313
+ return -1;
62274
62314
  }
62275
62315
  function getInferenceContext(node) {
62276
- return forEachAncestor(node, (n) => {
62277
- var _a2;
62278
- return (_a2 = tryGetNodeLinks(n)) == null ? void 0 : _a2.inferenceContext;
62279
- });
62316
+ return isNodeDescendantOf(node, currentInferenceNode) ? currentInferenceContext : void 0;
62280
62317
  }
62281
62318
  function getContextualJsxElementAttributesType(node, contextFlags) {
62282
- var _a2;
62283
62319
  if (isJsxOpeningElement(node) && contextFlags !== 4 /* Completions */) {
62284
- const contextualType = (_a2 = tryGetNodeLinks(node.parent)) == null ? void 0 : _a2.contextualType;
62285
- if (contextualType) {
62286
- return contextualType;
62320
+ const index = findContextualNode(node.parent);
62321
+ if (index >= 0) {
62322
+ return contextualTypes[index];
62287
62323
  }
62288
62324
  }
62289
62325
  return getContextualTypeForArgumentAtIndex(node, 0);
@@ -62430,14 +62466,14 @@ ${lanes.join("\n")}
62430
62466
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
62431
62467
  paramName || `arg${i}`
62432
62468
  );
62433
- paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
62469
+ paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
62434
62470
  params[i] = paramSymbol;
62435
62471
  }
62436
62472
  if (needsExtraRestElement) {
62437
62473
  const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
62438
- restParamSymbol.type = createArrayType(getTypeAtPosition(shorter, longestCount));
62474
+ restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
62439
62475
  if (shorter === right) {
62440
- restParamSymbol.type = instantiateType(restParamSymbol.type, mapper);
62476
+ restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
62441
62477
  }
62442
62478
  params[longestCount] = restParamSymbol;
62443
62479
  }
@@ -62540,9 +62576,11 @@ ${lanes.join("\n")}
62540
62576
  const elementCount = elements.length;
62541
62577
  const elementTypes = [];
62542
62578
  const elementFlags = [];
62543
- const contextualType = getApparentTypeOfContextualType(node, void 0);
62579
+ pushContextualType(node, getContextualType2(node, void 0));
62544
62580
  const inDestructuringPattern = isAssignmentTarget(node);
62545
62581
  const inConstContext = isConstContext(node);
62582
+ const contextualType = getApparentTypeOfContextualType(node, void 0);
62583
+ const inTupleContext = !!contextualType && someType(contextualType, isTupleLikeType);
62546
62584
  let hasOmittedExpression = false;
62547
62585
  for (let i = 0; i < elementCount; i++) {
62548
62586
  const e = elements[i];
@@ -62567,21 +62605,21 @@ ${lanes.join("\n")}
62567
62605
  elementTypes.push(undefinedOrMissingType);
62568
62606
  elementFlags.push(2 /* Optional */);
62569
62607
  } else {
62570
- const elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length);
62571
- const type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple);
62608
+ const type = checkExpressionForMutableLocation(e, checkMode, forceTuple);
62572
62609
  elementTypes.push(addOptionality(type, true, hasOmittedExpression));
62573
62610
  elementFlags.push(hasOmittedExpression ? 2 /* Optional */ : 1 /* Required */);
62574
- if (contextualType && someType(contextualType, isTupleLikeType) && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(e)) {
62611
+ if (inTupleContext && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(e)) {
62575
62612
  const inferenceContext = getInferenceContext(node);
62576
62613
  Debug.assert(inferenceContext);
62577
62614
  addIntraExpressionInferenceSite(inferenceContext, e, type);
62578
62615
  }
62579
62616
  }
62580
62617
  }
62618
+ popContextualType();
62581
62619
  if (inDestructuringPattern) {
62582
62620
  return createTupleType(elementTypes, elementFlags);
62583
62621
  }
62584
- if (forceTuple || inConstContext || contextualType && someType(contextualType, isTupleLikeType)) {
62622
+ if (forceTuple || inConstContext || inTupleContext) {
62585
62623
  return createArrayLiteralType(createTupleType(elementTypes, elementFlags, inConstContext));
62586
62624
  }
62587
62625
  return createArrayLiteralType(createArrayType(elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext));
@@ -62668,12 +62706,14 @@ ${lanes.join("\n")}
62668
62706
  return links.immediateTarget;
62669
62707
  }
62670
62708
  function checkObjectLiteral(node, checkMode) {
62709
+ var _a2;
62671
62710
  const inDestructuringPattern = isAssignmentTarget(node);
62672
62711
  checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
62673
62712
  const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0;
62674
62713
  let propertiesTable = createSymbolTable();
62675
62714
  let propertiesArray = [];
62676
62715
  let spread = emptyObjectType;
62716
+ pushContextualType(node, getContextualType2(node, void 0));
62677
62717
  const contextualType = getApparentTypeOfContextualType(node, void 0);
62678
62718
  const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 203 /* ObjectBindingPattern */ || contextualType.pattern.kind === 207 /* ObjectLiteralExpression */);
62679
62719
  const inConstContext = isConstContext(node);
@@ -62710,7 +62750,7 @@ ${lanes.join("\n")}
62710
62750
  const nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : void 0;
62711
62751
  const prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : createSymbol(4 /* Property */ | member.flags, member.escapedName, checkFlags);
62712
62752
  if (nameType) {
62713
- prop.nameType = nameType;
62753
+ prop.links.nameType = nameType;
62714
62754
  }
62715
62755
  if (inDestructuringPattern) {
62716
62756
  const isOptional = memberDecl.kind === 299 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer;
@@ -62735,8 +62775,8 @@ ${lanes.join("\n")}
62735
62775
  if (member.valueDeclaration) {
62736
62776
  prop.valueDeclaration = member.valueDeclaration;
62737
62777
  }
62738
- prop.type = type;
62739
- prop.target = member;
62778
+ prop.links.type = type;
62779
+ prop.links.target = member;
62740
62780
  member = prop;
62741
62781
  allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
62742
62782
  if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 171 /* MethodDeclaration */) && isContextSensitive(memberDecl)) {
@@ -62795,6 +62835,7 @@ ${lanes.join("\n")}
62795
62835
  }
62796
62836
  propertiesArray.push(member);
62797
62837
  }
62838
+ popContextualType();
62798
62839
  if (contextualTypeHasPattern) {
62799
62840
  const rootPatternParent = findAncestor(
62800
62841
  contextualType.pattern.parent,
@@ -62809,7 +62850,7 @@ ${lanes.join("\n")}
62809
62850
  if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
62810
62851
  if (!(prop.flags & 16777216 /* Optional */)) {
62811
62852
  error(
62812
- prop.valueDeclaration || prop.bindingElement,
62853
+ prop.valueDeclaration || ((_a2 = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a2.links.bindingElement),
62813
62854
  Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value
62814
62855
  );
62815
62856
  }
@@ -62919,8 +62960,8 @@ ${lanes.join("\n")}
62919
62960
  if (member.valueDeclaration) {
62920
62961
  attributeSymbol.valueDeclaration = member.valueDeclaration;
62921
62962
  }
62922
- attributeSymbol.type = exprType;
62923
- attributeSymbol.target = member;
62963
+ attributeSymbol.links.type = exprType;
62964
+ attributeSymbol.links.target = member;
62924
62965
  attributesTable.set(attributeSymbol.escapedName, attributeSymbol);
62925
62966
  allAttributesTable == null ? void 0 : allAttributesTable.set(attributeSymbol.escapedName, attributeSymbol);
62926
62967
  if (attributeDecl.name.escapedText === jsxChildrenPropertyName) {
@@ -62968,7 +63009,7 @@ ${lanes.join("\n")}
62968
63009
  const contextualType = getApparentTypeOfContextualType(openingLikeElement.attributes, void 0);
62969
63010
  const childrenContextualType = contextualType && getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName);
62970
63011
  const childrenPropSymbol = createSymbol(4 /* Property */, jsxChildrenPropertyName);
62971
- childrenPropSymbol.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes));
63012
+ childrenPropSymbol.links.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes));
62972
63013
  childrenPropSymbol.valueDeclaration = factory.createPropertySignature(void 0, unescapeLeadingUnderscores(jsxChildrenPropertyName), void 0, void 0);
62973
63014
  setParent(childrenPropSymbol.valueDeclaration, attributes);
62974
63015
  childrenPropSymbol.valueDeclaration.symbol = childrenPropSymbol;
@@ -63074,7 +63115,7 @@ ${lanes.join("\n")}
63074
63115
  return void 0;
63075
63116
  }
63076
63117
  const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
63077
- const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations;
63118
+ const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations;
63078
63119
  const mod = resolveExternalModule(location, runtimeImportSpecifier, errorMessage, location);
63079
63120
  const result = mod && mod !== unknownSymbol ? getMergedSymbol(resolveSymbol(mod)) : void 0;
63080
63121
  if (links) {
@@ -64382,6 +64423,7 @@ ${lanes.join("\n")}
64382
64423
  const types = [];
64383
64424
  const flags = [];
64384
64425
  const names = [];
64426
+ const inConstContext = isConstTypeVariable(restType);
64385
64427
  for (let i = index; i < argCount; i++) {
64386
64428
  const arg = args[i];
64387
64429
  if (isSpreadArgument(arg)) {
@@ -64396,7 +64438,7 @@ ${lanes.join("\n")}
64396
64438
  } else {
64397
64439
  const contextualType = getIndexedAccessType(restType, getNumberLiteralType(i - index), 256 /* Contextual */);
64398
64440
  const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode);
64399
- const hasPrimitiveContextualType = maybeTypeOfKind(contextualType, 131068 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */);
64441
+ const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 131068 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */);
64400
64442
  types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType));
64401
64443
  flags.push(1 /* Required */);
64402
64444
  }
@@ -64404,7 +64446,7 @@ ${lanes.join("\n")}
64404
64446
  names.push(arg.tupleNameSource);
64405
64447
  }
64406
64448
  }
64407
- return createTupleType(types, flags, false, length(names) === length(types) ? names : void 0);
64449
+ return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0);
64408
64450
  }
64409
64451
  function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
64410
64452
  const isJavascript = isInJSFile(signature.declaration);
@@ -65479,7 +65521,7 @@ ${lanes.join("\n")}
65479
65521
  returnNode ? factory.createTypeReferenceNode(returnNode, void 0) : factory.createKeywordTypeNode(131 /* AnyKeyword */)
65480
65522
  );
65481
65523
  const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props");
65482
- parameterSymbol.type = result;
65524
+ parameterSymbol.links.type = result;
65483
65525
  return createSignature(
65484
65526
  declaration,
65485
65527
  void 0,
@@ -65772,8 +65814,8 @@ ${lanes.join("\n")}
65772
65814
  const memberTable = createSymbolTable();
65773
65815
  const newSymbol = createSymbol(2097152 /* Alias */, "default" /* Default */);
65774
65816
  newSymbol.parent = originalSymbol;
65775
- newSymbol.nameType = getStringLiteralType("default");
65776
- newSymbol.aliasTarget = resolveSymbol(symbol);
65817
+ newSymbol.links.nameType = getStringLiteralType("default");
65818
+ newSymbol.links.aliasTarget = resolveSymbol(symbol);
65777
65819
  memberTable.set("default" /* Default */, newSymbol);
65778
65820
  return createAnonymousType(anonymousSymbol, memberTable, emptyArray, emptyArray, emptyArray);
65779
65821
  }
@@ -65799,7 +65841,7 @@ ${lanes.join("\n")}
65799
65841
  if (hasSyntheticDefault) {
65800
65842
  const anonymousSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */);
65801
65843
  const defaultContainingObject = createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol);
65802
- anonymousSymbol.type = defaultContainingObject;
65844
+ anonymousSymbol.links.type = defaultContainingObject;
65803
65845
  synthType.syntheticType = isValidSpreadType(type) ? getSpreadType(type, defaultContainingObject, anonymousSymbol, 0, false) : defaultContainingObject;
65804
65846
  } else {
65805
65847
  synthType.syntheticType = type;
@@ -65868,12 +65910,9 @@ ${lanes.join("\n")}
65868
65910
  return op === 40 /* MinusToken */ && (arg.kind === 8 /* NumericLiteral */ || arg.kind === 9 /* BigIntLiteral */) || op === 39 /* PlusToken */ && arg.kind === 8 /* NumericLiteral */;
65869
65911
  case 208 /* PropertyAccessExpression */:
65870
65912
  case 209 /* ElementAccessExpression */:
65871
- const expr = node.expression;
65872
- let symbol = getTypeOfNode(expr).symbol;
65873
- if (symbol && symbol.flags & 2097152 /* Alias */) {
65874
- symbol = resolveAlias(symbol);
65875
- }
65876
- return !!(symbol && getAllSymbolFlags(symbol) & 384 /* Enum */);
65913
+ const expr = skipParentheses(node.expression);
65914
+ const symbol = isEntityNameExpression(expr) ? resolveEntityName(expr, 111551 /* Value */, true) : void 0;
65915
+ return !!(symbol && symbol.flags & 384 /* Enum */);
65877
65916
  }
65878
65917
  return false;
65879
65918
  }
@@ -66334,7 +66373,7 @@ ${lanes.join("\n")}
66334
66373
  const symbol = createSymbol(0 /* None */, "NewTargetExpression");
66335
66374
  const targetPropertySymbol = createSymbol(4 /* Property */, "target", 8 /* Readonly */);
66336
66375
  targetPropertySymbol.parent = symbol;
66337
- targetPropertySymbol.type = targetType;
66376
+ targetPropertySymbol.links.type = targetType;
66338
66377
  const members = createSymbolTable([targetPropertySymbol]);
66339
66378
  symbol.members = members;
66340
66379
  return createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);
@@ -67781,23 +67820,21 @@ ${lanes.join("\n")}
67781
67820
  return node;
67782
67821
  }
67783
67822
  function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) {
67784
- const context = getContextNode2(node);
67785
- const links = getNodeLinks(context);
67786
- const saveContextualType = links.contextualType;
67787
- const saveInferenceContext = links.inferenceContext;
67788
- try {
67789
- links.contextualType = contextualType;
67790
- links.inferenceContext = inferenceContext;
67791
- const type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0));
67792
- if (inferenceContext && inferenceContext.intraExpressionInferenceSites) {
67793
- inferenceContext.intraExpressionInferenceSites = void 0;
67794
- }
67795
- const result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node, void 0)) ? getRegularTypeOfLiteralType(type) : type;
67796
- return result;
67797
- } finally {
67798
- links.contextualType = saveContextualType;
67799
- links.inferenceContext = saveInferenceContext;
67800
- }
67823
+ const contextNode = getContextNode2(node);
67824
+ pushContextualType(contextNode, contextualType);
67825
+ const saveInferenceNode = currentInferenceNode;
67826
+ const saveInferenceContext = currentInferenceContext;
67827
+ currentInferenceNode = contextNode;
67828
+ currentInferenceContext = inferenceContext;
67829
+ const type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0));
67830
+ if (inferenceContext && inferenceContext.intraExpressionInferenceSites) {
67831
+ inferenceContext.intraExpressionInferenceSites = void 0;
67832
+ }
67833
+ const result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(contextualType, node, void 0)) ? getRegularTypeOfLiteralType(type) : type;
67834
+ currentInferenceNode = saveInferenceNode;
67835
+ currentInferenceContext = saveInferenceContext;
67836
+ popContextualType();
67837
+ return result;
67801
67838
  }
67802
67839
  function checkExpressionCached(node, checkMode) {
67803
67840
  if (checkMode) {
@@ -67869,11 +67906,15 @@ ${lanes.join("\n")}
67869
67906
  }
67870
67907
  function isConstContext(node) {
67871
67908
  const parent2 = node.parent;
67872
- return isAssertionExpression(parent2) && isConstTypeReference(parent2.type) || isJSDocTypeAssertion(parent2) && isConstTypeReference(getJSDocTypeAssertionType(parent2)) || (isParenthesizedExpression(parent2) || isArrayLiteralExpression(parent2) || isSpreadElement(parent2)) && isConstContext(parent2) || (isPropertyAssignment(parent2) || isShorthandPropertyAssignment(parent2) || isTemplateSpan(parent2)) && isConstContext(parent2.parent);
67909
+ return isAssertionExpression(parent2) && isConstTypeReference(parent2.type) || isJSDocTypeAssertion(parent2) && isConstTypeReference(getJSDocTypeAssertionType(parent2)) || isValidConstAssertionArgument(node) && isConstTypeParameterContext(node) || (isParenthesizedExpression(parent2) || isArrayLiteralExpression(parent2) || isSpreadElement(parent2)) && isConstContext(parent2) || (isPropertyAssignment(parent2) || isShorthandPropertyAssignment(parent2) || isTemplateSpan(parent2)) && isConstContext(parent2.parent);
67910
+ }
67911
+ function isConstTypeParameterContext(node) {
67912
+ const contextualType = getContextualType2(node, 0 /* None */);
67913
+ return !!contextualType && someType(contextualType, isConstTypeVariable);
67873
67914
  }
67874
- function checkExpressionForMutableLocation(node, checkMode, contextualType, forceTuple) {
67915
+ function checkExpressionForMutableLocation(node, checkMode, forceTuple) {
67875
67916
  const type = checkExpression(node, checkMode, forceTuple);
67876
- return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion3(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType2(node, void 0) : contextualType, node, void 0));
67917
+ return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion3(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(getContextualType2(node, void 0), node, void 0));
67877
67918
  }
67878
67919
  function checkPropertyAssignment(node, checkMode) {
67879
67920
  if (node.name.kind === 164 /* ComputedPropertyName */) {
@@ -68057,14 +68098,10 @@ ${lanes.join("\n")}
68057
68098
  if (links.contextFreeType) {
68058
68099
  return links.contextFreeType;
68059
68100
  }
68060
- const saveContextualType = links.contextualType;
68061
- links.contextualType = anyType;
68062
- try {
68063
- const type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */);
68064
- return type;
68065
- } finally {
68066
- links.contextualType = saveContextualType;
68067
- }
68101
+ pushContextualType(node, anyType);
68102
+ const type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */);
68103
+ popContextualType();
68104
+ return type;
68068
68105
  }
68069
68106
  function checkExpression(node, checkMode, forceTuple) {
68070
68107
  var _a2, _b;
@@ -68241,7 +68278,7 @@ ${lanes.join("\n")}
68241
68278
  var _a2, _b;
68242
68279
  if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) {
68243
68280
  const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node));
68244
- const modifiers = getVarianceModifiers(typeParameter);
68281
+ const modifiers = getTypeParameterModifiers(typeParameter) & (32768 /* In */ | 65536 /* Out */);
68245
68282
  if (modifiers) {
68246
68283
  const symbol = getSymbolOfDeclaration(node.parent);
68247
68284
  if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) {
@@ -71872,7 +71909,7 @@ ${lanes.join("\n")}
71872
71909
  );
71873
71910
  }
71874
71911
  function getTargetSymbol(s) {
71875
- return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
71912
+ return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s;
71876
71913
  }
71877
71914
  function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
71878
71915
  return filter(symbol.declarations, (d) => d.kind === 260 /* ClassDeclaration */ || d.kind === 261 /* InterfaceDeclaration */);
@@ -73935,7 +73972,7 @@ ${lanes.join("\n")}
73935
73972
  if (getCheckFlags(symbol) & 6 /* Synthetic */) {
73936
73973
  return mapDefined(getSymbolLinks(symbol).containingType.types, (type) => getPropertyOfType(type, symbol.escapedName));
73937
73974
  } else if (symbol.flags & 33554432 /* Transient */) {
73938
- const { leftSpread, rightSpread, syntheticOrigin } = symbol;
73975
+ const { links: { leftSpread, rightSpread, syntheticOrigin } } = symbol;
73939
73976
  return leftSpread ? [leftSpread, rightSpread] : syntheticOrigin ? [syntheticOrigin] : singleElementArray(tryGetTarget(symbol));
73940
73977
  }
73941
73978
  return void 0;
@@ -74813,16 +74850,20 @@ ${lanes.join("\n")}
74813
74850
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind));
74814
74851
  }
74815
74852
  }
74816
- if (modifier.kind !== 101 /* InKeyword */ && modifier.kind !== 145 /* OutKeyword */) {
74853
+ if (modifier.kind !== 101 /* InKeyword */ && modifier.kind !== 145 /* OutKeyword */ && modifier.kind !== 85 /* ConstKeyword */) {
74817
74854
  if (node.kind === 165 /* TypeParameter */) {
74818
74855
  return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind));
74819
74856
  }
74820
74857
  }
74821
74858
  switch (modifier.kind) {
74822
74859
  case 85 /* ConstKeyword */:
74823
- if (node.kind !== 263 /* EnumDeclaration */) {
74860
+ if (node.kind !== 263 /* EnumDeclaration */ && node.kind !== 165 /* TypeParameter */) {
74824
74861
  return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(85 /* ConstKeyword */));
74825
74862
  }
74863
+ const parent2 = node.parent;
74864
+ if (node.kind === 165 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassDeclaration(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) {
74865
+ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind));
74866
+ }
74826
74867
  break;
74827
74868
  case 161 /* OverrideKeyword */:
74828
74869
  if (flags & 16384 /* Override */) {
@@ -76234,7 +76275,7 @@ ${lanes.join("\n")}
76234
76275
  readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0
76235
76276
  };
76236
76277
  }
76237
- var ambientModuleSymbolRegex, anon, nextSymbolId, nextNodeId, nextMergeId, nextFlowId, TypeFacts, typeofNEFacts, CheckMode, SignatureCheckMode, isNotOverloadAndNotAccessor, intrinsicTypeKinds, JsxNames, SymbolTrackerImpl;
76278
+ var ambientModuleSymbolRegex, anon, nextSymbolId, nextNodeId, nextMergeId, nextFlowId, TypeFacts, typeofNEFacts, CheckMode, SignatureCheckMode, isNotOverloadAndNotAccessor, intrinsicTypeKinds, SymbolLinks, JsxNames, SymbolTrackerImpl;
76238
76279
  var init_checker = __esm({
76239
76280
  "src/compiler/checker.ts"() {
76240
76281
  "use strict";
@@ -76364,6 +76405,8 @@ ${lanes.join("\n")}
76364
76405
  Capitalize: 2 /* Capitalize */,
76365
76406
  Uncapitalize: 3 /* Uncapitalize */
76366
76407
  }));
76408
+ SymbolLinks = class {
76409
+ };
76367
76410
  ((JsxNames2) => {
76368
76411
  JsxNames2.JSX = "JSX";
76369
76412
  JsxNames2.IntrinsicElements = "IntrinsicElements";
@@ -81512,7 +81555,7 @@ ${lanes.join("\n")}
81512
81555
  if (isClassWithConstructorReference) {
81513
81556
  enableSubstitutionForClassAliases();
81514
81557
  const alias = factory2.cloneNode(temp);
81515
- alias.autoGenerateFlags &= ~8 /* ReservedInNestedScopes */;
81558
+ alias.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
81516
81559
  classAliases[getOriginalNodeId(node)] = alias;
81517
81560
  }
81518
81561
  setEmitFlags(classExpression, 131072 /* Indented */ | getEmitFlags(classExpression));
@@ -91900,7 +91943,7 @@ ${lanes.join("\n")}
91900
91943
  return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);
91901
91944
  }
91902
91945
  return node;
91903
- } else if (!(isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
91946
+ } else if (!(isGeneratedIdentifier(node) && !(node.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
91904
91947
  const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));
91905
91948
  if (exportContainer && exportContainer.kind === 308 /* SourceFile */) {
91906
91949
  return setTextRange(
@@ -99759,10 +99802,10 @@ ${lanes.join("\n")}
99759
99802
  }
99760
99803
  }
99761
99804
  function generateName(name) {
99762
- if ((name.autoGenerateFlags & 7 /* KindMask */) === 4 /* Node */) {
99763
- return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), name.autoGenerateFlags, name.autoGeneratePrefix, name.autoGenerateSuffix);
99805
+ if ((name.autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
99806
+ return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), name.autoGenerate.flags, name.autoGenerate.prefix, name.autoGenerate.suffix);
99764
99807
  } else {
99765
- const autoGenerateId = name.autoGenerateId;
99808
+ const autoGenerateId = name.autoGenerate.id;
99766
99809
  return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));
99767
99810
  }
99768
99811
  }
@@ -99945,26 +99988,26 @@ ${lanes.join("\n")}
99945
99988
  }
99946
99989
  }
99947
99990
  function makeName(name) {
99948
- const prefix = formatGeneratedNamePart(name.autoGeneratePrefix, generateName);
99949
- const suffix = formatGeneratedNamePart(name.autoGenerateSuffix);
99950
- switch (name.autoGenerateFlags & 7 /* KindMask */) {
99991
+ const prefix = formatGeneratedNamePart(name.autoGenerate.prefix, generateName);
99992
+ const suffix = formatGeneratedNamePart(name.autoGenerate.suffix);
99993
+ switch (name.autoGenerate.flags & 7 /* KindMask */) {
99951
99994
  case 1 /* Auto */:
99952
- return makeTempVariableName(TempFlags.Auto, !!(name.autoGenerateFlags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
99995
+ return makeTempVariableName(TempFlags.Auto, !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
99953
99996
  case 2 /* Loop */:
99954
99997
  Debug.assertNode(name, isIdentifier);
99955
- return makeTempVariableName(TempFlags._i, !!(name.autoGenerateFlags & 8 /* ReservedInNestedScopes */), false, prefix, suffix);
99998
+ return makeTempVariableName(TempFlags._i, !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */), false, prefix, suffix);
99956
99999
  case 3 /* Unique */:
99957
100000
  return makeUniqueName2(
99958
100001
  idText(name),
99959
- name.autoGenerateFlags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
99960
- !!(name.autoGenerateFlags & 16 /* Optimistic */),
99961
- !!(name.autoGenerateFlags & 8 /* ReservedInNestedScopes */),
100002
+ name.autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
100003
+ !!(name.autoGenerate.flags & 16 /* Optimistic */),
100004
+ !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */),
99962
100005
  isPrivateIdentifier(name),
99963
100006
  prefix,
99964
100007
  suffix
99965
100008
  );
99966
100009
  }
99967
- return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(name.autoGenerateFlags & 7 /* KindMask */, GeneratedIdentifierFlags, true)}.`);
100010
+ return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(name.autoGenerate.flags & 7 /* KindMask */, GeneratedIdentifierFlags, true)}.`);
99968
100011
  }
99969
100012
  function pipelineEmitWithComments(hint, node) {
99970
100013
  const pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node);
@@ -101547,19 +101590,20 @@ ${lanes.join("\n")}
101547
101590
  return false;
101548
101591
  return optionsHaveChanges(program.getCompilerOptions(), newOptions, sourceFileAffectingCompilerOptions);
101549
101592
  }
101550
- function createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics) {
101593
+ function createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics, typeScriptVersion3) {
101551
101594
  return {
101552
101595
  rootNames,
101553
101596
  options,
101554
101597
  host,
101555
101598
  oldProgram,
101556
- configFileParsingDiagnostics
101599
+ configFileParsingDiagnostics,
101600
+ typeScriptVersion: typeScriptVersion3
101557
101601
  };
101558
101602
  }
101559
101603
  function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
101560
101604
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
101561
101605
  const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
101562
- const { rootNames, options, configFileParsingDiagnostics, projectReferences } = createProgramOptions;
101606
+ const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions;
101563
101607
  let { oldProgram } = createProgramOptions;
101564
101608
  let processingDefaultLibFiles;
101565
101609
  let processingOtherFiles;
@@ -103318,7 +103362,7 @@ ${lanes.join("\n")}
103318
103362
  i++;
103319
103363
  }
103320
103364
  const resolveFrom = combinePaths(currentDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`);
103321
- const localOverrideModuleResult = resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: 2 /* NodeJs */ }, host, moduleResolutionCache);
103365
+ const localOverrideModuleResult = resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: 2 /* Node10 */ }, host, moduleResolutionCache);
103322
103366
  if (localOverrideModuleResult == null ? void 0 : localOverrideModuleResult.resolvedModule) {
103323
103367
  return localOverrideModuleResult.resolvedModule.resolvedFileName;
103324
103368
  }
@@ -103491,6 +103535,7 @@ ${lanes.join("\n")}
103491
103535
  } else if (options.incremental && !outputFile && !options.configFilePath) {
103492
103536
  programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
103493
103537
  }
103538
+ verifyDeprecatedCompilerOptions();
103494
103539
  verifyProjectReferences();
103495
103540
  if (options.composite) {
103496
103541
  const rootPaths = new Set(rootNames.map(toPath3));
@@ -103601,8 +103646,8 @@ ${lanes.join("\n")}
103601
103646
  }
103602
103647
  }
103603
103648
  if (getResolveJsonModule(options)) {
103604
- if (getEmitModuleResolutionKind(options) !== 2 /* NodeJs */ && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */ && getEmitModuleResolutionKind(options) !== 100 /* Bundler */) {
103605
- createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
103649
+ if (getEmitModuleResolutionKind(options) === 1 /* Classic */) {
103650
+ createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic, "resolveJsonModule");
103606
103651
  } else if (!hasJsonModuleEmitEnabled(options)) {
103607
103652
  createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext, "resolveJsonModule", "module");
103608
103653
  }
@@ -103710,6 +103755,56 @@ ${lanes.join("\n")}
103710
103755
  }
103711
103756
  }
103712
103757
  }
103758
+ function verifyDeprecatedCompilerOptions() {
103759
+ const version2 = typeScriptVersion3 || versionMajorMinor;
103760
+ const ignoreDeprecations = options.ignoreDeprecations;
103761
+ if (ignoreDeprecations) {
103762
+ if (ignoreDeprecations === "5.0" /* v5_0 */ && (version2 === "5.0" /* v5_0 */ || version2 === "5.5" /* v5_5 */)) {
103763
+ return;
103764
+ } else {
103765
+ createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations);
103766
+ }
103767
+ }
103768
+ if (options.target === 0 /* ES3 */) {
103769
+ createDeprecatedDiagnosticForOption(version2, "target", "ES3");
103770
+ }
103771
+ if (options.noImplicitUseStrict) {
103772
+ createDeprecatedDiagnosticForOption(version2, "noImplicitUseStrict");
103773
+ }
103774
+ if (options.keyofStringsOnly) {
103775
+ createDeprecatedDiagnosticForOption(version2, "keyofStringsOnly");
103776
+ }
103777
+ if (options.suppressExcessPropertyErrors) {
103778
+ createDeprecatedDiagnosticForOption(version2, "suppressExcessPropertyErrors");
103779
+ }
103780
+ if (options.suppressImplicitAnyIndexErrors) {
103781
+ createDeprecatedDiagnosticForOption(version2, "suppressImplicitAnyIndexErrors");
103782
+ }
103783
+ if (options.noStrictGenericChecks) {
103784
+ createDeprecatedDiagnosticForOption(version2, "noStrictGenericChecks");
103785
+ }
103786
+ if (options.charset) {
103787
+ createDeprecatedDiagnosticForOption(version2, "charset");
103788
+ }
103789
+ if (options.out) {
103790
+ createDeprecatedDiagnosticForOption(version2, "out");
103791
+ }
103792
+ }
103793
+ function createDeprecatedDiagnosticForOption(version2, name, value) {
103794
+ if (version2 === "6.0" /* v6_0 */) {
103795
+ createDiagnosticForOption(!value, name, void 0, Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name);
103796
+ } else {
103797
+ createDiagnosticForOption(
103798
+ !value,
103799
+ name,
103800
+ void 0,
103801
+ Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_silence_this_error,
103802
+ value || name,
103803
+ "5.5" /* v5_5 */,
103804
+ "5.0" /* v5_0 */
103805
+ );
103806
+ }
103807
+ }
103713
103808
  function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) {
103714
103809
  var _a3;
103715
103810
  let fileIncludeReasons;
@@ -112122,7 +112217,7 @@ ${lanes.join("\n")}
112122
112217
  };
112123
112218
  }
112124
112219
  function moduleResolutionUsesNodeModules(moduleResolution) {
112125
- return moduleResolution === 2 /* NodeJs */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */;
112220
+ return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */;
112126
112221
  }
112127
112222
  function makeImportIfNecessary(defaultImport, namedImports, moduleSpecifier, quotePreference) {
112128
112223
  return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference) : void 0;
@@ -112575,18 +112670,15 @@ ${lanes.join("\n")}
112575
112670
  }
112576
112671
  function getSymbolTarget(symbol, checker) {
112577
112672
  let next = symbol;
112578
- while (isAliasSymbol(next) || isTransientSymbol2(next) && next.target) {
112579
- if (isTransientSymbol2(next) && next.target) {
112580
- next = next.target;
112673
+ while (isAliasSymbol(next) || isTransientSymbol(next) && next.links.target) {
112674
+ if (isTransientSymbol(next) && next.links.target) {
112675
+ next = next.links.target;
112581
112676
  } else {
112582
112677
  next = skipAlias(next, checker);
112583
112678
  }
112584
112679
  }
112585
112680
  return next;
112586
112681
  }
112587
- function isTransientSymbol2(symbol) {
112588
- return (symbol.flags & 33554432 /* Transient */) !== 0;
112589
- }
112590
112682
  function isAliasSymbol(symbol) {
112591
112683
  return (symbol.flags & 2097152 /* Alias */) !== 0;
112592
112684
  }
@@ -118835,6 +118927,8 @@ ${lanes.join("\n")}
118835
118927
  };
118836
118928
  SymbolObject = class {
118837
118929
  constructor(flags, name) {
118930
+ this.id = 0;
118931
+ this.mergeId = 0;
118838
118932
  this.flags = flags;
118839
118933
  this.escapedName = name;
118840
118934
  }
@@ -118856,8 +118950,8 @@ ${lanes.join("\n")}
118856
118950
  getDocumentationComment(checker) {
118857
118951
  if (!this.documentationComment) {
118858
118952
  this.documentationComment = emptyArray;
118859
- if (!this.declarations && this.target && this.target.tupleLabelDeclaration) {
118860
- const labelDecl = this.target.tupleLabelDeclaration;
118953
+ if (!this.declarations && isTransientSymbol(this) && this.links.target && isTransientSymbol(this.links.target) && this.links.target.links.tupleLabelDeclaration) {
118954
+ const labelDecl = this.links.target.links.tupleLabelDeclaration;
118861
118955
  this.documentationComment = getDocumentationComment([labelDecl], checker);
118862
118956
  } else {
118863
118957
  this.documentationComment = getDocumentationComment(this.declarations, checker);
@@ -124385,7 +124479,7 @@ ${lanes.join("\n")}
124385
124479
  }
124386
124480
  function isFixPossiblyReExportingImportingFile(fix, importingFile, compilerOptions, toPath3) {
124387
124481
  var _a2;
124388
- if (fix.isReExport && ((_a2 = fix.exportInfo) == null ? void 0 : _a2.moduleFileName) && getEmitModuleResolutionKind(compilerOptions) === 2 /* NodeJs */ && isIndexFileName(fix.exportInfo.moduleFileName)) {
124482
+ if (fix.isReExport && ((_a2 = fix.exportInfo) == null ? void 0 : _a2.moduleFileName) && getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */ && isIndexFileName(fix.exportInfo.moduleFileName)) {
124389
124483
  const reExportDir = toPath3(getDirectoryPath(fix.exportInfo.moduleFileName));
124390
124484
  return startsWith(importingFile.path, reExportDir);
124391
124485
  }
@@ -125600,7 +125694,7 @@ ${lanes.join("\n")}
125600
125694
  // src/services/codefixes/returnValueCorrect.ts
125601
125695
  function createObjectTypeFromLabeledExpression(checker, label, expression) {
125602
125696
  const member = checker.createSymbol(4 /* Property */, label.escapedText);
125603
- member.type = checker.getTypeAtLocation(expression);
125697
+ member.links.type = checker.getTypeAtLocation(expression);
125604
125698
  const members = createSymbolTable([member]);
125605
125699
  return checker.createAnonymousType(void 0, members, [], [], []);
125606
125700
  }
@@ -128413,7 +128507,7 @@ ${lanes.join("\n")}
128413
128507
  const members = mapEntries(props, (name, types) => {
128414
128508
  const isOptional = types.length < anons.length ? 16777216 /* Optional */ : 0;
128415
128509
  const s = checker.createSymbol(4 /* Property */ | isOptional, name);
128416
- s.type = checker.getUnionType(types);
128510
+ s.links.type = checker.getUnionType(types);
128417
128511
  return [name, s];
128418
128512
  });
128419
128513
  const indexInfos = [];
@@ -128467,7 +128561,7 @@ ${lanes.join("\n")}
128467
128561
  if (usage.properties) {
128468
128562
  usage.properties.forEach((u, name) => {
128469
128563
  const symbol = checker.createSymbol(4 /* Property */, name);
128470
- symbol.type = combineFromUsage(u);
128564
+ symbol.links.type = combineFromUsage(u);
128471
128565
  members.set(name, symbol);
128472
128566
  });
128473
128567
  }
@@ -128543,6 +128637,7 @@ ${lanes.join("\n")}
128543
128637
  return [];
128544
128638
  }
128545
128639
  function inferFromSignatures(genericSig, usageSig, typeParameter) {
128640
+ var _a2;
128546
128641
  const types = [];
128547
128642
  for (let i = 0; i < genericSig.parameters.length; i++) {
128548
128643
  const genericParam = genericSig.parameters[i];
@@ -128556,7 +128651,7 @@ ${lanes.join("\n")}
128556
128651
  if (elementType) {
128557
128652
  genericParamType = elementType;
128558
128653
  }
128559
- const targetType = usageParam.type || (usageParam.valueDeclaration ? checker.getTypeOfSymbolAtLocation(usageParam, usageParam.valueDeclaration) : checker.getAnyType());
128654
+ const targetType = ((_a2 = tryCast(usageParam, isTransientSymbol)) == null ? void 0 : _a2.links.type) || (usageParam.valueDeclaration ? checker.getTypeOfSymbolAtLocation(usageParam, usageParam.valueDeclaration) : checker.getAnyType());
128560
128655
  types.push(...inferTypeParameters(genericParamType, targetType, typeParameter));
128561
128656
  }
128562
128657
  const genericReturn = checker.getReturnTypeOfSignature(genericSig);
@@ -128572,7 +128667,7 @@ ${lanes.join("\n")}
128572
128667
  const length2 = Math.max(...calls.map((c) => c.argumentTypes.length));
128573
128668
  for (let i = 0; i < length2; i++) {
128574
128669
  const symbol = checker.createSymbol(1 /* FunctionScopedVariable */, escapeLeadingUnderscores(`arg${i}`));
128575
- symbol.type = combineTypes(calls.map((call) => call.argumentTypes[i] || checker.getUndefinedType()));
128670
+ symbol.links.type = combineTypes(calls.map((call) => call.argumentTypes[i] || checker.getUndefinedType()));
128576
128671
  if (calls.some((call) => call.argumentTypes[i] === void 0)) {
128577
128672
  symbol.flags |= 16777216 /* Optional */;
128578
128673
  }
@@ -128789,7 +128884,7 @@ ${lanes.join("\n")}
128789
128884
  if (declaration && isAutoAccessorPropertyDeclaration(declaration)) {
128790
128885
  modifierFlags |= 128 /* Accessor */;
128791
128886
  }
128792
- const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0;
128887
+ const modifiers = createModifiers();
128793
128888
  const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
128794
128889
  const optional = !!(symbol.flags & 16777216 /* Optional */);
128795
128890
  const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient;
@@ -128882,6 +128977,19 @@ ${lanes.join("\n")}
128882
128977
  if (method)
128883
128978
  addClassElement(method);
128884
128979
  }
128980
+ function createModifiers() {
128981
+ let modifiers2;
128982
+ if (modifierFlags) {
128983
+ modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags));
128984
+ }
128985
+ if (shouldAddOverrideKeyword()) {
128986
+ modifiers2 = append(modifiers2, factory.createToken(161 /* OverrideKeyword */));
128987
+ }
128988
+ return modifiers2 && factory.createNodeArray(modifiers2);
128989
+ }
128990
+ function shouldAddOverrideKeyword() {
128991
+ return !!(context.program.getCompilerOptions().noImplicitOverride && declaration && hasAbstractModifier(declaration));
128992
+ }
128885
128993
  function createName(node) {
128886
128994
  if (isIdentifier(node) && node.escapedText === "constructor") {
128887
128995
  return factory.createComputedPropertyName(factory.createStringLiteral(idText(node), quotePreference === 0 /* Single */));
@@ -128899,14 +129007,15 @@ ${lanes.join("\n")}
128899
129007
  const program = context.program;
128900
129008
  const checker = program.getTypeChecker();
128901
129009
  const scriptTarget = getEmitScriptTarget(program.getCompilerOptions());
129010
+ const isJs = isInJSFile(enclosingDeclaration);
128902
129011
  const flags = 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */ | 524288 /* AllowEmptyTuple */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */);
128903
129012
  const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context));
128904
129013
  if (!signatureDeclaration) {
128905
129014
  return void 0;
128906
129015
  }
128907
- let typeParameters = signatureDeclaration.typeParameters;
129016
+ let typeParameters = isJs ? void 0 : signatureDeclaration.typeParameters;
128908
129017
  let parameters = signatureDeclaration.parameters;
128909
- let type = signatureDeclaration.type;
129018
+ let type = isJs ? void 0 : signatureDeclaration.type;
128910
129019
  if (importAdder) {
128911
129020
  if (typeParameters) {
128912
129021
  const newTypeParameters = sameMap(typeParameters, (typeParameterDecl) => {
@@ -128939,18 +129048,20 @@ ${lanes.join("\n")}
128939
129048
  }
128940
129049
  }
128941
129050
  const newParameters = sameMap(parameters, (parameterDecl) => {
128942
- const importableReference = tryGetAutoImportableReferenceFromTypeNode(parameterDecl.type, scriptTarget);
128943
- let type2 = parameterDecl.type;
128944
- if (importableReference) {
128945
- type2 = importableReference.typeNode;
128946
- importSymbols(importAdder, importableReference.symbols);
129051
+ let type2 = isJs ? void 0 : parameterDecl.type;
129052
+ if (type2) {
129053
+ const importableReference = tryGetAutoImportableReferenceFromTypeNode(type2, scriptTarget);
129054
+ if (importableReference) {
129055
+ type2 = importableReference.typeNode;
129056
+ importSymbols(importAdder, importableReference.symbols);
129057
+ }
128947
129058
  }
128948
129059
  return factory.updateParameterDeclaration(
128949
129060
  parameterDecl,
128950
129061
  parameterDecl.modifiers,
128951
129062
  parameterDecl.dotDotDotToken,
128952
129063
  parameterDecl.name,
128953
- parameterDecl.questionToken,
129064
+ isJs ? void 0 : parameterDecl.questionToken,
128954
129065
  type2,
128955
129066
  parameterDecl.initializer
128956
129067
  );
@@ -129558,11 +129669,11 @@ ${lanes.join("\n")}
129558
129669
  }
129559
129670
  function getImportCodeFixesForExpression(context, expr) {
129560
129671
  const type = context.program.getTypeChecker().getTypeAtLocation(expr);
129561
- if (!(type.symbol && type.symbol.originatingImport)) {
129672
+ if (!(type.symbol && isTransientSymbol(type.symbol) && type.symbol.links.originatingImport)) {
129562
129673
  return [];
129563
129674
  }
129564
129675
  const fixes = [];
129565
- const relatedImport = type.symbol.originatingImport;
129676
+ const relatedImport = type.symbol.links.originatingImport;
129566
129677
  if (!isImportCall(relatedImport)) {
129567
129678
  addRange(fixes, getCodeFixesForImportDeclaration(context, relatedImport));
129568
129679
  }
@@ -143832,7 +143943,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
143832
143943
  }
143833
143944
  });
143834
143945
  const lists = checker.getExpandedParameters(candidateSignature);
143835
- const isVariadic = !checker.hasEffectiveRestParameter(candidateSignature) ? (_) => false : lists.length === 1 ? (_) => true : (pList) => !!(pList.length && pList[pList.length - 1].checkFlags & 32768 /* RestParameter */);
143946
+ const isVariadic = !checker.hasEffectiveRestParameter(candidateSignature) ? (_) => false : lists.length === 1 ? (_) => true : (pList) => {
143947
+ var _a2;
143948
+ return !!(pList.length && ((_a2 = tryCast(pList[pList.length - 1], isTransientSymbol)) == null ? void 0 : _a2.links.checkFlags) & 32768 /* RestParameter */);
143949
+ };
143836
143950
  return lists.map((parameterList) => ({
143837
143951
  isVariadic: isVariadic(parameterList),
143838
143952
  parameters: parameterList.map((p) => createSignatureHelpParameterForParameter(p, checker, enclosingDeclaration, sourceFile, printer)),
@@ -143846,7 +143960,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
143846
143960
  printer.writeNode(4 /* Unspecified */, param, sourceFile, writer);
143847
143961
  });
143848
143962
  const isOptional = checker.isOptionalParameter(parameter.valueDeclaration);
143849
- const isRest = !!(parameter.checkFlags & 32768 /* RestParameter */);
143963
+ const isRest = isTransientSymbol(parameter) && !!(parameter.links.checkFlags & 32768 /* RestParameter */);
143850
143964
  return { name: parameter.name, documentation: parameter.getDocumentationComment(checker), displayParts, isOptional, isRest };
143851
143965
  }
143852
143966
  function createSignatureHelpParameterForTypeParameter(typeParameter, checker, enclosingDeclaration, sourceFile, printer) {
@@ -144160,7 +144274,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
144160
144274
  if (flags & 131072 /* Signature */)
144161
144275
  return "index" /* indexSignatureElement */;
144162
144276
  if (flags & 4 /* Property */) {
144163
- if (flags & 33554432 /* Transient */ && symbol.checkFlags & 6 /* Synthetic */) {
144277
+ if (flags & 33554432 /* Transient */ && symbol.links.checkFlags & 6 /* Synthetic */) {
144164
144278
  const unionPropertyKind = forEach(typeChecker.getRootSymbols(symbol), (rootSymbol) => {
144165
144279
  const rootSymbolFlags = rootSymbol.getFlags();
144166
144280
  if (rootSymbolFlags & (98308 /* PropertyOrAccessor */ | 3 /* Variable */)) {
@@ -144540,8 +144654,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
144540
144654
  } else {
144541
144655
  addRange(displayParts, typeToDisplayParts(typeChecker, type, enclosingDeclaration));
144542
144656
  }
144543
- if (symbol.target && symbol.target.tupleLabelDeclaration) {
144544
- const labelDecl = symbol.target.tupleLabelDeclaration;
144657
+ if (isTransientSymbol(symbol) && symbol.links.target && isTransientSymbol(symbol.links.target) && symbol.links.target.links.tupleLabelDeclaration) {
144658
+ const labelDecl = symbol.links.target.links.tupleLabelDeclaration;
144545
144659
  Debug.assertNode(labelDecl.name, isIdentifier);
144546
144660
  displayParts.push(spacePart());
144547
144661
  displayParts.push(punctuationPart(20 /* OpenParenToken */));
@@ -157320,7 +157434,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
157320
157434
  return void 0;
157321
157435
  const entrypoints = getEntrypointsFromPackageJsonInfo(
157322
157436
  packageJson,
157323
- { moduleResolution: 2 /* NodeJs */ },
157437
+ { moduleResolution: 2 /* Node10 */ },
157324
157438
  project,
157325
157439
  project.getModuleResolutionCache()
157326
157440
  );
@@ -159528,6 +159642,7 @@ ${e.message}`;
159528
159642
  ContextFlags: () => ContextFlags,
159529
159643
  CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter,
159530
159644
  Debug: () => Debug,
159645
+ DeprecationVersion: () => DeprecationVersion,
159531
159646
  DiagnosticCategory: () => DiagnosticCategory,
159532
159647
  Diagnostics: () => Diagnostics,
159533
159648
  DocumentHighlights: () => DocumentHighlights,
@@ -162175,6 +162290,7 @@ ${e.message}`;
162175
162290
  ContextFlags: () => ContextFlags,
162176
162291
  CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter,
162177
162292
  Debug: () => Debug,
162293
+ DeprecationVersion: () => DeprecationVersion,
162178
162294
  DiagnosticCategory: () => DiagnosticCategory,
162179
162295
  Diagnostics: () => Diagnostics,
162180
162296
  DocumentHighlights: () => DocumentHighlights,