typescript 4.7.0-dev.20220302 → 4.7.0-dev.20220303

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.
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220302";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220303";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -4123,74 +4123,75 @@ var ts;
4123
4123
  SyntaxKind[SyntaxKind["CatchClause"] = 291] = "CatchClause";
4124
4124
  SyntaxKind[SyntaxKind["AssertClause"] = 292] = "AssertClause";
4125
4125
  SyntaxKind[SyntaxKind["AssertEntry"] = 293] = "AssertEntry";
4126
+ SyntaxKind[SyntaxKind["ImportTypeAssertionContainer"] = 294] = "ImportTypeAssertionContainer";
4126
4127
  // Property assignments
4127
- SyntaxKind[SyntaxKind["PropertyAssignment"] = 294] = "PropertyAssignment";
4128
- SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 295] = "ShorthandPropertyAssignment";
4129
- SyntaxKind[SyntaxKind["SpreadAssignment"] = 296] = "SpreadAssignment";
4128
+ SyntaxKind[SyntaxKind["PropertyAssignment"] = 295] = "PropertyAssignment";
4129
+ SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 296] = "ShorthandPropertyAssignment";
4130
+ SyntaxKind[SyntaxKind["SpreadAssignment"] = 297] = "SpreadAssignment";
4130
4131
  // Enum
4131
- SyntaxKind[SyntaxKind["EnumMember"] = 297] = "EnumMember";
4132
+ SyntaxKind[SyntaxKind["EnumMember"] = 298] = "EnumMember";
4132
4133
  // Unparsed
4133
- SyntaxKind[SyntaxKind["UnparsedPrologue"] = 298] = "UnparsedPrologue";
4134
- SyntaxKind[SyntaxKind["UnparsedPrepend"] = 299] = "UnparsedPrepend";
4135
- SyntaxKind[SyntaxKind["UnparsedText"] = 300] = "UnparsedText";
4136
- SyntaxKind[SyntaxKind["UnparsedInternalText"] = 301] = "UnparsedInternalText";
4137
- SyntaxKind[SyntaxKind["UnparsedSyntheticReference"] = 302] = "UnparsedSyntheticReference";
4134
+ SyntaxKind[SyntaxKind["UnparsedPrologue"] = 299] = "UnparsedPrologue";
4135
+ SyntaxKind[SyntaxKind["UnparsedPrepend"] = 300] = "UnparsedPrepend";
4136
+ SyntaxKind[SyntaxKind["UnparsedText"] = 301] = "UnparsedText";
4137
+ SyntaxKind[SyntaxKind["UnparsedInternalText"] = 302] = "UnparsedInternalText";
4138
+ SyntaxKind[SyntaxKind["UnparsedSyntheticReference"] = 303] = "UnparsedSyntheticReference";
4138
4139
  // Top-level nodes
4139
- SyntaxKind[SyntaxKind["SourceFile"] = 303] = "SourceFile";
4140
- SyntaxKind[SyntaxKind["Bundle"] = 304] = "Bundle";
4141
- SyntaxKind[SyntaxKind["UnparsedSource"] = 305] = "UnparsedSource";
4142
- SyntaxKind[SyntaxKind["InputFiles"] = 306] = "InputFiles";
4140
+ SyntaxKind[SyntaxKind["SourceFile"] = 304] = "SourceFile";
4141
+ SyntaxKind[SyntaxKind["Bundle"] = 305] = "Bundle";
4142
+ SyntaxKind[SyntaxKind["UnparsedSource"] = 306] = "UnparsedSource";
4143
+ SyntaxKind[SyntaxKind["InputFiles"] = 307] = "InputFiles";
4143
4144
  // JSDoc nodes
4144
- SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 307] = "JSDocTypeExpression";
4145
- SyntaxKind[SyntaxKind["JSDocNameReference"] = 308] = "JSDocNameReference";
4146
- SyntaxKind[SyntaxKind["JSDocMemberName"] = 309] = "JSDocMemberName";
4147
- SyntaxKind[SyntaxKind["JSDocAllType"] = 310] = "JSDocAllType";
4148
- SyntaxKind[SyntaxKind["JSDocUnknownType"] = 311] = "JSDocUnknownType";
4149
- SyntaxKind[SyntaxKind["JSDocNullableType"] = 312] = "JSDocNullableType";
4150
- SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 313] = "JSDocNonNullableType";
4151
- SyntaxKind[SyntaxKind["JSDocOptionalType"] = 314] = "JSDocOptionalType";
4152
- SyntaxKind[SyntaxKind["JSDocFunctionType"] = 315] = "JSDocFunctionType";
4153
- SyntaxKind[SyntaxKind["JSDocVariadicType"] = 316] = "JSDocVariadicType";
4154
- SyntaxKind[SyntaxKind["JSDocNamepathType"] = 317] = "JSDocNamepathType";
4155
- SyntaxKind[SyntaxKind["JSDocComment"] = 318] = "JSDocComment";
4156
- SyntaxKind[SyntaxKind["JSDocText"] = 319] = "JSDocText";
4157
- SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 320] = "JSDocTypeLiteral";
4158
- SyntaxKind[SyntaxKind["JSDocSignature"] = 321] = "JSDocSignature";
4159
- SyntaxKind[SyntaxKind["JSDocLink"] = 322] = "JSDocLink";
4160
- SyntaxKind[SyntaxKind["JSDocLinkCode"] = 323] = "JSDocLinkCode";
4161
- SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 324] = "JSDocLinkPlain";
4162
- SyntaxKind[SyntaxKind["JSDocTag"] = 325] = "JSDocTag";
4163
- SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 326] = "JSDocAugmentsTag";
4164
- SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 327] = "JSDocImplementsTag";
4165
- SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 328] = "JSDocAuthorTag";
4166
- SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 329] = "JSDocDeprecatedTag";
4167
- SyntaxKind[SyntaxKind["JSDocClassTag"] = 330] = "JSDocClassTag";
4168
- SyntaxKind[SyntaxKind["JSDocPublicTag"] = 331] = "JSDocPublicTag";
4169
- SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 332] = "JSDocPrivateTag";
4170
- SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 333] = "JSDocProtectedTag";
4171
- SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 334] = "JSDocReadonlyTag";
4172
- SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 335] = "JSDocOverrideTag";
4173
- SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 336] = "JSDocCallbackTag";
4174
- SyntaxKind[SyntaxKind["JSDocEnumTag"] = 337] = "JSDocEnumTag";
4175
- SyntaxKind[SyntaxKind["JSDocParameterTag"] = 338] = "JSDocParameterTag";
4176
- SyntaxKind[SyntaxKind["JSDocReturnTag"] = 339] = "JSDocReturnTag";
4177
- SyntaxKind[SyntaxKind["JSDocThisTag"] = 340] = "JSDocThisTag";
4178
- SyntaxKind[SyntaxKind["JSDocTypeTag"] = 341] = "JSDocTypeTag";
4179
- SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 342] = "JSDocTemplateTag";
4180
- SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 343] = "JSDocTypedefTag";
4181
- SyntaxKind[SyntaxKind["JSDocSeeTag"] = 344] = "JSDocSeeTag";
4182
- SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 345] = "JSDocPropertyTag";
4145
+ SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 308] = "JSDocTypeExpression";
4146
+ SyntaxKind[SyntaxKind["JSDocNameReference"] = 309] = "JSDocNameReference";
4147
+ SyntaxKind[SyntaxKind["JSDocMemberName"] = 310] = "JSDocMemberName";
4148
+ SyntaxKind[SyntaxKind["JSDocAllType"] = 311] = "JSDocAllType";
4149
+ SyntaxKind[SyntaxKind["JSDocUnknownType"] = 312] = "JSDocUnknownType";
4150
+ SyntaxKind[SyntaxKind["JSDocNullableType"] = 313] = "JSDocNullableType";
4151
+ SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 314] = "JSDocNonNullableType";
4152
+ SyntaxKind[SyntaxKind["JSDocOptionalType"] = 315] = "JSDocOptionalType";
4153
+ SyntaxKind[SyntaxKind["JSDocFunctionType"] = 316] = "JSDocFunctionType";
4154
+ SyntaxKind[SyntaxKind["JSDocVariadicType"] = 317] = "JSDocVariadicType";
4155
+ SyntaxKind[SyntaxKind["JSDocNamepathType"] = 318] = "JSDocNamepathType";
4156
+ SyntaxKind[SyntaxKind["JSDocComment"] = 319] = "JSDocComment";
4157
+ SyntaxKind[SyntaxKind["JSDocText"] = 320] = "JSDocText";
4158
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 321] = "JSDocTypeLiteral";
4159
+ SyntaxKind[SyntaxKind["JSDocSignature"] = 322] = "JSDocSignature";
4160
+ SyntaxKind[SyntaxKind["JSDocLink"] = 323] = "JSDocLink";
4161
+ SyntaxKind[SyntaxKind["JSDocLinkCode"] = 324] = "JSDocLinkCode";
4162
+ SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 325] = "JSDocLinkPlain";
4163
+ SyntaxKind[SyntaxKind["JSDocTag"] = 326] = "JSDocTag";
4164
+ SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 327] = "JSDocAugmentsTag";
4165
+ SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 328] = "JSDocImplementsTag";
4166
+ SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 329] = "JSDocAuthorTag";
4167
+ SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 330] = "JSDocDeprecatedTag";
4168
+ SyntaxKind[SyntaxKind["JSDocClassTag"] = 331] = "JSDocClassTag";
4169
+ SyntaxKind[SyntaxKind["JSDocPublicTag"] = 332] = "JSDocPublicTag";
4170
+ SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 333] = "JSDocPrivateTag";
4171
+ SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 334] = "JSDocProtectedTag";
4172
+ SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 335] = "JSDocReadonlyTag";
4173
+ SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 336] = "JSDocOverrideTag";
4174
+ SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 337] = "JSDocCallbackTag";
4175
+ SyntaxKind[SyntaxKind["JSDocEnumTag"] = 338] = "JSDocEnumTag";
4176
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 339] = "JSDocParameterTag";
4177
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 340] = "JSDocReturnTag";
4178
+ SyntaxKind[SyntaxKind["JSDocThisTag"] = 341] = "JSDocThisTag";
4179
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 342] = "JSDocTypeTag";
4180
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 343] = "JSDocTemplateTag";
4181
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 344] = "JSDocTypedefTag";
4182
+ SyntaxKind[SyntaxKind["JSDocSeeTag"] = 345] = "JSDocSeeTag";
4183
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 346] = "JSDocPropertyTag";
4183
4184
  // Synthesized list
4184
- SyntaxKind[SyntaxKind["SyntaxList"] = 346] = "SyntaxList";
4185
+ SyntaxKind[SyntaxKind["SyntaxList"] = 347] = "SyntaxList";
4185
4186
  // Transformation nodes
4186
- SyntaxKind[SyntaxKind["NotEmittedStatement"] = 347] = "NotEmittedStatement";
4187
- SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 348] = "PartiallyEmittedExpression";
4188
- SyntaxKind[SyntaxKind["CommaListExpression"] = 349] = "CommaListExpression";
4189
- SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 350] = "MergeDeclarationMarker";
4190
- SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 351] = "EndOfDeclarationMarker";
4191
- SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 352] = "SyntheticReferenceExpression";
4187
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 348] = "NotEmittedStatement";
4188
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 349] = "PartiallyEmittedExpression";
4189
+ SyntaxKind[SyntaxKind["CommaListExpression"] = 350] = "CommaListExpression";
4190
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 351] = "MergeDeclarationMarker";
4191
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 352] = "EndOfDeclarationMarker";
4192
+ SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 353] = "SyntheticReferenceExpression";
4192
4193
  // Enum value count
4193
- SyntaxKind[SyntaxKind["Count"] = 353] = "Count";
4194
+ SyntaxKind[SyntaxKind["Count"] = 354] = "Count";
4194
4195
  // Markers
4195
4196
  SyntaxKind[SyntaxKind["FirstAssignment"] = 63] = "FirstAssignment";
4196
4197
  SyntaxKind[SyntaxKind["LastAssignment"] = 78] = "LastAssignment";
@@ -4219,10 +4220,10 @@ var ts;
4219
4220
  SyntaxKind[SyntaxKind["FirstStatement"] = 236] = "FirstStatement";
4220
4221
  SyntaxKind[SyntaxKind["LastStatement"] = 252] = "LastStatement";
4221
4222
  SyntaxKind[SyntaxKind["FirstNode"] = 160] = "FirstNode";
4222
- SyntaxKind[SyntaxKind["FirstJSDocNode"] = 307] = "FirstJSDocNode";
4223
- SyntaxKind[SyntaxKind["LastJSDocNode"] = 345] = "LastJSDocNode";
4224
- SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 325] = "FirstJSDocTagNode";
4225
- SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 345] = "LastJSDocTagNode";
4223
+ SyntaxKind[SyntaxKind["FirstJSDocNode"] = 308] = "FirstJSDocNode";
4224
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 346] = "LastJSDocNode";
4225
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 326] = "FirstJSDocTagNode";
4226
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 346] = "LastJSDocTagNode";
4226
4227
  /* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 126] = "FirstContextualKeyword";
4227
4228
  /* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 159] = "LastContextualKeyword";
4228
4229
  })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
@@ -8200,6 +8201,9 @@ var ts;
8200
8201
  Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
8201
8202
  Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452", "Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`."),
8202
8203
  resolution_mode_should_be_either_require_or_import: diag(1453, ts.DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
8204
+ resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
8205
+ resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
8206
+ Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, ts.DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),
8203
8207
  The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
8204
8208
  Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
8205
8209
  catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
@@ -12475,8 +12479,8 @@ var ts;
12475
12479
  switch (declaration.kind) {
12476
12480
  case 79 /* Identifier */:
12477
12481
  return declaration;
12478
- case 345 /* JSDocPropertyTag */:
12479
- case 338 /* JSDocParameterTag */: {
12482
+ case 346 /* JSDocPropertyTag */:
12483
+ case 339 /* JSDocParameterTag */: {
12480
12484
  var name = declaration.name;
12481
12485
  if (name.kind === 160 /* QualifiedName */) {
12482
12486
  return name.right;
@@ -12500,9 +12504,9 @@ var ts;
12500
12504
  return undefined;
12501
12505
  }
12502
12506
  }
12503
- case 343 /* JSDocTypedefTag */:
12507
+ case 344 /* JSDocTypedefTag */:
12504
12508
  return getNameOfJSDocTypedef(declaration);
12505
- case 337 /* JSDocEnumTag */:
12509
+ case 338 /* JSDocEnumTag */:
12506
12510
  return nameForNamelessJSDocTypedef(declaration);
12507
12511
  case 270 /* ExportAssignment */: {
12508
12512
  var expression = declaration.expression;
@@ -12801,12 +12805,12 @@ var ts;
12801
12805
  /** Gets the text of a jsdoc comment, flattening links to their text. */
12802
12806
  function getTextOfJSDocComment(comment) {
12803
12807
  return typeof comment === "string" ? comment
12804
- : comment === null || comment === void 0 ? void 0 : comment.map(function (c) { return c.kind === 319 /* JSDocText */ ? c.text : formatJSDocLink(c); }).join("");
12808
+ : comment === null || comment === void 0 ? void 0 : comment.map(function (c) { return c.kind === 320 /* JSDocText */ ? c.text : formatJSDocLink(c); }).join("");
12805
12809
  }
12806
12810
  ts.getTextOfJSDocComment = getTextOfJSDocComment;
12807
12811
  function formatJSDocLink(link) {
12808
- var kind = link.kind === 322 /* JSDocLink */ ? "link"
12809
- : link.kind === 323 /* JSDocLinkCode */ ? "linkcode"
12812
+ var kind = link.kind === 323 /* JSDocLink */ ? "link"
12813
+ : link.kind === 324 /* JSDocLinkCode */ ? "linkcode"
12810
12814
  : "linkplain";
12811
12815
  var name = link.name ? ts.entityNameToString(link.name) : "";
12812
12816
  var space = link.name && link.text.startsWith("://") ? "" : " ";
@@ -12821,7 +12825,7 @@ var ts;
12821
12825
  return ts.emptyArray;
12822
12826
  }
12823
12827
  if (ts.isJSDocTypeAlias(node)) {
12824
- ts.Debug.assert(node.parent.kind === 318 /* JSDocComment */);
12828
+ ts.Debug.assert(node.parent.kind === 319 /* JSDocComment */);
12825
12829
  return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
12826
12830
  }
12827
12831
  if (node.typeParameters) {
@@ -12935,8 +12939,8 @@ var ts;
12935
12939
  ts.isNamedExportBindings = isNamedExportBindings;
12936
12940
  function isUnparsedTextLike(node) {
12937
12941
  switch (node.kind) {
12938
- case 300 /* UnparsedText */:
12939
- case 301 /* UnparsedInternalText */:
12942
+ case 301 /* UnparsedText */:
12943
+ case 302 /* UnparsedInternalText */:
12940
12944
  return true;
12941
12945
  default:
12942
12946
  return false;
@@ -12945,12 +12949,12 @@ var ts;
12945
12949
  ts.isUnparsedTextLike = isUnparsedTextLike;
12946
12950
  function isUnparsedNode(node) {
12947
12951
  return isUnparsedTextLike(node) ||
12948
- node.kind === 298 /* UnparsedPrologue */ ||
12949
- node.kind === 302 /* UnparsedSyntheticReference */;
12952
+ node.kind === 299 /* UnparsedPrologue */ ||
12953
+ node.kind === 303 /* UnparsedSyntheticReference */;
12950
12954
  }
12951
12955
  ts.isUnparsedNode = isUnparsedNode;
12952
12956
  function isJSDocPropertyLikeTag(node) {
12953
- return node.kind === 345 /* JSDocPropertyTag */ || node.kind === 338 /* JSDocParameterTag */;
12957
+ return node.kind === 346 /* JSDocPropertyTag */ || node.kind === 339 /* JSDocParameterTag */;
12954
12958
  }
12955
12959
  ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag;
12956
12960
  // #endregion
@@ -13159,11 +13163,11 @@ var ts;
13159
13163
  switch (kind) {
13160
13164
  case 167 /* MethodSignature */:
13161
13165
  case 173 /* CallSignature */:
13162
- case 321 /* JSDocSignature */:
13166
+ case 322 /* JSDocSignature */:
13163
13167
  case 174 /* ConstructSignature */:
13164
13168
  case 175 /* IndexSignature */:
13165
13169
  case 178 /* FunctionType */:
13166
- case 315 /* JSDocFunctionType */:
13170
+ case 316 /* JSDocFunctionType */:
13167
13171
  case 179 /* ConstructorType */:
13168
13172
  return true;
13169
13173
  default:
@@ -13225,9 +13229,9 @@ var ts;
13225
13229
  ts.isClassOrTypeElement = isClassOrTypeElement;
13226
13230
  function isObjectLiteralElementLike(node) {
13227
13231
  var kind = node.kind;
13228
- return kind === 294 /* PropertyAssignment */
13229
- || kind === 295 /* ShorthandPropertyAssignment */
13230
- || kind === 296 /* SpreadAssignment */
13232
+ return kind === 295 /* PropertyAssignment */
13233
+ || kind === 296 /* ShorthandPropertyAssignment */
13234
+ || kind === 297 /* SpreadAssignment */
13231
13235
  || kind === 168 /* MethodDeclaration */
13232
13236
  || kind === 171 /* GetAccessor */
13233
13237
  || kind === 172 /* SetAccessor */;
@@ -13317,9 +13321,9 @@ var ts;
13317
13321
  function isObjectBindingOrAssignmentElement(node) {
13318
13322
  switch (node.kind) {
13319
13323
  case 202 /* BindingElement */:
13320
- case 294 /* PropertyAssignment */: // AssignmentProperty
13321
- case 295 /* ShorthandPropertyAssignment */: // AssignmentProperty
13322
- case 296 /* SpreadAssignment */: // AssignmentRestProperty
13324
+ case 295 /* PropertyAssignment */: // AssignmentProperty
13325
+ case 296 /* ShorthandPropertyAssignment */: // AssignmentProperty
13326
+ case 297 /* SpreadAssignment */: // AssignmentRestProperty
13323
13327
  return true;
13324
13328
  }
13325
13329
  return false;
@@ -13469,8 +13473,8 @@ var ts;
13469
13473
  case 224 /* SpreadElement */:
13470
13474
  case 228 /* AsExpression */:
13471
13475
  case 226 /* OmittedExpression */:
13472
- case 349 /* CommaListExpression */:
13473
- case 348 /* PartiallyEmittedExpression */:
13476
+ case 350 /* CommaListExpression */:
13477
+ case 349 /* PartiallyEmittedExpression */:
13474
13478
  return true;
13475
13479
  default:
13476
13480
  return isUnaryExpressionKind(kind);
@@ -13588,7 +13592,7 @@ var ts;
13588
13592
  || kind === 169 /* ClassStaticBlockDeclaration */
13589
13593
  || kind === 170 /* Constructor */
13590
13594
  || kind === 259 /* EnumDeclaration */
13591
- || kind === 297 /* EnumMember */
13595
+ || kind === 298 /* EnumMember */
13592
13596
  || kind === 274 /* ExportSpecifier */
13593
13597
  || kind === 255 /* FunctionDeclaration */
13594
13598
  || kind === 212 /* FunctionExpression */
@@ -13605,17 +13609,17 @@ var ts;
13605
13609
  || kind === 267 /* NamespaceImport */
13606
13610
  || kind === 273 /* NamespaceExport */
13607
13611
  || kind === 163 /* Parameter */
13608
- || kind === 294 /* PropertyAssignment */
13612
+ || kind === 295 /* PropertyAssignment */
13609
13613
  || kind === 166 /* PropertyDeclaration */
13610
13614
  || kind === 165 /* PropertySignature */
13611
13615
  || kind === 172 /* SetAccessor */
13612
- || kind === 295 /* ShorthandPropertyAssignment */
13616
+ || kind === 296 /* ShorthandPropertyAssignment */
13613
13617
  || kind === 258 /* TypeAliasDeclaration */
13614
13618
  || kind === 162 /* TypeParameter */
13615
13619
  || kind === 253 /* VariableDeclaration */
13616
- || kind === 343 /* JSDocTypedefTag */
13617
- || kind === 336 /* JSDocCallbackTag */
13618
- || kind === 345 /* JSDocPropertyTag */;
13620
+ || kind === 344 /* JSDocTypedefTag */
13621
+ || kind === 337 /* JSDocCallbackTag */
13622
+ || kind === 346 /* JSDocPropertyTag */;
13619
13623
  }
13620
13624
  function isDeclarationStatementKind(kind) {
13621
13625
  return kind === 255 /* FunctionDeclaration */
@@ -13650,14 +13654,14 @@ var ts;
13650
13654
  || kind === 236 /* VariableStatement */
13651
13655
  || kind === 240 /* WhileStatement */
13652
13656
  || kind === 247 /* WithStatement */
13653
- || kind === 347 /* NotEmittedStatement */
13654
- || kind === 351 /* EndOfDeclarationMarker */
13655
- || kind === 350 /* MergeDeclarationMarker */;
13657
+ || kind === 348 /* NotEmittedStatement */
13658
+ || kind === 352 /* EndOfDeclarationMarker */
13659
+ || kind === 351 /* MergeDeclarationMarker */;
13656
13660
  }
13657
13661
  /* @internal */
13658
13662
  function isDeclaration(node) {
13659
13663
  if (node.kind === 162 /* TypeParameter */) {
13660
- return (node.parent && node.parent.kind !== 342 /* JSDocTemplateTag */) || ts.isInJSFile(node);
13664
+ return (node.parent && node.parent.kind !== 343 /* JSDocTemplateTag */) || ts.isInJSFile(node);
13661
13665
  }
13662
13666
  return isDeclarationKind(node.kind);
13663
13667
  }
@@ -13763,14 +13767,14 @@ var ts;
13763
13767
  /** True if node is of some JSDoc syntax kind. */
13764
13768
  /* @internal */
13765
13769
  function isJSDocNode(node) {
13766
- return node.kind >= 307 /* FirstJSDocNode */ && node.kind <= 345 /* LastJSDocNode */;
13770
+ return node.kind >= 308 /* FirstJSDocNode */ && node.kind <= 346 /* LastJSDocNode */;
13767
13771
  }
13768
13772
  ts.isJSDocNode = isJSDocNode;
13769
13773
  /** True if node is of a kind that may contain comment text. */
13770
13774
  function isJSDocCommentContainingNode(node) {
13771
- return node.kind === 318 /* JSDocComment */
13772
- || node.kind === 317 /* JSDocNamepathType */
13773
- || node.kind === 319 /* JSDocText */
13775
+ return node.kind === 319 /* JSDocComment */
13776
+ || node.kind === 318 /* JSDocNamepathType */
13777
+ || node.kind === 320 /* JSDocText */
13774
13778
  || isJSDocLinkLike(node)
13775
13779
  || isJSDocTag(node)
13776
13780
  || ts.isJSDocTypeLiteral(node)
@@ -13780,7 +13784,7 @@ var ts;
13780
13784
  // TODO: determine what this does before making it public.
13781
13785
  /* @internal */
13782
13786
  function isJSDocTag(node) {
13783
- return node.kind >= 325 /* FirstJSDocTagNode */ && node.kind <= 345 /* LastJSDocTagNode */;
13787
+ return node.kind >= 326 /* FirstJSDocTagNode */ && node.kind <= 346 /* LastJSDocTagNode */;
13784
13788
  }
13785
13789
  ts.isJSDocTag = isJSDocTag;
13786
13790
  function isSetAccessor(node) {
@@ -13819,8 +13823,8 @@ var ts;
13819
13823
  case 202 /* BindingElement */:
13820
13824
  case 165 /* PropertySignature */:
13821
13825
  case 166 /* PropertyDeclaration */:
13822
- case 294 /* PropertyAssignment */:
13823
- case 297 /* EnumMember */:
13826
+ case 295 /* PropertyAssignment */:
13827
+ case 298 /* EnumMember */:
13824
13828
  return true;
13825
13829
  default:
13826
13830
  return false;
@@ -13866,7 +13870,7 @@ var ts;
13866
13870
  }
13867
13871
  ts.isStringLiteralLike = isStringLiteralLike;
13868
13872
  function isJSDocLinkLike(node) {
13869
- return node.kind === 322 /* JSDocLink */ || node.kind === 323 /* JSDocLinkCode */ || node.kind === 324 /* JSDocLinkPlain */;
13873
+ return node.kind === 323 /* JSDocLink */ || node.kind === 324 /* JSDocLinkCode */ || node.kind === 325 /* JSDocLinkPlain */;
13870
13874
  }
13871
13875
  ts.isJSDocLinkLike = isJSDocLinkLike;
13872
13876
  // #endregion
@@ -14124,7 +14128,7 @@ var ts;
14124
14128
  }
14125
14129
  }
14126
14130
  function getSourceFileOfNode(node) {
14127
- while (node && node.kind !== 303 /* SourceFile */) {
14131
+ while (node && node.kind !== 304 /* SourceFile */) {
14128
14132
  node = node.parent;
14129
14133
  }
14130
14134
  return node;
@@ -14340,7 +14344,7 @@ var ts;
14340
14344
  // the syntax list itself considers them as normal trivia. Therefore if we simply skip
14341
14345
  // trivia for the list, we may have skipped the JSDocComment as well. So we should process its
14342
14346
  // first child to determine the actual position of its first token.
14343
- if (node.kind === 346 /* SyntaxList */ && node._children.length > 0) {
14347
+ if (node.kind === 347 /* SyntaxList */ && node._children.length > 0) {
14344
14348
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
14345
14349
  }
14346
14350
  return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos,
@@ -14612,7 +14616,7 @@ var ts;
14612
14616
  return !!node && node.kind === 260 /* ModuleDeclaration */ && (!node.body);
14613
14617
  }
14614
14618
  function isBlockScopedContainerTopLevel(node) {
14615
- return node.kind === 303 /* SourceFile */ ||
14619
+ return node.kind === 304 /* SourceFile */ ||
14616
14620
  node.kind === 260 /* ModuleDeclaration */ ||
14617
14621
  ts.isFunctionLikeOrClassStaticBlockDeclaration(node);
14618
14622
  }
@@ -14630,7 +14634,7 @@ var ts;
14630
14634
  // - defined in the top level scope and source file is an external module
14631
14635
  // - defined inside ambient module declaration located in the top level scope and source file not an external module
14632
14636
  switch (node.parent.kind) {
14633
- case 303 /* SourceFile */:
14637
+ case 304 /* SourceFile */:
14634
14638
  return ts.isExternalModule(node.parent);
14635
14639
  case 261 /* ModuleBlock */:
14636
14640
  return isAmbientModule(node.parent.parent) && ts.isSourceFile(node.parent.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
@@ -14689,7 +14693,7 @@ var ts;
14689
14693
  ts.isEffectiveStrictModeSourceFile = isEffectiveStrictModeSourceFile;
14690
14694
  function isBlockScope(node, parentNode) {
14691
14695
  switch (node.kind) {
14692
- case 303 /* SourceFile */:
14696
+ case 304 /* SourceFile */:
14693
14697
  case 262 /* CaseBlock */:
14694
14698
  case 291 /* CatchClause */:
14695
14699
  case 260 /* ModuleDeclaration */:
@@ -14716,9 +14720,9 @@ var ts;
14716
14720
  ts.isBlockScope = isBlockScope;
14717
14721
  function isDeclarationWithTypeParameters(node) {
14718
14722
  switch (node.kind) {
14719
- case 336 /* JSDocCallbackTag */:
14720
- case 343 /* JSDocTypedefTag */:
14721
- case 321 /* JSDocSignature */:
14723
+ case 337 /* JSDocCallbackTag */:
14724
+ case 344 /* JSDocTypedefTag */:
14725
+ case 322 /* JSDocSignature */:
14722
14726
  return true;
14723
14727
  default:
14724
14728
  ts.assertType(node);
@@ -14734,12 +14738,12 @@ var ts;
14734
14738
  case 175 /* IndexSignature */:
14735
14739
  case 178 /* FunctionType */:
14736
14740
  case 179 /* ConstructorType */:
14737
- case 315 /* JSDocFunctionType */:
14741
+ case 316 /* JSDocFunctionType */:
14738
14742
  case 256 /* ClassDeclaration */:
14739
14743
  case 225 /* ClassExpression */:
14740
14744
  case 257 /* InterfaceDeclaration */:
14741
14745
  case 258 /* TypeAliasDeclaration */:
14742
- case 342 /* JSDocTemplateTag */:
14746
+ case 343 /* JSDocTemplateTag */:
14743
14747
  case 255 /* FunctionDeclaration */:
14744
14748
  case 168 /* MethodDeclaration */:
14745
14749
  case 170 /* Constructor */:
@@ -14852,7 +14856,7 @@ var ts;
14852
14856
  else {
14853
14857
  return ts.Debug.assertNever(name.name);
14854
14858
  }
14855
- case 309 /* JSDocMemberName */:
14859
+ case 310 /* JSDocMemberName */:
14856
14860
  return entityNameToString(name.left) + entityNameToString(name.right);
14857
14861
  default:
14858
14862
  return ts.Debug.assertNever(name);
@@ -14956,7 +14960,7 @@ var ts;
14956
14960
  function getErrorSpanForNode(sourceFile, node) {
14957
14961
  var errorNode = node;
14958
14962
  switch (node.kind) {
14959
- case 303 /* SourceFile */:
14963
+ case 304 /* SourceFile */:
14960
14964
  var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false);
14961
14965
  if (pos_1 === sourceFile.text.length) {
14962
14966
  // file is empty - return span for the beginning of the file
@@ -14972,7 +14976,7 @@ var ts;
14972
14976
  case 257 /* InterfaceDeclaration */:
14973
14977
  case 260 /* ModuleDeclaration */:
14974
14978
  case 259 /* EnumDeclaration */:
14975
- case 297 /* EnumMember */:
14979
+ case 298 /* EnumMember */:
14976
14980
  case 255 /* FunctionDeclaration */:
14977
14981
  case 212 /* FunctionExpression */:
14978
14982
  case 168 /* MethodDeclaration */:
@@ -15165,7 +15169,7 @@ var ts;
15165
15169
  return ts.isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
15166
15170
  case 162 /* TypeParameter */:
15167
15171
  return node === parent.constraint;
15168
- case 342 /* JSDocTemplateTag */:
15172
+ case 343 /* JSDocTemplateTag */:
15169
15173
  return node === parent.constraint;
15170
15174
  case 166 /* PropertyDeclaration */:
15171
15175
  case 165 /* PropertySignature */:
@@ -15307,12 +15311,12 @@ var ts;
15307
15311
  if (node) {
15308
15312
  switch (node.kind) {
15309
15313
  case 202 /* BindingElement */:
15310
- case 297 /* EnumMember */:
15314
+ case 298 /* EnumMember */:
15311
15315
  case 163 /* Parameter */:
15312
- case 294 /* PropertyAssignment */:
15316
+ case 295 /* PropertyAssignment */:
15313
15317
  case 166 /* PropertyDeclaration */:
15314
15318
  case 165 /* PropertySignature */:
15315
- case 295 /* ShorthandPropertyAssignment */:
15319
+ case 296 /* ShorthandPropertyAssignment */:
15316
15320
  case 253 /* VariableDeclaration */:
15317
15321
  return true;
15318
15322
  }
@@ -15385,7 +15389,7 @@ var ts;
15385
15389
  ts.isThisTypePredicate = isThisTypePredicate;
15386
15390
  function getPropertyAssignment(objectLiteral, key, key2) {
15387
15391
  return objectLiteral.properties.filter(function (property) {
15388
- if (property.kind === 294 /* PropertyAssignment */) {
15392
+ if (property.kind === 295 /* PropertyAssignment */) {
15389
15393
  var propName = getTextOfPropertyName(property.name);
15390
15394
  return key === propName || (!!key2 && key2 === propName);
15391
15395
  }
@@ -15447,7 +15451,7 @@ var ts;
15447
15451
  }
15448
15452
  ts.getContainingFunctionOrClassStaticBlock = getContainingFunctionOrClassStaticBlock;
15449
15453
  function getThisContainer(node, includeArrowFunctions) {
15450
- ts.Debug.assert(node.kind !== 303 /* SourceFile */);
15454
+ ts.Debug.assert(node.kind !== 304 /* SourceFile */);
15451
15455
  while (true) {
15452
15456
  node = node.parent;
15453
15457
  if (!node) {
@@ -15502,7 +15506,7 @@ var ts;
15502
15506
  case 174 /* ConstructSignature */:
15503
15507
  case 175 /* IndexSignature */:
15504
15508
  case 259 /* EnumDeclaration */:
15505
- case 303 /* SourceFile */:
15509
+ case 304 /* SourceFile */:
15506
15510
  return node;
15507
15511
  }
15508
15512
  }
@@ -15798,7 +15802,7 @@ var ts;
15798
15802
  node = node.parent;
15799
15803
  }
15800
15804
  return node.parent.kind === 180 /* TypeQuery */ || ts.isJSDocLinkLike(node.parent) || ts.isJSDocNameReference(node.parent) || ts.isJSDocMemberName(node.parent) || isJSXTagName(node);
15801
- case 309 /* JSDocMemberName */:
15805
+ case 310 /* JSDocMemberName */:
15802
15806
  while (ts.isJSDocMemberName(node.parent)) {
15803
15807
  node = node.parent;
15804
15808
  }
@@ -15828,8 +15832,8 @@ var ts;
15828
15832
  case 163 /* Parameter */:
15829
15833
  case 166 /* PropertyDeclaration */:
15830
15834
  case 165 /* PropertySignature */:
15831
- case 297 /* EnumMember */:
15832
- case 294 /* PropertyAssignment */:
15835
+ case 298 /* EnumMember */:
15836
+ case 295 /* PropertyAssignment */:
15833
15837
  case 202 /* BindingElement */:
15834
15838
  return parent.initializer === node;
15835
15839
  case 237 /* ExpressionStatement */:
@@ -15862,11 +15866,11 @@ var ts;
15862
15866
  case 164 /* Decorator */:
15863
15867
  case 287 /* JsxExpression */:
15864
15868
  case 286 /* JsxSpreadAttribute */:
15865
- case 296 /* SpreadAssignment */:
15869
+ case 297 /* SpreadAssignment */:
15866
15870
  return true;
15867
15871
  case 227 /* ExpressionWithTypeArguments */:
15868
15872
  return parent.expression === node && !isPartOfTypeNode(parent);
15869
- case 295 /* ShorthandPropertyAssignment */:
15873
+ case 296 /* ShorthandPropertyAssignment */:
15870
15874
  return parent.objectAssignmentInitializer === node;
15871
15875
  default:
15872
15876
  return isExpressionNode(parent);
@@ -16415,8 +16419,8 @@ var ts;
16415
16419
  case 163 /* Parameter */:
16416
16420
  case 168 /* MethodDeclaration */:
16417
16421
  case 167 /* MethodSignature */:
16418
- case 295 /* ShorthandPropertyAssignment */:
16419
- case 294 /* PropertyAssignment */:
16422
+ case 296 /* ShorthandPropertyAssignment */:
16423
+ case 295 /* PropertyAssignment */:
16420
16424
  case 166 /* PropertyDeclaration */:
16421
16425
  case 165 /* PropertySignature */:
16422
16426
  return node.questionToken !== undefined;
@@ -16432,7 +16436,7 @@ var ts;
16432
16436
  }
16433
16437
  ts.isJSDocConstructSignature = isJSDocConstructSignature;
16434
16438
  function isJSDocTypeAlias(node) {
16435
- return node.kind === 343 /* JSDocTypedefTag */ || node.kind === 336 /* JSDocCallbackTag */ || node.kind === 337 /* JSDocEnumTag */;
16439
+ return node.kind === 344 /* JSDocTypedefTag */ || node.kind === 337 /* JSDocCallbackTag */ || node.kind === 338 /* JSDocEnumTag */;
16436
16440
  }
16437
16441
  ts.isJSDocTypeAlias = isJSDocTypeAlias;
16438
16442
  function isTypeAlias(node) {
@@ -16462,7 +16466,7 @@ var ts;
16462
16466
  return v && v.initializer;
16463
16467
  case 166 /* PropertyDeclaration */:
16464
16468
  return node.initializer;
16465
- case 294 /* PropertyAssignment */:
16469
+ case 295 /* PropertyAssignment */:
16466
16470
  return node.initializer;
16467
16471
  }
16468
16472
  }
@@ -16522,7 +16526,7 @@ var ts;
16522
16526
  }
16523
16527
  function getNextJSDocCommentLocation(node) {
16524
16528
  var parent = node.parent;
16525
- if (parent.kind === 294 /* PropertyAssignment */ ||
16529
+ if (parent.kind === 295 /* PropertyAssignment */ ||
16526
16530
  parent.kind === 270 /* ExportAssignment */ ||
16527
16531
  parent.kind === 166 /* PropertyDeclaration */ ||
16528
16532
  parent.kind === 237 /* ExpressionStatement */ && node.kind === 205 /* PropertyAccessExpression */ ||
@@ -16625,7 +16629,7 @@ var ts;
16625
16629
  ts.hasRestParameter = hasRestParameter;
16626
16630
  function isRestParameter(node) {
16627
16631
  var type = ts.isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
16628
- return node.dotDotDotToken !== undefined || !!type && type.kind === 316 /* JSDocVariadicType */;
16632
+ return node.dotDotDotToken !== undefined || !!type && type.kind === 317 /* JSDocVariadicType */;
16629
16633
  }
16630
16634
  ts.isRestParameter = isRestParameter;
16631
16635
  function hasTypeArguments(node) {
@@ -16660,16 +16664,16 @@ var ts;
16660
16664
  case 229 /* NonNullExpression */:
16661
16665
  node = parent;
16662
16666
  break;
16663
- case 296 /* SpreadAssignment */:
16667
+ case 297 /* SpreadAssignment */:
16664
16668
  node = parent.parent;
16665
16669
  break;
16666
- case 295 /* ShorthandPropertyAssignment */:
16670
+ case 296 /* ShorthandPropertyAssignment */:
16667
16671
  if (parent.name !== node) {
16668
16672
  return 0 /* None */;
16669
16673
  }
16670
16674
  node = parent.parent;
16671
16675
  break;
16672
- case 294 /* PropertyAssignment */:
16676
+ case 295 /* PropertyAssignment */:
16673
16677
  if (parent.name === node) {
16674
16678
  return 0 /* None */;
16675
16679
  }
@@ -16829,8 +16833,8 @@ var ts;
16829
16833
  case 167 /* MethodSignature */:
16830
16834
  case 171 /* GetAccessor */:
16831
16835
  case 172 /* SetAccessor */:
16832
- case 297 /* EnumMember */:
16833
- case 294 /* PropertyAssignment */:
16836
+ case 298 /* EnumMember */:
16837
+ case 295 /* PropertyAssignment */:
16834
16838
  case 205 /* PropertyAccessExpression */:
16835
16839
  // Name in member declaration or property name in property access
16836
16840
  return parent.name === node;
@@ -16872,8 +16876,8 @@ var ts;
16872
16876
  node.kind === 270 /* ExportAssignment */ && exportAssignmentIsAlias(node) ||
16873
16877
  ts.isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) ||
16874
16878
  ts.isPropertyAccessExpression(node) && ts.isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableExpression(node.parent.right) ||
16875
- node.kind === 295 /* ShorthandPropertyAssignment */ ||
16876
- node.kind === 294 /* PropertyAssignment */ && isAliasableExpression(node.initializer);
16879
+ node.kind === 296 /* ShorthandPropertyAssignment */ ||
16880
+ node.kind === 295 /* PropertyAssignment */ && isAliasableExpression(node.initializer);
16877
16881
  }
16878
16882
  ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
16879
16883
  function getAliasDeclarationFromName(node) {
@@ -16907,7 +16911,7 @@ var ts;
16907
16911
  }
16908
16912
  ts.getExportAssignmentExpression = getExportAssignmentExpression;
16909
16913
  function getPropertyAssignmentAliasLikeExpression(node) {
16910
- return node.kind === 295 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 294 /* PropertyAssignment */ ? node.initializer :
16914
+ return node.kind === 296 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 295 /* PropertyAssignment */ ? node.initializer :
16911
16915
  node.parent.right;
16912
16916
  }
16913
16917
  ts.getPropertyAssignmentAliasLikeExpression = getPropertyAssignmentAliasLikeExpression;
@@ -17177,7 +17181,7 @@ var ts;
17177
17181
  || kind === 171 /* GetAccessor */
17178
17182
  || kind === 172 /* SetAccessor */
17179
17183
  || kind === 260 /* ModuleDeclaration */
17180
- || kind === 303 /* SourceFile */;
17184
+ || kind === 304 /* SourceFile */;
17181
17185
  }
17182
17186
  ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
17183
17187
  function nodeIsSynthesized(range) {
@@ -17426,7 +17430,7 @@ var ts;
17426
17430
  })(OperatorPrecedence = ts.OperatorPrecedence || (ts.OperatorPrecedence = {}));
17427
17431
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
17428
17432
  switch (nodeKind) {
17429
- case 349 /* CommaListExpression */:
17433
+ case 350 /* CommaListExpression */:
17430
17434
  return 0 /* Comma */;
17431
17435
  case 224 /* SpreadElement */:
17432
17436
  return 1 /* Spread */;
@@ -18226,7 +18230,7 @@ var ts;
18226
18230
  ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
18227
18231
  /** template tags are only available when a typedef isn't already using them */
18228
18232
  function isNonTypeAliasTemplate(tag) {
18229
- return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 318 /* JSDocComment */ && tag.parent.tags.some(isJSDocTypeAlias));
18233
+ return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /* JSDocComment */ && tag.parent.tags.some(isJSDocTypeAlias));
18230
18234
  }
18231
18235
  /**
18232
18236
  * Gets the effective type annotation of the value parameter of a set accessor. If the node
@@ -19145,12 +19149,12 @@ var ts;
19145
19149
  : 0 /* Read */;
19146
19150
  case 205 /* PropertyAccessExpression */:
19147
19151
  return parent.name !== node ? 0 /* Read */ : accessKind(parent);
19148
- case 294 /* PropertyAssignment */: {
19152
+ case 295 /* PropertyAssignment */: {
19149
19153
  var parentAccess = accessKind(parent.parent);
19150
19154
  // In `({ x: varname }) = { x: 1 }`, the left `x` is a read, the right `x` is a write.
19151
19155
  return node === parent.name ? reverseAccessKind(parentAccess) : parentAccess;
19152
19156
  }
19153
- case 295 /* ShorthandPropertyAssignment */:
19157
+ case 296 /* ShorthandPropertyAssignment */:
19154
19158
  // Assume it's the local variable being accessed, since we don't check public properties for --noUnusedLocals.
19155
19159
  return node === parent.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent.parent);
19156
19160
  case 203 /* ArrayLiteralExpression */:
@@ -19317,13 +19321,13 @@ var ts;
19317
19321
  || kind === 152 /* UndefinedKeyword */
19318
19322
  || kind === 143 /* NeverKeyword */
19319
19323
  || kind === 227 /* ExpressionWithTypeArguments */
19320
- || kind === 310 /* JSDocAllType */
19321
- || kind === 311 /* JSDocUnknownType */
19322
- || kind === 312 /* JSDocNullableType */
19323
- || kind === 313 /* JSDocNonNullableType */
19324
- || kind === 314 /* JSDocOptionalType */
19325
- || kind === 315 /* JSDocFunctionType */
19326
- || kind === 316 /* JSDocVariadicType */;
19324
+ || kind === 311 /* JSDocAllType */
19325
+ || kind === 312 /* JSDocUnknownType */
19326
+ || kind === 313 /* JSDocNullableType */
19327
+ || kind === 314 /* JSDocNonNullableType */
19328
+ || kind === 315 /* JSDocOptionalType */
19329
+ || kind === 316 /* JSDocFunctionType */
19330
+ || kind === 317 /* JSDocVariadicType */;
19327
19331
  }
19328
19332
  ts.isTypeNodeKind = isTypeNodeKind;
19329
19333
  function isAccessExpression(node) {
@@ -19383,7 +19387,7 @@ var ts;
19383
19387
  case 206 /* ElementAccessExpression */:
19384
19388
  case 205 /* PropertyAccessExpression */:
19385
19389
  case 229 /* NonNullExpression */:
19386
- case 348 /* PartiallyEmittedExpression */:
19390
+ case 349 /* PartiallyEmittedExpression */:
19387
19391
  node = node.expression;
19388
19392
  continue;
19389
19393
  }
@@ -20771,7 +20775,7 @@ var ts;
20771
20775
  return parent.types;
20772
20776
  case 183 /* TupleType */:
20773
20777
  case 203 /* ArrayLiteralExpression */:
20774
- case 349 /* CommaListExpression */:
20778
+ case 350 /* CommaListExpression */:
20775
20779
  case 268 /* NamedImports */:
20776
20780
  case 272 /* NamedExports */:
20777
20781
  return parent.elements;
@@ -20801,7 +20805,7 @@ var ts;
20801
20805
  return ts.isClassElement(node) ? parent.members : undefined;
20802
20806
  case 259 /* EnumDeclaration */:
20803
20807
  return ts.isEnumMember(node) ? parent.members : undefined;
20804
- case 303 /* SourceFile */:
20808
+ case 304 /* SourceFile */:
20805
20809
  return parent.statements;
20806
20810
  }
20807
20811
  }
@@ -21768,6 +21772,8 @@ var ts;
21768
21772
  updateAssertClause: updateAssertClause,
21769
21773
  createAssertEntry: createAssertEntry,
21770
21774
  updateAssertEntry: updateAssertEntry,
21775
+ createImportTypeAssertionContainer: createImportTypeAssertionContainer,
21776
+ updateImportTypeAssertionContainer: updateImportTypeAssertionContainer,
21771
21777
  createNamespaceImport: createNamespaceImport,
21772
21778
  updateNamespaceImport: updateNamespaceImport,
21773
21779
  createNamespaceExport: createNamespaceExport,
@@ -21788,18 +21794,18 @@ var ts;
21788
21794
  createExternalModuleReference: createExternalModuleReference,
21789
21795
  updateExternalModuleReference: updateExternalModuleReference,
21790
21796
  // lazily load factory members for JSDoc types with similar structure
21791
- get createJSDocAllType() { return getJSDocPrimaryTypeCreateFunction(310 /* JSDocAllType */); },
21792
- get createJSDocUnknownType() { return getJSDocPrimaryTypeCreateFunction(311 /* JSDocUnknownType */); },
21793
- get createJSDocNonNullableType() { return getJSDocUnaryTypeCreateFunction(313 /* JSDocNonNullableType */); },
21794
- get updateJSDocNonNullableType() { return getJSDocUnaryTypeUpdateFunction(313 /* JSDocNonNullableType */); },
21795
- get createJSDocNullableType() { return getJSDocUnaryTypeCreateFunction(312 /* JSDocNullableType */); },
21796
- get updateJSDocNullableType() { return getJSDocUnaryTypeUpdateFunction(312 /* JSDocNullableType */); },
21797
- get createJSDocOptionalType() { return getJSDocUnaryTypeCreateFunction(314 /* JSDocOptionalType */); },
21798
- get updateJSDocOptionalType() { return getJSDocUnaryTypeUpdateFunction(314 /* JSDocOptionalType */); },
21799
- get createJSDocVariadicType() { return getJSDocUnaryTypeCreateFunction(316 /* JSDocVariadicType */); },
21800
- get updateJSDocVariadicType() { return getJSDocUnaryTypeUpdateFunction(316 /* JSDocVariadicType */); },
21801
- get createJSDocNamepathType() { return getJSDocUnaryTypeCreateFunction(317 /* JSDocNamepathType */); },
21802
- get updateJSDocNamepathType() { return getJSDocUnaryTypeUpdateFunction(317 /* JSDocNamepathType */); },
21797
+ get createJSDocAllType() { return getJSDocPrimaryTypeCreateFunction(311 /* JSDocAllType */); },
21798
+ get createJSDocUnknownType() { return getJSDocPrimaryTypeCreateFunction(312 /* JSDocUnknownType */); },
21799
+ get createJSDocNonNullableType() { return getJSDocUnaryTypeCreateFunction(314 /* JSDocNonNullableType */); },
21800
+ get updateJSDocNonNullableType() { return getJSDocUnaryTypeUpdateFunction(314 /* JSDocNonNullableType */); },
21801
+ get createJSDocNullableType() { return getJSDocUnaryTypeCreateFunction(313 /* JSDocNullableType */); },
21802
+ get updateJSDocNullableType() { return getJSDocUnaryTypeUpdateFunction(313 /* JSDocNullableType */); },
21803
+ get createJSDocOptionalType() { return getJSDocUnaryTypeCreateFunction(315 /* JSDocOptionalType */); },
21804
+ get updateJSDocOptionalType() { return getJSDocUnaryTypeUpdateFunction(315 /* JSDocOptionalType */); },
21805
+ get createJSDocVariadicType() { return getJSDocUnaryTypeCreateFunction(317 /* JSDocVariadicType */); },
21806
+ get updateJSDocVariadicType() { return getJSDocUnaryTypeUpdateFunction(317 /* JSDocVariadicType */); },
21807
+ get createJSDocNamepathType() { return getJSDocUnaryTypeCreateFunction(318 /* JSDocNamepathType */); },
21808
+ get updateJSDocNamepathType() { return getJSDocUnaryTypeUpdateFunction(318 /* JSDocNamepathType */); },
21803
21809
  createJSDocFunctionType: createJSDocFunctionType,
21804
21810
  updateJSDocFunctionType: updateJSDocFunctionType,
21805
21811
  createJSDocTypeLiteral: createJSDocTypeLiteral,
@@ -21835,30 +21841,30 @@ var ts;
21835
21841
  createJSDocLinkPlain: createJSDocLinkPlain,
21836
21842
  updateJSDocLinkPlain: updateJSDocLinkPlain,
21837
21843
  // lazily load factory members for JSDoc tags with similar structure
21838
- get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(341 /* JSDocTypeTag */); },
21839
- get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(341 /* JSDocTypeTag */); },
21840
- get createJSDocReturnTag() { return getJSDocTypeLikeTagCreateFunction(339 /* JSDocReturnTag */); },
21841
- get updateJSDocReturnTag() { return getJSDocTypeLikeTagUpdateFunction(339 /* JSDocReturnTag */); },
21842
- get createJSDocThisTag() { return getJSDocTypeLikeTagCreateFunction(340 /* JSDocThisTag */); },
21843
- get updateJSDocThisTag() { return getJSDocTypeLikeTagUpdateFunction(340 /* JSDocThisTag */); },
21844
- get createJSDocEnumTag() { return getJSDocTypeLikeTagCreateFunction(337 /* JSDocEnumTag */); },
21845
- get updateJSDocEnumTag() { return getJSDocTypeLikeTagUpdateFunction(337 /* JSDocEnumTag */); },
21846
- get createJSDocAuthorTag() { return getJSDocSimpleTagCreateFunction(328 /* JSDocAuthorTag */); },
21847
- get updateJSDocAuthorTag() { return getJSDocSimpleTagUpdateFunction(328 /* JSDocAuthorTag */); },
21848
- get createJSDocClassTag() { return getJSDocSimpleTagCreateFunction(330 /* JSDocClassTag */); },
21849
- get updateJSDocClassTag() { return getJSDocSimpleTagUpdateFunction(330 /* JSDocClassTag */); },
21850
- get createJSDocPublicTag() { return getJSDocSimpleTagCreateFunction(331 /* JSDocPublicTag */); },
21851
- get updateJSDocPublicTag() { return getJSDocSimpleTagUpdateFunction(331 /* JSDocPublicTag */); },
21852
- get createJSDocPrivateTag() { return getJSDocSimpleTagCreateFunction(332 /* JSDocPrivateTag */); },
21853
- get updateJSDocPrivateTag() { return getJSDocSimpleTagUpdateFunction(332 /* JSDocPrivateTag */); },
21854
- get createJSDocProtectedTag() { return getJSDocSimpleTagCreateFunction(333 /* JSDocProtectedTag */); },
21855
- get updateJSDocProtectedTag() { return getJSDocSimpleTagUpdateFunction(333 /* JSDocProtectedTag */); },
21856
- get createJSDocReadonlyTag() { return getJSDocSimpleTagCreateFunction(334 /* JSDocReadonlyTag */); },
21857
- get updateJSDocReadonlyTag() { return getJSDocSimpleTagUpdateFunction(334 /* JSDocReadonlyTag */); },
21858
- get createJSDocOverrideTag() { return getJSDocSimpleTagCreateFunction(335 /* JSDocOverrideTag */); },
21859
- get updateJSDocOverrideTag() { return getJSDocSimpleTagUpdateFunction(335 /* JSDocOverrideTag */); },
21860
- get createJSDocDeprecatedTag() { return getJSDocSimpleTagCreateFunction(329 /* JSDocDeprecatedTag */); },
21861
- get updateJSDocDeprecatedTag() { return getJSDocSimpleTagUpdateFunction(329 /* JSDocDeprecatedTag */); },
21844
+ get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(342 /* JSDocTypeTag */); },
21845
+ get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(342 /* JSDocTypeTag */); },
21846
+ get createJSDocReturnTag() { return getJSDocTypeLikeTagCreateFunction(340 /* JSDocReturnTag */); },
21847
+ get updateJSDocReturnTag() { return getJSDocTypeLikeTagUpdateFunction(340 /* JSDocReturnTag */); },
21848
+ get createJSDocThisTag() { return getJSDocTypeLikeTagCreateFunction(341 /* JSDocThisTag */); },
21849
+ get updateJSDocThisTag() { return getJSDocTypeLikeTagUpdateFunction(341 /* JSDocThisTag */); },
21850
+ get createJSDocEnumTag() { return getJSDocTypeLikeTagCreateFunction(338 /* JSDocEnumTag */); },
21851
+ get updateJSDocEnumTag() { return getJSDocTypeLikeTagUpdateFunction(338 /* JSDocEnumTag */); },
21852
+ get createJSDocAuthorTag() { return getJSDocSimpleTagCreateFunction(329 /* JSDocAuthorTag */); },
21853
+ get updateJSDocAuthorTag() { return getJSDocSimpleTagUpdateFunction(329 /* JSDocAuthorTag */); },
21854
+ get createJSDocClassTag() { return getJSDocSimpleTagCreateFunction(331 /* JSDocClassTag */); },
21855
+ get updateJSDocClassTag() { return getJSDocSimpleTagUpdateFunction(331 /* JSDocClassTag */); },
21856
+ get createJSDocPublicTag() { return getJSDocSimpleTagCreateFunction(332 /* JSDocPublicTag */); },
21857
+ get updateJSDocPublicTag() { return getJSDocSimpleTagUpdateFunction(332 /* JSDocPublicTag */); },
21858
+ get createJSDocPrivateTag() { return getJSDocSimpleTagCreateFunction(333 /* JSDocPrivateTag */); },
21859
+ get updateJSDocPrivateTag() { return getJSDocSimpleTagUpdateFunction(333 /* JSDocPrivateTag */); },
21860
+ get createJSDocProtectedTag() { return getJSDocSimpleTagCreateFunction(334 /* JSDocProtectedTag */); },
21861
+ get updateJSDocProtectedTag() { return getJSDocSimpleTagUpdateFunction(334 /* JSDocProtectedTag */); },
21862
+ get createJSDocReadonlyTag() { return getJSDocSimpleTagCreateFunction(335 /* JSDocReadonlyTag */); },
21863
+ get updateJSDocReadonlyTag() { return getJSDocSimpleTagUpdateFunction(335 /* JSDocReadonlyTag */); },
21864
+ get createJSDocOverrideTag() { return getJSDocSimpleTagCreateFunction(336 /* JSDocOverrideTag */); },
21865
+ get updateJSDocOverrideTag() { return getJSDocSimpleTagUpdateFunction(336 /* JSDocOverrideTag */); },
21866
+ get createJSDocDeprecatedTag() { return getJSDocSimpleTagCreateFunction(330 /* JSDocDeprecatedTag */); },
21867
+ get updateJSDocDeprecatedTag() { return getJSDocSimpleTagUpdateFunction(330 /* JSDocDeprecatedTag */); },
21862
21868
  createJSDocUnknownTag: createJSDocUnknownTag,
21863
21869
  updateJSDocUnknownTag: updateJSDocUnknownTag,
21864
21870
  createJSDocText: createJSDocText,
@@ -22065,7 +22071,7 @@ var ts;
22065
22071
  case 171 /* GetAccessor */:
22066
22072
  case 172 /* SetAccessor */:
22067
22073
  case 166 /* PropertyDeclaration */:
22068
- case 294 /* PropertyAssignment */:
22074
+ case 295 /* PropertyAssignment */:
22069
22075
  if (ts.isIdentifier(name)) {
22070
22076
  node.transformFlags |= propagateIdentifierNameFlags(name);
22071
22077
  break;
@@ -23024,25 +23030,33 @@ var ts;
23024
23030
  ? update(createTemplateLiteralType(head, templateSpans), node)
23025
23031
  : node;
23026
23032
  }
23027
- // @api
23028
- function createImportTypeNode(argument, qualifier, typeArguments, isTypeOf) {
23029
- if (isTypeOf === void 0) { isTypeOf = false; }
23033
+ function createImportTypeNode(argument, qualifierOrAssertions, typeArgumentsOrQualifier, isTypeOfOrTypeArguments, isTypeOf) {
23034
+ var assertion = qualifierOrAssertions && qualifierOrAssertions.kind === 294 /* ImportTypeAssertionContainer */ ? qualifierOrAssertions : undefined;
23035
+ var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
23036
+ : typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
23037
+ var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
23038
+ isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : false;
23030
23039
  var node = createBaseNode(199 /* ImportType */);
23031
23040
  node.argument = argument;
23041
+ node.assertions = assertion;
23032
23042
  node.qualifier = qualifier;
23033
23043
  node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
23034
23044
  node.isTypeOf = isTypeOf;
23035
23045
  node.transformFlags = 1 /* ContainsTypeScript */;
23036
23046
  return node;
23037
23047
  }
23038
- // @api
23039
- function updateImportTypeNode(node, argument, qualifier, typeArguments, isTypeOf) {
23040
- if (isTypeOf === void 0) { isTypeOf = node.isTypeOf; }
23048
+ function updateImportTypeNode(node, argument, qualifierOrAssertions, typeArgumentsOrQualifier, isTypeOfOrTypeArguments, isTypeOf) {
23049
+ var assertion = qualifierOrAssertions && qualifierOrAssertions.kind === 294 /* ImportTypeAssertionContainer */ ? qualifierOrAssertions : undefined;
23050
+ var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
23051
+ : typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
23052
+ var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
23053
+ isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : node.isTypeOf;
23041
23054
  return node.argument !== argument
23055
+ || node.assertions !== assertion
23042
23056
  || node.qualifier !== qualifier
23043
23057
  || node.typeArguments !== typeArguments
23044
23058
  || node.isTypeOf !== isTypeOf
23045
- ? update(createImportTypeNode(argument, qualifier, typeArguments, isTypeOf), node)
23059
+ ? update(createImportTypeNode(argument, assertion, qualifier, typeArguments, isTypeOf), node)
23046
23060
  : node;
23047
23061
  }
23048
23062
  // @api
@@ -24629,6 +24643,20 @@ var ts;
24629
24643
  : node;
24630
24644
  }
24631
24645
  // @api
24646
+ function createImportTypeAssertionContainer(clause, multiLine) {
24647
+ var node = createBaseNode(294 /* ImportTypeAssertionContainer */);
24648
+ node.assertClause = clause;
24649
+ node.multiLine = multiLine;
24650
+ return node;
24651
+ }
24652
+ // @api
24653
+ function updateImportTypeAssertionContainer(node, clause, multiLine) {
24654
+ return node.assertClause !== clause
24655
+ || node.multiLine !== multiLine
24656
+ ? update(createImportTypeAssertionContainer(clause, multiLine), node)
24657
+ : node;
24658
+ }
24659
+ // @api
24632
24660
  function createNamespaceImport(name) {
24633
24661
  var node = createBaseNode(267 /* NamespaceImport */);
24634
24662
  node.name = name;
@@ -24826,7 +24854,7 @@ var ts;
24826
24854
  }
24827
24855
  // @api
24828
24856
  function createJSDocFunctionType(parameters, type) {
24829
- var node = createBaseSignatureDeclaration(315 /* JSDocFunctionType */,
24857
+ var node = createBaseSignatureDeclaration(316 /* JSDocFunctionType */,
24830
24858
  /*decorators*/ undefined,
24831
24859
  /*modifiers*/ undefined,
24832
24860
  /*name*/ undefined,
@@ -24843,7 +24871,7 @@ var ts;
24843
24871
  // @api
24844
24872
  function createJSDocTypeLiteral(propertyTags, isArrayType) {
24845
24873
  if (isArrayType === void 0) { isArrayType = false; }
24846
- var node = createBaseNode(320 /* JSDocTypeLiteral */);
24874
+ var node = createBaseNode(321 /* JSDocTypeLiteral */);
24847
24875
  node.jsDocPropertyTags = asNodeArray(propertyTags);
24848
24876
  node.isArrayType = isArrayType;
24849
24877
  return node;
@@ -24857,7 +24885,7 @@ var ts;
24857
24885
  }
24858
24886
  // @api
24859
24887
  function createJSDocTypeExpression(type) {
24860
- var node = createBaseNode(307 /* JSDocTypeExpression */);
24888
+ var node = createBaseNode(308 /* JSDocTypeExpression */);
24861
24889
  node.type = type;
24862
24890
  return node;
24863
24891
  }
@@ -24869,7 +24897,7 @@ var ts;
24869
24897
  }
24870
24898
  // @api
24871
24899
  function createJSDocSignature(typeParameters, parameters, type) {
24872
- var node = createBaseNode(321 /* JSDocSignature */);
24900
+ var node = createBaseNode(322 /* JSDocSignature */);
24873
24901
  node.typeParameters = asNodeArray(typeParameters);
24874
24902
  node.parameters = createNodeArray(parameters);
24875
24903
  node.type = type;
@@ -24898,7 +24926,7 @@ var ts;
24898
24926
  }
24899
24927
  // @api
24900
24928
  function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {
24901
- var node = createBaseJSDocTag(342 /* JSDocTemplateTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("template"), comment);
24929
+ var node = createBaseJSDocTag(343 /* JSDocTemplateTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("template"), comment);
24902
24930
  node.constraint = constraint;
24903
24931
  node.typeParameters = createNodeArray(typeParameters);
24904
24932
  return node;
@@ -24915,7 +24943,7 @@ var ts;
24915
24943
  }
24916
24944
  // @api
24917
24945
  function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) {
24918
- var node = createBaseJSDocTag(343 /* JSDocTypedefTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("typedef"), comment);
24946
+ var node = createBaseJSDocTag(344 /* JSDocTypedefTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("typedef"), comment);
24919
24947
  node.typeExpression = typeExpression;
24920
24948
  node.fullName = fullName;
24921
24949
  node.name = ts.getJSDocTypeAliasName(fullName);
@@ -24933,7 +24961,7 @@ var ts;
24933
24961
  }
24934
24962
  // @api
24935
24963
  function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
24936
- var node = createBaseJSDocTag(338 /* JSDocParameterTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("param"), comment);
24964
+ var node = createBaseJSDocTag(339 /* JSDocParameterTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("param"), comment);
24937
24965
  node.typeExpression = typeExpression;
24938
24966
  node.name = name;
24939
24967
  node.isNameFirst = !!isNameFirst;
@@ -24954,7 +24982,7 @@ var ts;
24954
24982
  }
24955
24983
  // @api
24956
24984
  function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
24957
- var node = createBaseJSDocTag(345 /* JSDocPropertyTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("prop"), comment);
24985
+ var node = createBaseJSDocTag(346 /* JSDocPropertyTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("prop"), comment);
24958
24986
  node.typeExpression = typeExpression;
24959
24987
  node.name = name;
24960
24988
  node.isNameFirst = !!isNameFirst;
@@ -24975,7 +25003,7 @@ var ts;
24975
25003
  }
24976
25004
  // @api
24977
25005
  function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) {
24978
- var node = createBaseJSDocTag(336 /* JSDocCallbackTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("callback"), comment);
25006
+ var node = createBaseJSDocTag(337 /* JSDocCallbackTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("callback"), comment);
24979
25007
  node.typeExpression = typeExpression;
24980
25008
  node.fullName = fullName;
24981
25009
  node.name = ts.getJSDocTypeAliasName(fullName);
@@ -24993,7 +25021,7 @@ var ts;
24993
25021
  }
24994
25022
  // @api
24995
25023
  function createJSDocAugmentsTag(tagName, className, comment) {
24996
- var node = createBaseJSDocTag(326 /* JSDocAugmentsTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("augments"), comment);
25024
+ var node = createBaseJSDocTag(327 /* JSDocAugmentsTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("augments"), comment);
24997
25025
  node.class = className;
24998
25026
  return node;
24999
25027
  }
@@ -25008,13 +25036,13 @@ var ts;
25008
25036
  }
25009
25037
  // @api
25010
25038
  function createJSDocImplementsTag(tagName, className, comment) {
25011
- var node = createBaseJSDocTag(327 /* JSDocImplementsTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("implements"), comment);
25039
+ var node = createBaseJSDocTag(328 /* JSDocImplementsTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("implements"), comment);
25012
25040
  node.class = className;
25013
25041
  return node;
25014
25042
  }
25015
25043
  // @api
25016
25044
  function createJSDocSeeTag(tagName, name, comment) {
25017
- var node = createBaseJSDocTag(344 /* JSDocSeeTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("see"), comment);
25045
+ var node = createBaseJSDocTag(345 /* JSDocSeeTag */, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("see"), comment);
25018
25046
  node.name = name;
25019
25047
  return node;
25020
25048
  }
@@ -25028,7 +25056,7 @@ var ts;
25028
25056
  }
25029
25057
  // @api
25030
25058
  function createJSDocNameReference(name) {
25031
- var node = createBaseNode(308 /* JSDocNameReference */);
25059
+ var node = createBaseNode(309 /* JSDocNameReference */);
25032
25060
  node.name = name;
25033
25061
  return node;
25034
25062
  }
@@ -25040,7 +25068,7 @@ var ts;
25040
25068
  }
25041
25069
  // @api
25042
25070
  function createJSDocMemberName(left, right) {
25043
- var node = createBaseNode(309 /* JSDocMemberName */);
25071
+ var node = createBaseNode(310 /* JSDocMemberName */);
25044
25072
  node.left = left;
25045
25073
  node.right = right;
25046
25074
  node.transformFlags |=
@@ -25057,7 +25085,7 @@ var ts;
25057
25085
  }
25058
25086
  // @api
25059
25087
  function createJSDocLink(name, text) {
25060
- var node = createBaseNode(322 /* JSDocLink */);
25088
+ var node = createBaseNode(323 /* JSDocLink */);
25061
25089
  node.name = name;
25062
25090
  node.text = text;
25063
25091
  return node;
@@ -25070,7 +25098,7 @@ var ts;
25070
25098
  }
25071
25099
  // @api
25072
25100
  function createJSDocLinkCode(name, text) {
25073
- var node = createBaseNode(323 /* JSDocLinkCode */);
25101
+ var node = createBaseNode(324 /* JSDocLinkCode */);
25074
25102
  node.name = name;
25075
25103
  node.text = text;
25076
25104
  return node;
@@ -25083,7 +25111,7 @@ var ts;
25083
25111
  }
25084
25112
  // @api
25085
25113
  function createJSDocLinkPlain(name, text) {
25086
- var node = createBaseNode(324 /* JSDocLinkPlain */);
25114
+ var node = createBaseNode(325 /* JSDocLinkPlain */);
25087
25115
  node.name = name;
25088
25116
  node.text = text;
25089
25117
  return node;
@@ -25155,7 +25183,7 @@ var ts;
25155
25183
  }
25156
25184
  // @api
25157
25185
  function createJSDocUnknownTag(tagName, comment) {
25158
- var node = createBaseJSDocTag(325 /* JSDocTag */, tagName, comment);
25186
+ var node = createBaseJSDocTag(326 /* JSDocTag */, tagName, comment);
25159
25187
  return node;
25160
25188
  }
25161
25189
  // @api
@@ -25167,7 +25195,7 @@ var ts;
25167
25195
  }
25168
25196
  // @api
25169
25197
  function createJSDocText(text) {
25170
- var node = createBaseNode(319 /* JSDocText */);
25198
+ var node = createBaseNode(320 /* JSDocText */);
25171
25199
  node.text = text;
25172
25200
  return node;
25173
25201
  }
@@ -25179,7 +25207,7 @@ var ts;
25179
25207
  }
25180
25208
  // @api
25181
25209
  function createJSDocComment(comment, tags) {
25182
- var node = createBaseNode(318 /* JSDocComment */);
25210
+ var node = createBaseNode(319 /* JSDocComment */);
25183
25211
  node.comment = comment;
25184
25212
  node.tags = asNodeArray(tags);
25185
25213
  return node;
@@ -25478,7 +25506,7 @@ var ts;
25478
25506
  //
25479
25507
  // @api
25480
25508
  function createPropertyAssignment(name, initializer) {
25481
- var node = createBaseNamedDeclaration(294 /* PropertyAssignment */,
25509
+ var node = createBaseNamedDeclaration(295 /* PropertyAssignment */,
25482
25510
  /*decorators*/ undefined,
25483
25511
  /*modifiers*/ undefined, name);
25484
25512
  node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
@@ -25508,7 +25536,7 @@ var ts;
25508
25536
  }
25509
25537
  // @api
25510
25538
  function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
25511
- var node = createBaseNamedDeclaration(295 /* ShorthandPropertyAssignment */,
25539
+ var node = createBaseNamedDeclaration(296 /* ShorthandPropertyAssignment */,
25512
25540
  /*decorators*/ undefined,
25513
25541
  /*modifiers*/ undefined, name);
25514
25542
  node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
@@ -25540,7 +25568,7 @@ var ts;
25540
25568
  }
25541
25569
  // @api
25542
25570
  function createSpreadAssignment(expression) {
25543
- var node = createBaseNode(296 /* SpreadAssignment */);
25571
+ var node = createBaseNode(297 /* SpreadAssignment */);
25544
25572
  node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
25545
25573
  node.transformFlags |=
25546
25574
  propagateChildFlags(node.expression) |
@@ -25559,7 +25587,7 @@ var ts;
25559
25587
  //
25560
25588
  // @api
25561
25589
  function createEnumMember(name, initializer) {
25562
- var node = createBaseNode(297 /* EnumMember */);
25590
+ var node = createBaseNode(298 /* EnumMember */);
25563
25591
  node.name = asName(name);
25564
25592
  node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
25565
25593
  node.transformFlags |=
@@ -25580,7 +25608,7 @@ var ts;
25580
25608
  //
25581
25609
  // @api
25582
25610
  function createSourceFile(statements, endOfFileToken, flags) {
25583
- var node = baseFactory.createBaseSourceFileNode(303 /* SourceFile */);
25611
+ var node = baseFactory.createBaseSourceFileNode(304 /* SourceFile */);
25584
25612
  node.statements = createNodeArray(statements);
25585
25613
  node.endOfFileToken = endOfFileToken;
25586
25614
  node.flags |= flags;
@@ -25597,7 +25625,7 @@ var ts;
25597
25625
  return node;
25598
25626
  }
25599
25627
  function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
25600
- var node = baseFactory.createBaseSourceFileNode(303 /* SourceFile */);
25628
+ var node = baseFactory.createBaseSourceFileNode(304 /* SourceFile */);
25601
25629
  for (var p in source) {
25602
25630
  if (p === "emitNode" || ts.hasProperty(node, p) || !ts.hasProperty(source, p))
25603
25631
  continue;
@@ -25636,7 +25664,7 @@ var ts;
25636
25664
  // @api
25637
25665
  function createBundle(sourceFiles, prepends) {
25638
25666
  if (prepends === void 0) { prepends = ts.emptyArray; }
25639
- var node = createBaseNode(304 /* Bundle */);
25667
+ var node = createBaseNode(305 /* Bundle */);
25640
25668
  node.prepends = prepends;
25641
25669
  node.sourceFiles = sourceFiles;
25642
25670
  return node;
@@ -25651,7 +25679,7 @@ var ts;
25651
25679
  }
25652
25680
  // @api
25653
25681
  function createUnparsedSource(prologues, syntheticReferences, texts) {
25654
- var node = createBaseNode(305 /* UnparsedSource */);
25682
+ var node = createBaseNode(306 /* UnparsedSource */);
25655
25683
  node.prologues = prologues;
25656
25684
  node.syntheticReferences = syntheticReferences;
25657
25685
  node.texts = texts;
@@ -25669,28 +25697,28 @@ var ts;
25669
25697
  }
25670
25698
  // @api
25671
25699
  function createUnparsedPrologue(data) {
25672
- return createBaseUnparsedNode(298 /* UnparsedPrologue */, data);
25700
+ return createBaseUnparsedNode(299 /* UnparsedPrologue */, data);
25673
25701
  }
25674
25702
  // @api
25675
25703
  function createUnparsedPrepend(data, texts) {
25676
- var node = createBaseUnparsedNode(299 /* UnparsedPrepend */, data);
25704
+ var node = createBaseUnparsedNode(300 /* UnparsedPrepend */, data);
25677
25705
  node.texts = texts;
25678
25706
  return node;
25679
25707
  }
25680
25708
  // @api
25681
25709
  function createUnparsedTextLike(data, internal) {
25682
- return createBaseUnparsedNode(internal ? 301 /* UnparsedInternalText */ : 300 /* UnparsedText */, data);
25710
+ return createBaseUnparsedNode(internal ? 302 /* UnparsedInternalText */ : 301 /* UnparsedText */, data);
25683
25711
  }
25684
25712
  // @api
25685
25713
  function createUnparsedSyntheticReference(section) {
25686
- var node = createBaseNode(302 /* UnparsedSyntheticReference */);
25714
+ var node = createBaseNode(303 /* UnparsedSyntheticReference */);
25687
25715
  node.data = section.data;
25688
25716
  node.section = section;
25689
25717
  return node;
25690
25718
  }
25691
25719
  // @api
25692
25720
  function createInputFiles() {
25693
- var node = createBaseNode(306 /* InputFiles */);
25721
+ var node = createBaseNode(307 /* InputFiles */);
25694
25722
  node.javascriptText = "";
25695
25723
  node.declarationText = "";
25696
25724
  return node;
@@ -25709,7 +25737,7 @@ var ts;
25709
25737
  }
25710
25738
  // @api
25711
25739
  function createSyntaxList(children) {
25712
- var node = createBaseNode(346 /* SyntaxList */);
25740
+ var node = createBaseNode(347 /* SyntaxList */);
25713
25741
  node._children = children;
25714
25742
  return node;
25715
25743
  }
@@ -25724,7 +25752,7 @@ var ts;
25724
25752
  */
25725
25753
  // @api
25726
25754
  function createNotEmittedStatement(original) {
25727
- var node = createBaseNode(347 /* NotEmittedStatement */);
25755
+ var node = createBaseNode(348 /* NotEmittedStatement */);
25728
25756
  node.original = original;
25729
25757
  ts.setTextRange(node, original);
25730
25758
  return node;
@@ -25738,7 +25766,7 @@ var ts;
25738
25766
  */
25739
25767
  // @api
25740
25768
  function createPartiallyEmittedExpression(expression, original) {
25741
- var node = createBaseNode(348 /* PartiallyEmittedExpression */);
25769
+ var node = createBaseNode(349 /* PartiallyEmittedExpression */);
25742
25770
  node.expression = expression;
25743
25771
  node.original = original;
25744
25772
  node.transformFlags |=
@@ -25766,7 +25794,7 @@ var ts;
25766
25794
  }
25767
25795
  // @api
25768
25796
  function createCommaListExpression(elements) {
25769
- var node = createBaseNode(349 /* CommaListExpression */);
25797
+ var node = createBaseNode(350 /* CommaListExpression */);
25770
25798
  node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
25771
25799
  node.transformFlags |= propagateChildrenFlags(node.elements);
25772
25800
  return node;
@@ -25783,7 +25811,7 @@ var ts;
25783
25811
  */
25784
25812
  // @api
25785
25813
  function createEndOfDeclarationMarker(original) {
25786
- var node = createBaseNode(351 /* EndOfDeclarationMarker */);
25814
+ var node = createBaseNode(352 /* EndOfDeclarationMarker */);
25787
25815
  node.emitNode = {};
25788
25816
  node.original = original;
25789
25817
  return node;
@@ -25794,14 +25822,14 @@ var ts;
25794
25822
  */
25795
25823
  // @api
25796
25824
  function createMergeDeclarationMarker(original) {
25797
- var node = createBaseNode(350 /* MergeDeclarationMarker */);
25825
+ var node = createBaseNode(351 /* MergeDeclarationMarker */);
25798
25826
  node.emitNode = {};
25799
25827
  node.original = original;
25800
25828
  return node;
25801
25829
  }
25802
25830
  // @api
25803
25831
  function createSyntheticReferenceExpression(expression, thisArg) {
25804
- var node = createBaseNode(352 /* SyntheticReferenceExpression */);
25832
+ var node = createBaseNode(353 /* SyntheticReferenceExpression */);
25805
25833
  node.expression = expression;
25806
25834
  node.thisArg = thisArg;
25807
25835
  node.transformFlags |=
@@ -25823,7 +25851,7 @@ var ts;
25823
25851
  if (node === undefined) {
25824
25852
  return node;
25825
25853
  }
25826
- var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(303 /* SourceFile */) :
25854
+ var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(304 /* SourceFile */) :
25827
25855
  ts.isIdentifier(node) ? baseFactory.createBaseIdentifierNode(79 /* Identifier */) :
25828
25856
  ts.isPrivateIdentifier(node) ? baseFactory.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) :
25829
25857
  !ts.isNodeKind(node.kind) ? baseFactory.createBaseTokenNode(node.kind) :
@@ -25946,7 +25974,7 @@ var ts;
25946
25974
  case 210 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression);
25947
25975
  case 228 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type);
25948
25976
  case 229 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression);
25949
- case 348 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression);
25977
+ case 349 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression);
25950
25978
  }
25951
25979
  }
25952
25980
  /**
@@ -26432,24 +26460,24 @@ var ts;
26432
26460
  }
26433
26461
  function getDefaultTagNameForKind(kind) {
26434
26462
  switch (kind) {
26435
- case 341 /* JSDocTypeTag */: return "type";
26436
- case 339 /* JSDocReturnTag */: return "returns";
26437
- case 340 /* JSDocThisTag */: return "this";
26438
- case 337 /* JSDocEnumTag */: return "enum";
26439
- case 328 /* JSDocAuthorTag */: return "author";
26440
- case 330 /* JSDocClassTag */: return "class";
26441
- case 331 /* JSDocPublicTag */: return "public";
26442
- case 332 /* JSDocPrivateTag */: return "private";
26443
- case 333 /* JSDocProtectedTag */: return "protected";
26444
- case 334 /* JSDocReadonlyTag */: return "readonly";
26445
- case 335 /* JSDocOverrideTag */: return "override";
26446
- case 342 /* JSDocTemplateTag */: return "template";
26447
- case 343 /* JSDocTypedefTag */: return "typedef";
26448
- case 338 /* JSDocParameterTag */: return "param";
26449
- case 345 /* JSDocPropertyTag */: return "prop";
26450
- case 336 /* JSDocCallbackTag */: return "callback";
26451
- case 326 /* JSDocAugmentsTag */: return "augments";
26452
- case 327 /* JSDocImplementsTag */: return "implements";
26463
+ case 342 /* JSDocTypeTag */: return "type";
26464
+ case 340 /* JSDocReturnTag */: return "returns";
26465
+ case 341 /* JSDocThisTag */: return "this";
26466
+ case 338 /* JSDocEnumTag */: return "enum";
26467
+ case 329 /* JSDocAuthorTag */: return "author";
26468
+ case 331 /* JSDocClassTag */: return "class";
26469
+ case 332 /* JSDocPublicTag */: return "public";
26470
+ case 333 /* JSDocPrivateTag */: return "private";
26471
+ case 334 /* JSDocProtectedTag */: return "protected";
26472
+ case 335 /* JSDocReadonlyTag */: return "readonly";
26473
+ case 336 /* JSDocOverrideTag */: return "override";
26474
+ case 343 /* JSDocTemplateTag */: return "template";
26475
+ case 344 /* JSDocTypedefTag */: return "typedef";
26476
+ case 339 /* JSDocParameterTag */: return "param";
26477
+ case 346 /* JSDocPropertyTag */: return "prop";
26478
+ case 337 /* JSDocCallbackTag */: return "callback";
26479
+ case 327 /* JSDocAugmentsTag */: return "augments";
26480
+ case 328 /* JSDocImplementsTag */: return "implements";
26453
26481
  default:
26454
26482
  return ts.Debug.fail("Unsupported kind: " + ts.Debug.formatSyntaxKind(kind));
26455
26483
  }
@@ -26586,7 +26614,7 @@ var ts;
26586
26614
  return 536887296 /* BindingPatternExcludes */;
26587
26615
  case 210 /* TypeAssertionExpression */:
26588
26616
  case 228 /* AsExpression */:
26589
- case 348 /* PartiallyEmittedExpression */:
26617
+ case 349 /* PartiallyEmittedExpression */:
26590
26618
  case 211 /* ParenthesizedExpression */:
26591
26619
  case 106 /* SuperKeyword */:
26592
26620
  return 536870912 /* OuterExpressionExcludes */;
@@ -26898,7 +26926,7 @@ var ts;
26898
26926
  // To avoid holding onto transformation artifacts, we keep track of any
26899
26927
  // parse tree node we are annotating. This allows us to clean them up after
26900
26928
  // all transformations have completed.
26901
- if (node.kind === 303 /* SourceFile */) {
26929
+ if (node.kind === 304 /* SourceFile */) {
26902
26930
  return node.emitNode = { annotatedNodes: [node] };
26903
26931
  }
26904
26932
  var sourceFile = (_a = ts.getSourceFileOfNode(ts.getParseTreeNode(ts.getSourceFileOfNode(node)))) !== null && _a !== void 0 ? _a : ts.Debug.fail("Could not determine parsed source file.");
@@ -28310,11 +28338,11 @@ var ts;
28310
28338
  }
28311
28339
  ts.isSyntheticExpression = isSyntheticExpression;
28312
28340
  function isPartiallyEmittedExpression(node) {
28313
- return node.kind === 348 /* PartiallyEmittedExpression */;
28341
+ return node.kind === 349 /* PartiallyEmittedExpression */;
28314
28342
  }
28315
28343
  ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
28316
28344
  function isCommaListExpression(node) {
28317
- return node.kind === 349 /* CommaListExpression */;
28345
+ return node.kind === 350 /* CommaListExpression */;
28318
28346
  }
28319
28347
  ts.isCommaListExpression = isCommaListExpression;
28320
28348
  // Misc
@@ -28504,22 +28532,22 @@ var ts;
28504
28532
  }
28505
28533
  ts.isMissingDeclaration = isMissingDeclaration;
28506
28534
  function isNotEmittedStatement(node) {
28507
- return node.kind === 347 /* NotEmittedStatement */;
28535
+ return node.kind === 348 /* NotEmittedStatement */;
28508
28536
  }
28509
28537
  ts.isNotEmittedStatement = isNotEmittedStatement;
28510
28538
  /* @internal */
28511
28539
  function isSyntheticReference(node) {
28512
- return node.kind === 352 /* SyntheticReferenceExpression */;
28540
+ return node.kind === 353 /* SyntheticReferenceExpression */;
28513
28541
  }
28514
28542
  ts.isSyntheticReference = isSyntheticReference;
28515
28543
  /* @internal */
28516
28544
  function isMergeDeclarationMarker(node) {
28517
- return node.kind === 350 /* MergeDeclarationMarker */;
28545
+ return node.kind === 351 /* MergeDeclarationMarker */;
28518
28546
  }
28519
28547
  ts.isMergeDeclarationMarker = isMergeDeclarationMarker;
28520
28548
  /* @internal */
28521
28549
  function isEndOfDeclarationMarker(node) {
28522
- return node.kind === 351 /* EndOfDeclarationMarker */;
28550
+ return node.kind === 352 /* EndOfDeclarationMarker */;
28523
28551
  }
28524
28552
  ts.isEndOfDeclarationMarker = isEndOfDeclarationMarker;
28525
28553
  // Module References
@@ -28591,26 +28619,26 @@ var ts;
28591
28619
  ts.isCatchClause = isCatchClause;
28592
28620
  // Property assignments
28593
28621
  function isPropertyAssignment(node) {
28594
- return node.kind === 294 /* PropertyAssignment */;
28622
+ return node.kind === 295 /* PropertyAssignment */;
28595
28623
  }
28596
28624
  ts.isPropertyAssignment = isPropertyAssignment;
28597
28625
  function isShorthandPropertyAssignment(node) {
28598
- return node.kind === 295 /* ShorthandPropertyAssignment */;
28626
+ return node.kind === 296 /* ShorthandPropertyAssignment */;
28599
28627
  }
28600
28628
  ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
28601
28629
  function isSpreadAssignment(node) {
28602
- return node.kind === 296 /* SpreadAssignment */;
28630
+ return node.kind === 297 /* SpreadAssignment */;
28603
28631
  }
28604
28632
  ts.isSpreadAssignment = isSpreadAssignment;
28605
28633
  // Enum
28606
28634
  function isEnumMember(node) {
28607
- return node.kind === 297 /* EnumMember */;
28635
+ return node.kind === 298 /* EnumMember */;
28608
28636
  }
28609
28637
  ts.isEnumMember = isEnumMember;
28610
28638
  // Unparsed
28611
28639
  // TODO(rbuckton): isUnparsedPrologue
28612
28640
  function isUnparsedPrepend(node) {
28613
- return node.kind === 299 /* UnparsedPrepend */;
28641
+ return node.kind === 300 /* UnparsedPrepend */;
28614
28642
  }
28615
28643
  ts.isUnparsedPrepend = isUnparsedPrepend;
28616
28644
  // TODO(rbuckton): isUnparsedText
@@ -28618,176 +28646,176 @@ var ts;
28618
28646
  // TODO(rbuckton): isUnparsedSyntheticReference
28619
28647
  // Top-level nodes
28620
28648
  function isSourceFile(node) {
28621
- return node.kind === 303 /* SourceFile */;
28649
+ return node.kind === 304 /* SourceFile */;
28622
28650
  }
28623
28651
  ts.isSourceFile = isSourceFile;
28624
28652
  function isBundle(node) {
28625
- return node.kind === 304 /* Bundle */;
28653
+ return node.kind === 305 /* Bundle */;
28626
28654
  }
28627
28655
  ts.isBundle = isBundle;
28628
28656
  function isUnparsedSource(node) {
28629
- return node.kind === 305 /* UnparsedSource */;
28657
+ return node.kind === 306 /* UnparsedSource */;
28630
28658
  }
28631
28659
  ts.isUnparsedSource = isUnparsedSource;
28632
28660
  // TODO(rbuckton): isInputFiles
28633
28661
  // JSDoc Elements
28634
28662
  function isJSDocTypeExpression(node) {
28635
- return node.kind === 307 /* JSDocTypeExpression */;
28663
+ return node.kind === 308 /* JSDocTypeExpression */;
28636
28664
  }
28637
28665
  ts.isJSDocTypeExpression = isJSDocTypeExpression;
28638
28666
  function isJSDocNameReference(node) {
28639
- return node.kind === 308 /* JSDocNameReference */;
28667
+ return node.kind === 309 /* JSDocNameReference */;
28640
28668
  }
28641
28669
  ts.isJSDocNameReference = isJSDocNameReference;
28642
28670
  function isJSDocMemberName(node) {
28643
- return node.kind === 309 /* JSDocMemberName */;
28671
+ return node.kind === 310 /* JSDocMemberName */;
28644
28672
  }
28645
28673
  ts.isJSDocMemberName = isJSDocMemberName;
28646
28674
  function isJSDocLink(node) {
28647
- return node.kind === 322 /* JSDocLink */;
28675
+ return node.kind === 323 /* JSDocLink */;
28648
28676
  }
28649
28677
  ts.isJSDocLink = isJSDocLink;
28650
28678
  function isJSDocLinkCode(node) {
28651
- return node.kind === 323 /* JSDocLinkCode */;
28679
+ return node.kind === 324 /* JSDocLinkCode */;
28652
28680
  }
28653
28681
  ts.isJSDocLinkCode = isJSDocLinkCode;
28654
28682
  function isJSDocLinkPlain(node) {
28655
- return node.kind === 324 /* JSDocLinkPlain */;
28683
+ return node.kind === 325 /* JSDocLinkPlain */;
28656
28684
  }
28657
28685
  ts.isJSDocLinkPlain = isJSDocLinkPlain;
28658
28686
  function isJSDocAllType(node) {
28659
- return node.kind === 310 /* JSDocAllType */;
28687
+ return node.kind === 311 /* JSDocAllType */;
28660
28688
  }
28661
28689
  ts.isJSDocAllType = isJSDocAllType;
28662
28690
  function isJSDocUnknownType(node) {
28663
- return node.kind === 311 /* JSDocUnknownType */;
28691
+ return node.kind === 312 /* JSDocUnknownType */;
28664
28692
  }
28665
28693
  ts.isJSDocUnknownType = isJSDocUnknownType;
28666
28694
  function isJSDocNullableType(node) {
28667
- return node.kind === 312 /* JSDocNullableType */;
28695
+ return node.kind === 313 /* JSDocNullableType */;
28668
28696
  }
28669
28697
  ts.isJSDocNullableType = isJSDocNullableType;
28670
28698
  function isJSDocNonNullableType(node) {
28671
- return node.kind === 313 /* JSDocNonNullableType */;
28699
+ return node.kind === 314 /* JSDocNonNullableType */;
28672
28700
  }
28673
28701
  ts.isJSDocNonNullableType = isJSDocNonNullableType;
28674
28702
  function isJSDocOptionalType(node) {
28675
- return node.kind === 314 /* JSDocOptionalType */;
28703
+ return node.kind === 315 /* JSDocOptionalType */;
28676
28704
  }
28677
28705
  ts.isJSDocOptionalType = isJSDocOptionalType;
28678
28706
  function isJSDocFunctionType(node) {
28679
- return node.kind === 315 /* JSDocFunctionType */;
28707
+ return node.kind === 316 /* JSDocFunctionType */;
28680
28708
  }
28681
28709
  ts.isJSDocFunctionType = isJSDocFunctionType;
28682
28710
  function isJSDocVariadicType(node) {
28683
- return node.kind === 316 /* JSDocVariadicType */;
28711
+ return node.kind === 317 /* JSDocVariadicType */;
28684
28712
  }
28685
28713
  ts.isJSDocVariadicType = isJSDocVariadicType;
28686
28714
  function isJSDocNamepathType(node) {
28687
- return node.kind === 317 /* JSDocNamepathType */;
28715
+ return node.kind === 318 /* JSDocNamepathType */;
28688
28716
  }
28689
28717
  ts.isJSDocNamepathType = isJSDocNamepathType;
28690
28718
  function isJSDoc(node) {
28691
- return node.kind === 318 /* JSDocComment */;
28719
+ return node.kind === 319 /* JSDocComment */;
28692
28720
  }
28693
28721
  ts.isJSDoc = isJSDoc;
28694
28722
  function isJSDocTypeLiteral(node) {
28695
- return node.kind === 320 /* JSDocTypeLiteral */;
28723
+ return node.kind === 321 /* JSDocTypeLiteral */;
28696
28724
  }
28697
28725
  ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
28698
28726
  function isJSDocSignature(node) {
28699
- return node.kind === 321 /* JSDocSignature */;
28727
+ return node.kind === 322 /* JSDocSignature */;
28700
28728
  }
28701
28729
  ts.isJSDocSignature = isJSDocSignature;
28702
28730
  // JSDoc Tags
28703
28731
  function isJSDocAugmentsTag(node) {
28704
- return node.kind === 326 /* JSDocAugmentsTag */;
28732
+ return node.kind === 327 /* JSDocAugmentsTag */;
28705
28733
  }
28706
28734
  ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
28707
28735
  function isJSDocAuthorTag(node) {
28708
- return node.kind === 328 /* JSDocAuthorTag */;
28736
+ return node.kind === 329 /* JSDocAuthorTag */;
28709
28737
  }
28710
28738
  ts.isJSDocAuthorTag = isJSDocAuthorTag;
28711
28739
  function isJSDocClassTag(node) {
28712
- return node.kind === 330 /* JSDocClassTag */;
28740
+ return node.kind === 331 /* JSDocClassTag */;
28713
28741
  }
28714
28742
  ts.isJSDocClassTag = isJSDocClassTag;
28715
28743
  function isJSDocCallbackTag(node) {
28716
- return node.kind === 336 /* JSDocCallbackTag */;
28744
+ return node.kind === 337 /* JSDocCallbackTag */;
28717
28745
  }
28718
28746
  ts.isJSDocCallbackTag = isJSDocCallbackTag;
28719
28747
  function isJSDocPublicTag(node) {
28720
- return node.kind === 331 /* JSDocPublicTag */;
28748
+ return node.kind === 332 /* JSDocPublicTag */;
28721
28749
  }
28722
28750
  ts.isJSDocPublicTag = isJSDocPublicTag;
28723
28751
  function isJSDocPrivateTag(node) {
28724
- return node.kind === 332 /* JSDocPrivateTag */;
28752
+ return node.kind === 333 /* JSDocPrivateTag */;
28725
28753
  }
28726
28754
  ts.isJSDocPrivateTag = isJSDocPrivateTag;
28727
28755
  function isJSDocProtectedTag(node) {
28728
- return node.kind === 333 /* JSDocProtectedTag */;
28756
+ return node.kind === 334 /* JSDocProtectedTag */;
28729
28757
  }
28730
28758
  ts.isJSDocProtectedTag = isJSDocProtectedTag;
28731
28759
  function isJSDocReadonlyTag(node) {
28732
- return node.kind === 334 /* JSDocReadonlyTag */;
28760
+ return node.kind === 335 /* JSDocReadonlyTag */;
28733
28761
  }
28734
28762
  ts.isJSDocReadonlyTag = isJSDocReadonlyTag;
28735
28763
  function isJSDocOverrideTag(node) {
28736
- return node.kind === 335 /* JSDocOverrideTag */;
28764
+ return node.kind === 336 /* JSDocOverrideTag */;
28737
28765
  }
28738
28766
  ts.isJSDocOverrideTag = isJSDocOverrideTag;
28739
28767
  function isJSDocDeprecatedTag(node) {
28740
- return node.kind === 329 /* JSDocDeprecatedTag */;
28768
+ return node.kind === 330 /* JSDocDeprecatedTag */;
28741
28769
  }
28742
28770
  ts.isJSDocDeprecatedTag = isJSDocDeprecatedTag;
28743
28771
  function isJSDocSeeTag(node) {
28744
- return node.kind === 344 /* JSDocSeeTag */;
28772
+ return node.kind === 345 /* JSDocSeeTag */;
28745
28773
  }
28746
28774
  ts.isJSDocSeeTag = isJSDocSeeTag;
28747
28775
  function isJSDocEnumTag(node) {
28748
- return node.kind === 337 /* JSDocEnumTag */;
28776
+ return node.kind === 338 /* JSDocEnumTag */;
28749
28777
  }
28750
28778
  ts.isJSDocEnumTag = isJSDocEnumTag;
28751
28779
  function isJSDocParameterTag(node) {
28752
- return node.kind === 338 /* JSDocParameterTag */;
28780
+ return node.kind === 339 /* JSDocParameterTag */;
28753
28781
  }
28754
28782
  ts.isJSDocParameterTag = isJSDocParameterTag;
28755
28783
  function isJSDocReturnTag(node) {
28756
- return node.kind === 339 /* JSDocReturnTag */;
28784
+ return node.kind === 340 /* JSDocReturnTag */;
28757
28785
  }
28758
28786
  ts.isJSDocReturnTag = isJSDocReturnTag;
28759
28787
  function isJSDocThisTag(node) {
28760
- return node.kind === 340 /* JSDocThisTag */;
28788
+ return node.kind === 341 /* JSDocThisTag */;
28761
28789
  }
28762
28790
  ts.isJSDocThisTag = isJSDocThisTag;
28763
28791
  function isJSDocTypeTag(node) {
28764
- return node.kind === 341 /* JSDocTypeTag */;
28792
+ return node.kind === 342 /* JSDocTypeTag */;
28765
28793
  }
28766
28794
  ts.isJSDocTypeTag = isJSDocTypeTag;
28767
28795
  function isJSDocTemplateTag(node) {
28768
- return node.kind === 342 /* JSDocTemplateTag */;
28796
+ return node.kind === 343 /* JSDocTemplateTag */;
28769
28797
  }
28770
28798
  ts.isJSDocTemplateTag = isJSDocTemplateTag;
28771
28799
  function isJSDocTypedefTag(node) {
28772
- return node.kind === 343 /* JSDocTypedefTag */;
28800
+ return node.kind === 344 /* JSDocTypedefTag */;
28773
28801
  }
28774
28802
  ts.isJSDocTypedefTag = isJSDocTypedefTag;
28775
28803
  function isJSDocUnknownTag(node) {
28776
- return node.kind === 325 /* JSDocTag */;
28804
+ return node.kind === 326 /* JSDocTag */;
28777
28805
  }
28778
28806
  ts.isJSDocUnknownTag = isJSDocUnknownTag;
28779
28807
  function isJSDocPropertyTag(node) {
28780
- return node.kind === 345 /* JSDocPropertyTag */;
28808
+ return node.kind === 346 /* JSDocPropertyTag */;
28781
28809
  }
28782
28810
  ts.isJSDocPropertyTag = isJSDocPropertyTag;
28783
28811
  function isJSDocImplementsTag(node) {
28784
- return node.kind === 327 /* JSDocImplementsTag */;
28812
+ return node.kind === 328 /* JSDocImplementsTag */;
28785
28813
  }
28786
28814
  ts.isJSDocImplementsTag = isJSDocImplementsTag;
28787
28815
  // Synthesized list
28788
28816
  /* @internal */
28789
28817
  function isSyntaxList(n) {
28790
- return n.kind === 346 /* SyntaxList */;
28818
+ return n.kind === 347 /* SyntaxList */;
28791
28819
  }
28792
28820
  ts.isSyntaxList = isSyntaxList;
28793
28821
  })(ts || (ts = {}));
@@ -28989,9 +29017,9 @@ var ts;
28989
29017
  case 171 /* GetAccessor */:
28990
29018
  case 172 /* SetAccessor */:
28991
29019
  return createExpressionForAccessorDeclaration(factory, node.properties, property, receiver, !!node.multiLine);
28992
- case 294 /* PropertyAssignment */:
29020
+ case 295 /* PropertyAssignment */:
28993
29021
  return createExpressionForPropertyAssignment(factory, property, receiver);
28994
- case 295 /* ShorthandPropertyAssignment */:
29022
+ case 296 /* ShorthandPropertyAssignment */:
28995
29023
  return createExpressionForShorthandPropertyAssignment(factory, property, receiver);
28996
29024
  case 168 /* MethodDeclaration */:
28997
29025
  return createExpressionForMethodDeclaration(factory, property, receiver);
@@ -29102,7 +29130,7 @@ var ts;
29102
29130
  ts.startsWithUseStrict = startsWithUseStrict;
29103
29131
  function isCommaSequence(node) {
29104
29132
  return node.kind === 220 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ ||
29105
- node.kind === 349 /* CommaListExpression */;
29133
+ node.kind === 350 /* CommaListExpression */;
29106
29134
  }
29107
29135
  ts.isCommaSequence = isCommaSequence;
29108
29136
  function isJSDocTypeAssertion(node) {
@@ -29130,7 +29158,7 @@ var ts;
29130
29158
  return (kinds & 2 /* TypeAssertions */) !== 0;
29131
29159
  case 229 /* NonNullExpression */:
29132
29160
  return (kinds & 4 /* NonNullAssertions */) !== 0;
29133
- case 348 /* PartiallyEmittedExpression */:
29161
+ case 349 /* PartiallyEmittedExpression */:
29134
29162
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
29135
29163
  }
29136
29164
  return false;
@@ -29374,7 +29402,7 @@ var ts;
29374
29402
  }
29375
29403
  if (ts.isObjectLiteralElementLike(bindingElement)) {
29376
29404
  switch (bindingElement.kind) {
29377
- case 294 /* PropertyAssignment */:
29405
+ case 295 /* PropertyAssignment */:
29378
29406
  // `b` in `({ a: b } = ...)`
29379
29407
  // `b` in `({ a: b = 1 } = ...)`
29380
29408
  // `{b}` in `({ a: {b} } = ...)`
@@ -29386,11 +29414,11 @@ var ts;
29386
29414
  // `b[0]` in `({ a: b[0] } = ...)`
29387
29415
  // `b[0]` in `({ a: b[0] = 1 } = ...)`
29388
29416
  return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
29389
- case 295 /* ShorthandPropertyAssignment */:
29417
+ case 296 /* ShorthandPropertyAssignment */:
29390
29418
  // `a` in `({ a } = ...)`
29391
29419
  // `a` in `({ a = 1 } = ...)`
29392
29420
  return bindingElement.name;
29393
- case 296 /* SpreadAssignment */:
29421
+ case 297 /* SpreadAssignment */:
29394
29422
  // `a` in `({ ...a } = ...)`
29395
29423
  return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
29396
29424
  }
@@ -29427,7 +29455,7 @@ var ts;
29427
29455
  // `...` in `let [...a] = ...`
29428
29456
  return bindingElement.dotDotDotToken;
29429
29457
  case 224 /* SpreadElement */:
29430
- case 296 /* SpreadAssignment */:
29458
+ case 297 /* SpreadAssignment */:
29431
29459
  // `...` in `[...a] = ...`
29432
29460
  return bindingElement;
29433
29461
  }
@@ -29460,7 +29488,7 @@ var ts;
29460
29488
  : propertyName;
29461
29489
  }
29462
29490
  break;
29463
- case 294 /* PropertyAssignment */:
29491
+ case 295 /* PropertyAssignment */:
29464
29492
  // `a` in `({ a: b } = ...)`
29465
29493
  // `[a]` in `({ [a]: b } = ...)`
29466
29494
  // `"a"` in `({ "a": b } = ...)`
@@ -29475,7 +29503,7 @@ var ts;
29475
29503
  : propertyName;
29476
29504
  }
29477
29505
  break;
29478
- case 296 /* SpreadAssignment */:
29506
+ case 297 /* SpreadAssignment */:
29479
29507
  // `a` in `({ ...a } = ...)`
29480
29508
  if (bindingElement.name && ts.isPrivateIdentifier(bindingElement.name)) {
29481
29509
  return ts.Debug.failBadSyntaxKind(bindingElement.name);
@@ -29906,7 +29934,7 @@ var ts;
29906
29934
  visitNode(cbNode, node.constraint) ||
29907
29935
  visitNode(cbNode, node.default) ||
29908
29936
  visitNode(cbNode, node.expression);
29909
- case 295 /* ShorthandPropertyAssignment */:
29937
+ case 296 /* ShorthandPropertyAssignment */:
29910
29938
  return visitNodes(cbNode, cbNodes, node.decorators) ||
29911
29939
  visitNodes(cbNode, cbNodes, node.modifiers) ||
29912
29940
  visitNode(cbNode, node.name) ||
@@ -29914,7 +29942,7 @@ var ts;
29914
29942
  visitNode(cbNode, node.exclamationToken) ||
29915
29943
  visitNode(cbNode, node.equalsToken) ||
29916
29944
  visitNode(cbNode, node.objectAssignmentInitializer);
29917
- case 296 /* SpreadAssignment */:
29945
+ case 297 /* SpreadAssignment */:
29918
29946
  return visitNode(cbNode, node.expression);
29919
29947
  case 163 /* Parameter */:
29920
29948
  return visitNodes(cbNode, cbNodes, node.decorators) ||
@@ -29939,7 +29967,7 @@ var ts;
29939
29967
  visitNode(cbNode, node.questionToken) ||
29940
29968
  visitNode(cbNode, node.type) ||
29941
29969
  visitNode(cbNode, node.initializer);
29942
- case 294 /* PropertyAssignment */:
29970
+ case 295 /* PropertyAssignment */:
29943
29971
  return visitNodes(cbNode, cbNodes, node.decorators) ||
29944
29972
  visitNodes(cbNode, cbNodes, node.modifiers) ||
29945
29973
  visitNode(cbNode, node.name) ||
@@ -30020,8 +30048,11 @@ var ts;
30020
30048
  return visitNode(cbNode, node.typeParameter);
30021
30049
  case 199 /* ImportType */:
30022
30050
  return visitNode(cbNode, node.argument) ||
30051
+ visitNode(cbNode, node.assertions) ||
30023
30052
  visitNode(cbNode, node.qualifier) ||
30024
30053
  visitNodes(cbNode, cbNodes, node.typeArguments);
30054
+ case 294 /* ImportTypeAssertionContainer */:
30055
+ return visitNode(cbNode, node.assertClause);
30025
30056
  case 190 /* ParenthesizedType */:
30026
30057
  case 192 /* TypeOperator */:
30027
30058
  return visitNode(cbNode, node.type);
@@ -30110,7 +30141,7 @@ var ts;
30110
30141
  case 234 /* Block */:
30111
30142
  case 261 /* ModuleBlock */:
30112
30143
  return visitNodes(cbNode, cbNodes, node.statements);
30113
- case 303 /* SourceFile */:
30144
+ case 304 /* SourceFile */:
30114
30145
  return visitNodes(cbNode, cbNodes, node.statements) ||
30115
30146
  visitNode(cbNode, node.endOfFileToken);
30116
30147
  case 236 /* VariableStatement */:
@@ -30203,7 +30234,7 @@ var ts;
30203
30234
  visitNodes(cbNode, cbNodes, node.modifiers) ||
30204
30235
  visitNode(cbNode, node.name) ||
30205
30236
  visitNodes(cbNode, cbNodes, node.members);
30206
- case 297 /* EnumMember */:
30237
+ case 298 /* EnumMember */:
30207
30238
  return visitNode(cbNode, node.name) ||
30208
30239
  visitNode(cbNode, node.initializer);
30209
30240
  case 260 /* ModuleDeclaration */:
@@ -30272,7 +30303,7 @@ var ts;
30272
30303
  return visitNode(cbNode, node.expression);
30273
30304
  case 275 /* MissingDeclaration */:
30274
30305
  return visitNodes(cbNode, cbNodes, node.decorators);
30275
- case 349 /* CommaListExpression */:
30306
+ case 350 /* CommaListExpression */:
30276
30307
  return visitNodes(cbNode, cbNodes, node.elements);
30277
30308
  case 277 /* JsxElement */:
30278
30309
  return visitNode(cbNode, node.openingElement) ||
@@ -30301,29 +30332,29 @@ var ts;
30301
30332
  return visitNode(cbNode, node.tagName);
30302
30333
  case 184 /* OptionalType */:
30303
30334
  case 185 /* RestType */:
30304
- case 307 /* JSDocTypeExpression */:
30305
- case 313 /* JSDocNonNullableType */:
30306
- case 312 /* JSDocNullableType */:
30307
- case 314 /* JSDocOptionalType */:
30308
- case 316 /* JSDocVariadicType */:
30335
+ case 308 /* JSDocTypeExpression */:
30336
+ case 314 /* JSDocNonNullableType */:
30337
+ case 313 /* JSDocNullableType */:
30338
+ case 315 /* JSDocOptionalType */:
30339
+ case 317 /* JSDocVariadicType */:
30309
30340
  return visitNode(cbNode, node.type);
30310
- case 315 /* JSDocFunctionType */:
30341
+ case 316 /* JSDocFunctionType */:
30311
30342
  return visitNodes(cbNode, cbNodes, node.parameters) ||
30312
30343
  visitNode(cbNode, node.type);
30313
- case 318 /* JSDocComment */:
30344
+ case 319 /* JSDocComment */:
30314
30345
  return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
30315
30346
  || visitNodes(cbNode, cbNodes, node.tags);
30316
- case 344 /* JSDocSeeTag */:
30347
+ case 345 /* JSDocSeeTag */:
30317
30348
  return visitNode(cbNode, node.tagName) ||
30318
30349
  visitNode(cbNode, node.name) ||
30319
30350
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30320
- case 308 /* JSDocNameReference */:
30351
+ case 309 /* JSDocNameReference */:
30321
30352
  return visitNode(cbNode, node.name);
30322
- case 309 /* JSDocMemberName */:
30353
+ case 310 /* JSDocMemberName */:
30323
30354
  return visitNode(cbNode, node.left) ||
30324
30355
  visitNode(cbNode, node.right);
30325
- case 338 /* JSDocParameterTag */:
30326
- case 345 /* JSDocPropertyTag */:
30356
+ case 339 /* JSDocParameterTag */:
30357
+ case 346 /* JSDocPropertyTag */:
30327
30358
  return visitNode(cbNode, node.tagName) ||
30328
30359
  (node.isNameFirst
30329
30360
  ? visitNode(cbNode, node.name) ||
@@ -30332,64 +30363,64 @@ var ts;
30332
30363
  : visitNode(cbNode, node.typeExpression) ||
30333
30364
  visitNode(cbNode, node.name) ||
30334
30365
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
30335
- case 328 /* JSDocAuthorTag */:
30366
+ case 329 /* JSDocAuthorTag */:
30336
30367
  return visitNode(cbNode, node.tagName) ||
30337
30368
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30338
- case 327 /* JSDocImplementsTag */:
30369
+ case 328 /* JSDocImplementsTag */:
30339
30370
  return visitNode(cbNode, node.tagName) ||
30340
30371
  visitNode(cbNode, node.class) ||
30341
30372
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30342
- case 326 /* JSDocAugmentsTag */:
30373
+ case 327 /* JSDocAugmentsTag */:
30343
30374
  return visitNode(cbNode, node.tagName) ||
30344
30375
  visitNode(cbNode, node.class) ||
30345
30376
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30346
- case 342 /* JSDocTemplateTag */:
30377
+ case 343 /* JSDocTemplateTag */:
30347
30378
  return visitNode(cbNode, node.tagName) ||
30348
30379
  visitNode(cbNode, node.constraint) ||
30349
30380
  visitNodes(cbNode, cbNodes, node.typeParameters) ||
30350
30381
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30351
- case 343 /* JSDocTypedefTag */:
30382
+ case 344 /* JSDocTypedefTag */:
30352
30383
  return visitNode(cbNode, node.tagName) ||
30353
30384
  (node.typeExpression &&
30354
- node.typeExpression.kind === 307 /* JSDocTypeExpression */
30385
+ node.typeExpression.kind === 308 /* JSDocTypeExpression */
30355
30386
  ? visitNode(cbNode, node.typeExpression) ||
30356
30387
  visitNode(cbNode, node.fullName) ||
30357
30388
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
30358
30389
  : visitNode(cbNode, node.fullName) ||
30359
30390
  visitNode(cbNode, node.typeExpression) ||
30360
30391
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
30361
- case 336 /* JSDocCallbackTag */:
30392
+ case 337 /* JSDocCallbackTag */:
30362
30393
  return visitNode(cbNode, node.tagName) ||
30363
30394
  visitNode(cbNode, node.fullName) ||
30364
30395
  visitNode(cbNode, node.typeExpression) ||
30365
30396
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30366
- case 339 /* JSDocReturnTag */:
30367
- case 341 /* JSDocTypeTag */:
30368
- case 340 /* JSDocThisTag */:
30369
- case 337 /* JSDocEnumTag */:
30397
+ case 340 /* JSDocReturnTag */:
30398
+ case 342 /* JSDocTypeTag */:
30399
+ case 341 /* JSDocThisTag */:
30400
+ case 338 /* JSDocEnumTag */:
30370
30401
  return visitNode(cbNode, node.tagName) ||
30371
30402
  visitNode(cbNode, node.typeExpression) ||
30372
30403
  (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30373
- case 321 /* JSDocSignature */:
30404
+ case 322 /* JSDocSignature */:
30374
30405
  return ts.forEach(node.typeParameters, cbNode) ||
30375
30406
  ts.forEach(node.parameters, cbNode) ||
30376
30407
  visitNode(cbNode, node.type);
30377
- case 322 /* JSDocLink */:
30378
- case 323 /* JSDocLinkCode */:
30379
- case 324 /* JSDocLinkPlain */:
30408
+ case 323 /* JSDocLink */:
30409
+ case 324 /* JSDocLinkCode */:
30410
+ case 325 /* JSDocLinkPlain */:
30380
30411
  return visitNode(cbNode, node.name);
30381
- case 320 /* JSDocTypeLiteral */:
30412
+ case 321 /* JSDocTypeLiteral */:
30382
30413
  return ts.forEach(node.jsDocPropertyTags, cbNode);
30383
- case 325 /* JSDocTag */:
30384
- case 330 /* JSDocClassTag */:
30385
- case 331 /* JSDocPublicTag */:
30386
- case 332 /* JSDocPrivateTag */:
30387
- case 333 /* JSDocProtectedTag */:
30388
- case 334 /* JSDocReadonlyTag */:
30389
- case 329 /* JSDocDeprecatedTag */:
30414
+ case 326 /* JSDocTag */:
30415
+ case 331 /* JSDocClassTag */:
30416
+ case 332 /* JSDocPublicTag */:
30417
+ case 333 /* JSDocPrivateTag */:
30418
+ case 334 /* JSDocProtectedTag */:
30419
+ case 335 /* JSDocReadonlyTag */:
30420
+ case 330 /* JSDocDeprecatedTag */:
30390
30421
  return visitNode(cbNode, node.tagName)
30391
30422
  || (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
30392
- case 348 /* PartiallyEmittedExpression */:
30423
+ case 349 /* PartiallyEmittedExpression */:
30393
30424
  return visitNode(cbNode, node.expression);
30394
30425
  }
30395
30426
  }
@@ -32081,7 +32112,7 @@ var ts;
32081
32112
  return false;
32082
32113
  }
32083
32114
  function isReusableEnumMember(node) {
32084
- return node.kind === 297 /* EnumMember */;
32115
+ return node.kind === 298 /* EnumMember */;
32085
32116
  }
32086
32117
  function isReusableTypeMember(node) {
32087
32118
  if (node) {
@@ -33017,6 +33048,22 @@ var ts;
33017
33048
  nextToken();
33018
33049
  return token() === 100 /* ImportKeyword */;
33019
33050
  }
33051
+ function parseImportTypeAssertions() {
33052
+ var pos = getNodePos();
33053
+ var openBracePosition = scanner.getTokenPos();
33054
+ parseExpected(18 /* OpenBraceToken */);
33055
+ var multiLine = scanner.hasPrecedingLineBreak();
33056
+ parseExpected(129 /* AssertKeyword */);
33057
+ parseExpected(58 /* ColonToken */);
33058
+ var clause = parseAssertClause(/*skipAssertKeyword*/ true);
33059
+ if (!parseExpected(19 /* CloseBraceToken */)) {
33060
+ var lastError = ts.lastOrUndefined(parseDiagnostics);
33061
+ if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
33062
+ ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
33063
+ }
33064
+ }
33065
+ return finishNode(factory.createImportTypeAssertionContainer(clause, multiLine), pos);
33066
+ }
33020
33067
  function parseImportType() {
33021
33068
  sourceFlags |= 1048576 /* PossiblyContainsDynamicImport */;
33022
33069
  var pos = getNodePos();
@@ -33024,10 +33071,14 @@ var ts;
33024
33071
  parseExpected(100 /* ImportKeyword */);
33025
33072
  parseExpected(20 /* OpenParenToken */);
33026
33073
  var type = parseType();
33074
+ var assertions;
33075
+ if (parseOptional(27 /* CommaToken */)) {
33076
+ assertions = parseImportTypeAssertions();
33077
+ }
33027
33078
  parseExpected(21 /* CloseParenToken */);
33028
33079
  var qualifier = parseOptional(24 /* DotToken */) ? parseEntityNameOfTypeReference() : undefined;
33029
33080
  var typeArguments = parseTypeArgumentsOfTypeReference();
33030
- return finishNode(factory.createImportTypeNode(type, qualifier, typeArguments, isTypeOf), pos);
33081
+ return finishNode(factory.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos);
33031
33082
  }
33032
33083
  function nextTokenIsNumericOrBigIntLiteral() {
33033
33084
  nextToken();
@@ -36215,9 +36266,11 @@ var ts;
36215
36266
  var value = parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false);
36216
36267
  return finishNode(factory.createAssertEntry(name, value), pos);
36217
36268
  }
36218
- function parseAssertClause() {
36269
+ function parseAssertClause(skipAssertKeyword) {
36219
36270
  var pos = getNodePos();
36220
- parseExpected(129 /* AssertKeyword */);
36271
+ if (!skipAssertKeyword) {
36272
+ parseExpected(129 /* AssertKeyword */);
36273
+ }
36221
36274
  var openBracePosition = scanner.getTokenPos();
36222
36275
  if (parseExpected(18 /* OpenBraceToken */)) {
36223
36276
  var multiLine = scanner.hasPrecedingLineBreak();
@@ -37105,7 +37158,7 @@ var ts;
37105
37158
  var child = void 0;
37106
37159
  var children = void 0;
37107
37160
  while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) {
37108
- if (child.kind === 338 /* JSDocParameterTag */ || child.kind === 345 /* JSDocPropertyTag */) {
37161
+ if (child.kind === 339 /* JSDocParameterTag */ || child.kind === 346 /* JSDocPropertyTag */) {
37109
37162
  children = ts.append(children, child);
37110
37163
  }
37111
37164
  }
@@ -37228,7 +37281,7 @@ var ts;
37228
37281
  var hasChildren = false;
37229
37282
  while (child = tryParse(function () { return parseChildPropertyTag(indent); })) {
37230
37283
  hasChildren = true;
37231
- if (child.kind === 341 /* JSDocTypeTag */) {
37284
+ if (child.kind === 342 /* JSDocTypeTag */) {
37232
37285
  if (childTypeTag) {
37233
37286
  parseErrorAtCurrentToken(ts.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
37234
37287
  var lastError = ts.lastOrUndefined(parseDiagnostics);
@@ -37299,7 +37352,7 @@ var ts;
37299
37352
  var returnTag = tryParse(function () {
37300
37353
  if (parseOptionalJsdoc(59 /* AtToken */)) {
37301
37354
  var tag = parseTag(indent);
37302
- if (tag && tag.kind === 339 /* JSDocReturnTag */) {
37355
+ if (tag && tag.kind === 340 /* JSDocReturnTag */) {
37303
37356
  return tag;
37304
37357
  }
37305
37358
  }
@@ -37333,7 +37386,7 @@ var ts;
37333
37386
  case 59 /* AtToken */:
37334
37387
  if (canParseTag) {
37335
37388
  var child = tryParseChildTag(target, indent);
37336
- if (child && (child.kind === 338 /* JSDocParameterTag */ || child.kind === 345 /* JSDocPropertyTag */) &&
37389
+ if (child && (child.kind === 339 /* JSDocParameterTag */ || child.kind === 346 /* JSDocPropertyTag */) &&
37337
37390
  target !== 4 /* CallbackParameter */ &&
37338
37391
  name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
37339
37392
  return false;
@@ -40089,7 +40142,7 @@ var ts;
40089
40142
  function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) {
40090
40143
  var result = returnValue ? {} : undefined;
40091
40144
  var _loop_4 = function (element) {
40092
- if (element.kind !== 294 /* PropertyAssignment */) {
40145
+ if (element.kind !== 295 /* PropertyAssignment */) {
40093
40146
  errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element, ts.Diagnostics.Property_assignment_expected));
40094
40147
  return "continue";
40095
40148
  }
@@ -41641,6 +41694,7 @@ var ts;
41641
41694
  * is assumed to be the same as root directory of the project.
41642
41695
  */
41643
41696
  function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache, resolutionMode) {
41697
+ ts.Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");
41644
41698
  var traceEnabled = isTraceEnabled(options, host);
41645
41699
  if (redirectedReference) {
41646
41700
  options = redirectedReference.commandLine.options;
@@ -43759,7 +43813,7 @@ var ts;
43759
43813
  return "__constructor" /* Constructor */;
43760
43814
  case 178 /* FunctionType */:
43761
43815
  case 173 /* CallSignature */:
43762
- case 321 /* JSDocSignature */:
43816
+ case 322 /* JSDocSignature */:
43763
43817
  return "__call" /* Call */;
43764
43818
  case 179 /* ConstructorType */:
43765
43819
  case 174 /* ConstructSignature */:
@@ -43768,7 +43822,7 @@ var ts;
43768
43822
  return "__index" /* Index */;
43769
43823
  case 271 /* ExportDeclaration */:
43770
43824
  return "__export" /* ExportStar */;
43771
- case 303 /* SourceFile */:
43825
+ case 304 /* SourceFile */:
43772
43826
  // json file should behave as
43773
43827
  // module.exports = ...
43774
43828
  return "export=" /* ExportEquals */;
@@ -43779,12 +43833,12 @@ var ts;
43779
43833
  }
43780
43834
  ts.Debug.fail("Unknown binary declaration kind");
43781
43835
  break;
43782
- case 315 /* JSDocFunctionType */:
43836
+ case 316 /* JSDocFunctionType */:
43783
43837
  return (ts.isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */);
43784
43838
  case 163 /* Parameter */:
43785
43839
  // Parameters with names are handled at the top of this function. Parameters
43786
43840
  // without names can only come from JSDocFunctionTypes.
43787
- ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: " + (ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind) + ", expected JSDocFunctionType"; });
43841
+ ts.Debug.assert(node.parent.kind === 316 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: " + (ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind) + ", expected JSDocFunctionType"; });
43788
43842
  var functionType = node.parent;
43789
43843
  var index = functionType.parameters.indexOf(node);
43790
43844
  return "arg" + index;
@@ -44062,7 +44116,7 @@ var ts;
44062
44116
  node.flags |= 512 /* HasExplicitReturn */;
44063
44117
  node.endFlowNode = currentFlow;
44064
44118
  }
44065
- if (node.kind === 303 /* SourceFile */) {
44119
+ if (node.kind === 304 /* SourceFile */) {
44066
44120
  node.flags |= emitFlags;
44067
44121
  node.endFlowNode = currentFlow;
44068
44122
  }
@@ -44201,13 +44255,13 @@ var ts;
44201
44255
  case 229 /* NonNullExpression */:
44202
44256
  bindNonNullExpressionFlow(node);
44203
44257
  break;
44204
- case 343 /* JSDocTypedefTag */:
44205
- case 336 /* JSDocCallbackTag */:
44206
- case 337 /* JSDocEnumTag */:
44258
+ case 344 /* JSDocTypedefTag */:
44259
+ case 337 /* JSDocCallbackTag */:
44260
+ case 338 /* JSDocEnumTag */:
44207
44261
  bindJSDocTypeAlias(node);
44208
44262
  break;
44209
44263
  // In source files and blocks, bind functions first to match hoisting that occurs at runtime
44210
- case 303 /* SourceFile */: {
44264
+ case 304 /* SourceFile */: {
44211
44265
  bindEachFunctionsFirst(node.statements);
44212
44266
  bind(node.endOfFileToken);
44213
44267
  break;
@@ -44221,7 +44275,7 @@ var ts;
44221
44275
  break;
44222
44276
  case 204 /* ObjectLiteralExpression */:
44223
44277
  case 203 /* ArrayLiteralExpression */:
44224
- case 294 /* PropertyAssignment */:
44278
+ case 295 /* PropertyAssignment */:
44225
44279
  case 224 /* SpreadElement */:
44226
44280
  // Carry over whether we are in an assignment pattern of Object and Array literals
44227
44281
  // as well as their children that are valid assignment targets.
@@ -44751,13 +44805,13 @@ var ts;
44751
44805
  else if (node.kind === 204 /* ObjectLiteralExpression */) {
44752
44806
  for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
44753
44807
  var p = _c[_b];
44754
- if (p.kind === 294 /* PropertyAssignment */) {
44808
+ if (p.kind === 295 /* PropertyAssignment */) {
44755
44809
  bindDestructuringTargetFlow(p.initializer);
44756
44810
  }
44757
- else if (p.kind === 295 /* ShorthandPropertyAssignment */) {
44811
+ else if (p.kind === 296 /* ShorthandPropertyAssignment */) {
44758
44812
  bindAssignmentTargetFlow(p.name);
44759
44813
  }
44760
- else if (p.kind === 296 /* SpreadAssignment */) {
44814
+ else if (p.kind === 297 /* SpreadAssignment */) {
44761
44815
  bindAssignmentTargetFlow(p.expression);
44762
44816
  }
44763
44817
  }
@@ -44979,7 +45033,7 @@ var ts;
44979
45033
  }
44980
45034
  function bindJSDocTypeAlias(node) {
44981
45035
  bind(node.tagName);
44982
- if (node.kind !== 337 /* JSDocEnumTag */ && node.fullName) {
45036
+ if (node.kind !== 338 /* JSDocEnumTag */ && node.fullName) {
44983
45037
  // don't bind the type name yet; that's delayed until delayedBindJSDocTypedefTag
44984
45038
  ts.setParent(node.fullName, node);
44985
45039
  ts.setParentRecursive(node.fullName, /*incremental*/ false);
@@ -45103,7 +45157,7 @@ var ts;
45103
45157
  case 259 /* EnumDeclaration */:
45104
45158
  case 204 /* ObjectLiteralExpression */:
45105
45159
  case 181 /* TypeLiteral */:
45106
- case 320 /* JSDocTypeLiteral */:
45160
+ case 321 /* JSDocTypeLiteral */:
45107
45161
  case 285 /* JsxAttributes */:
45108
45162
  return 1 /* IsContainer */;
45109
45163
  case 257 /* InterfaceDeclaration */:
@@ -45112,7 +45166,7 @@ var ts;
45112
45166
  case 258 /* TypeAliasDeclaration */:
45113
45167
  case 194 /* MappedType */:
45114
45168
  return 1 /* IsContainer */ | 32 /* HasLocals */;
45115
- case 303 /* SourceFile */:
45169
+ case 304 /* SourceFile */:
45116
45170
  return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
45117
45171
  case 171 /* GetAccessor */:
45118
45172
  case 172 /* SetAccessor */:
@@ -45125,8 +45179,8 @@ var ts;
45125
45179
  case 255 /* FunctionDeclaration */:
45126
45180
  case 167 /* MethodSignature */:
45127
45181
  case 173 /* CallSignature */:
45128
- case 321 /* JSDocSignature */:
45129
- case 315 /* JSDocFunctionType */:
45182
+ case 322 /* JSDocSignature */:
45183
+ case 316 /* JSDocFunctionType */:
45130
45184
  case 178 /* FunctionType */:
45131
45185
  case 174 /* ConstructSignature */:
45132
45186
  case 175 /* IndexSignature */:
@@ -45181,7 +45235,7 @@ var ts;
45181
45235
  // handlers to take care of declaring these child members.
45182
45236
  case 260 /* ModuleDeclaration */:
45183
45237
  return declareModuleMember(node, symbolFlags, symbolExcludes);
45184
- case 303 /* SourceFile */:
45238
+ case 304 /* SourceFile */:
45185
45239
  return declareSourceFileMember(node, symbolFlags, symbolExcludes);
45186
45240
  case 225 /* ClassExpression */:
45187
45241
  case 256 /* ClassDeclaration */:
@@ -45189,7 +45243,7 @@ var ts;
45189
45243
  case 259 /* EnumDeclaration */:
45190
45244
  return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
45191
45245
  case 181 /* TypeLiteral */:
45192
- case 320 /* JSDocTypeLiteral */:
45246
+ case 321 /* JSDocTypeLiteral */:
45193
45247
  case 204 /* ObjectLiteralExpression */:
45194
45248
  case 257 /* InterfaceDeclaration */:
45195
45249
  case 285 /* JsxAttributes */:
@@ -45203,7 +45257,7 @@ var ts;
45203
45257
  case 179 /* ConstructorType */:
45204
45258
  case 173 /* CallSignature */:
45205
45259
  case 174 /* ConstructSignature */:
45206
- case 321 /* JSDocSignature */:
45260
+ case 322 /* JSDocSignature */:
45207
45261
  case 175 /* IndexSignature */:
45208
45262
  case 168 /* MethodDeclaration */:
45209
45263
  case 167 /* MethodSignature */:
@@ -45213,9 +45267,9 @@ var ts;
45213
45267
  case 255 /* FunctionDeclaration */:
45214
45268
  case 212 /* FunctionExpression */:
45215
45269
  case 213 /* ArrowFunction */:
45216
- case 315 /* JSDocFunctionType */:
45217
- case 343 /* JSDocTypedefTag */:
45218
- case 336 /* JSDocCallbackTag */:
45270
+ case 316 /* JSDocFunctionType */:
45271
+ case 344 /* JSDocTypedefTag */:
45272
+ case 337 /* JSDocCallbackTag */:
45219
45273
  case 169 /* ClassStaticBlockDeclaration */:
45220
45274
  case 258 /* TypeAliasDeclaration */:
45221
45275
  case 194 /* MappedType */:
@@ -45317,7 +45371,7 @@ var ts;
45317
45371
  var seen = new ts.Map();
45318
45372
  for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
45319
45373
  var prop = _a[_i];
45320
- if (prop.kind === 296 /* SpreadAssignment */ || prop.name.kind !== 79 /* Identifier */) {
45374
+ if (prop.kind === 297 /* SpreadAssignment */ || prop.name.kind !== 79 /* Identifier */) {
45321
45375
  continue;
45322
45376
  }
45323
45377
  var identifier = prop.name;
@@ -45329,7 +45383,7 @@ var ts;
45329
45383
  // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
45330
45384
  // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true
45331
45385
  // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields
45332
- var currentKind = prop.kind === 294 /* PropertyAssignment */ || prop.kind === 295 /* ShorthandPropertyAssignment */ || prop.kind === 168 /* MethodDeclaration */
45386
+ var currentKind = prop.kind === 295 /* PropertyAssignment */ || prop.kind === 296 /* ShorthandPropertyAssignment */ || prop.kind === 168 /* MethodDeclaration */
45333
45387
  ? 1 /* Property */
45334
45388
  : 2 /* Accessor */;
45335
45389
  var existingKind = seen.get(identifier.escapedText);
@@ -45360,7 +45414,7 @@ var ts;
45360
45414
  case 260 /* ModuleDeclaration */:
45361
45415
  declareModuleMember(node, symbolFlags, symbolExcludes);
45362
45416
  break;
45363
- case 303 /* SourceFile */:
45417
+ case 304 /* SourceFile */:
45364
45418
  if (ts.isExternalOrCommonJsModule(container)) {
45365
45419
  declareModuleMember(node, symbolFlags, symbolExcludes);
45366
45420
  break;
@@ -45559,7 +45613,7 @@ var ts;
45559
45613
  function checkStrictModeFunctionDeclaration(node) {
45560
45614
  if (languageVersion < 2 /* ES2015 */) {
45561
45615
  // Report error if function is not top level function declaration
45562
- if (blockScopeContainer.kind !== 303 /* SourceFile */ &&
45616
+ if (blockScopeContainer.kind !== 304 /* SourceFile */ &&
45563
45617
  blockScopeContainer.kind !== 260 /* ModuleDeclaration */ &&
45564
45618
  !ts.isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) {
45565
45619
  // We check first if the name is inside class declaration or class expression; if so give explicit message
@@ -45733,7 +45787,7 @@ var ts;
45733
45787
  }
45734
45788
  // falls through
45735
45789
  case 108 /* ThisKeyword */:
45736
- if (currentFlow && (ts.isExpression(node) || parent.kind === 295 /* ShorthandPropertyAssignment */)) {
45790
+ if (currentFlow && (ts.isExpression(node) || parent.kind === 296 /* ShorthandPropertyAssignment */)) {
45737
45791
  node.flowNode = currentFlow;
45738
45792
  }
45739
45793
  return checkContextualIdentifier(node);
@@ -45831,10 +45885,10 @@ var ts;
45831
45885
  case 166 /* PropertyDeclaration */:
45832
45886
  case 165 /* PropertySignature */:
45833
45887
  return bindPropertyWorker(node);
45834
- case 294 /* PropertyAssignment */:
45835
- case 295 /* ShorthandPropertyAssignment */:
45888
+ case 295 /* PropertyAssignment */:
45889
+ case 296 /* ShorthandPropertyAssignment */:
45836
45890
  return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */);
45837
- case 297 /* EnumMember */:
45891
+ case 298 /* EnumMember */:
45838
45892
  return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */);
45839
45893
  case 173 /* CallSignature */:
45840
45894
  case 174 /* ConstructSignature */:
@@ -45856,15 +45910,15 @@ var ts;
45856
45910
  case 172 /* SetAccessor */:
45857
45911
  return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */);
45858
45912
  case 178 /* FunctionType */:
45859
- case 315 /* JSDocFunctionType */:
45860
- case 321 /* JSDocSignature */:
45913
+ case 316 /* JSDocFunctionType */:
45914
+ case 322 /* JSDocSignature */:
45861
45915
  case 179 /* ConstructorType */:
45862
45916
  return bindFunctionOrConstructorType(node);
45863
45917
  case 181 /* TypeLiteral */:
45864
- case 320 /* JSDocTypeLiteral */:
45918
+ case 321 /* JSDocTypeLiteral */:
45865
45919
  case 194 /* MappedType */:
45866
45920
  return bindAnonymousTypeWorker(node);
45867
- case 330 /* JSDocClassTag */:
45921
+ case 331 /* JSDocClassTag */:
45868
45922
  return bindJSDocClassTag(node);
45869
45923
  case 204 /* ObjectLiteralExpression */:
45870
45924
  return bindObjectLiteralExpression(node);
@@ -45922,7 +45976,7 @@ var ts;
45922
45976
  return bindExportDeclaration(node);
45923
45977
  case 270 /* ExportAssignment */:
45924
45978
  return bindExportAssignment(node);
45925
- case 303 /* SourceFile */:
45979
+ case 304 /* SourceFile */:
45926
45980
  updateStrictModeStatementList(node.statements);
45927
45981
  return bindSourceFileIfExternalModule();
45928
45982
  case 234 /* Block */:
@@ -45932,23 +45986,23 @@ var ts;
45932
45986
  // falls through
45933
45987
  case 261 /* ModuleBlock */:
45934
45988
  return updateStrictModeStatementList(node.statements);
45935
- case 338 /* JSDocParameterTag */:
45936
- if (node.parent.kind === 321 /* JSDocSignature */) {
45989
+ case 339 /* JSDocParameterTag */:
45990
+ if (node.parent.kind === 322 /* JSDocSignature */) {
45937
45991
  return bindParameter(node);
45938
45992
  }
45939
- if (node.parent.kind !== 320 /* JSDocTypeLiteral */) {
45993
+ if (node.parent.kind !== 321 /* JSDocTypeLiteral */) {
45940
45994
  break;
45941
45995
  }
45942
45996
  // falls through
45943
- case 345 /* JSDocPropertyTag */:
45997
+ case 346 /* JSDocPropertyTag */:
45944
45998
  var propTag = node;
45945
- var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 314 /* JSDocOptionalType */ ?
45999
+ var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 315 /* JSDocOptionalType */ ?
45946
46000
  4 /* Property */ | 16777216 /* Optional */ :
45947
46001
  4 /* Property */;
45948
46002
  return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */);
45949
- case 343 /* JSDocTypedefTag */:
45950
- case 336 /* JSDocCallbackTag */:
45951
- case 337 /* JSDocEnumTag */:
46003
+ case 344 /* JSDocTypedefTag */:
46004
+ case 337 /* JSDocCallbackTag */:
46005
+ case 338 /* JSDocEnumTag */:
45952
46006
  return (delayedTypeAliases || (delayedTypeAliases = [])).push(node);
45953
46007
  }
45954
46008
  }
@@ -46151,7 +46205,7 @@ var ts;
46151
46205
  declareSymbol(symbolTable, containingClass.symbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* None */, /*isReplaceableByMethod*/ true);
46152
46206
  }
46153
46207
  break;
46154
- case 303 /* SourceFile */:
46208
+ case 304 /* SourceFile */:
46155
46209
  // this.property = assignment in a source file -- declare symbol in exports for a module, in locals for a script
46156
46210
  if (ts.hasDynamicName(node)) {
46157
46211
  break;
@@ -46180,7 +46234,7 @@ var ts;
46180
46234
  if (node.expression.kind === 108 /* ThisKeyword */) {
46181
46235
  bindThisPropertyAssignment(node);
46182
46236
  }
46183
- else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind === 303 /* SourceFile */) {
46237
+ else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind === 304 /* SourceFile */) {
46184
46238
  if (ts.isPrototypeAccess(node.expression)) {
46185
46239
  bindPrototypePropertyAssignment(node, node.parent);
46186
46240
  }
@@ -46220,7 +46274,7 @@ var ts;
46220
46274
  }
46221
46275
  function bindObjectDefinePropertyAssignment(node) {
46222
46276
  var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]);
46223
- var isToplevel = node.parent.parent.kind === 303 /* SourceFile */;
46277
+ var isToplevel = node.parent.parent.kind === 304 /* SourceFile */;
46224
46278
  namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, /*isPrototypeProperty*/ false, /*containerIsClass*/ false);
46225
46279
  bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, /*isPrototypeProperty*/ false);
46226
46280
  }
@@ -46329,8 +46383,8 @@ var ts;
46329
46383
  }
46330
46384
  function isTopLevelNamespaceAssignment(propertyAccess) {
46331
46385
  return ts.isBinaryExpression(propertyAccess.parent)
46332
- ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 303 /* SourceFile */
46333
- : propertyAccess.parent.parent.kind === 303 /* SourceFile */;
46386
+ ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 304 /* SourceFile */
46387
+ : propertyAccess.parent.parent.kind === 304 /* SourceFile */;
46334
46388
  }
46335
46389
  function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
46336
46390
  var namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
@@ -46475,7 +46529,7 @@ var ts;
46475
46529
  }
46476
46530
  }
46477
46531
  function bindParameter(node) {
46478
- if (node.kind === 338 /* JSDocParameterTag */ && container.kind !== 321 /* JSDocSignature */) {
46532
+ if (node.kind === 339 /* JSDocParameterTag */ && container.kind !== 322 /* JSDocSignature */) {
46479
46533
  return;
46480
46534
  }
46481
46535
  if (inStrictMode && !(node.flags & 8388608 /* Ambient */)) {
@@ -48225,7 +48279,7 @@ var ts;
48225
48279
  return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
48226
48280
  }
48227
48281
  function isGlobalSourceFile(node) {
48228
- return node.kind === 303 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
48282
+ return node.kind === 304 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
48229
48283
  }
48230
48284
  function getSymbol(symbols, name, meaning) {
48231
48285
  if (meaning) {
@@ -48480,7 +48534,7 @@ var ts;
48480
48534
  case 168 /* MethodDeclaration */:
48481
48535
  case 171 /* GetAccessor */:
48482
48536
  case 172 /* SetAccessor */:
48483
- case 294 /* PropertyAssignment */:
48537
+ case 295 /* PropertyAssignment */:
48484
48538
  return requiresScopeChangeWorker(node.name);
48485
48539
  case 166 /* PropertyDeclaration */:
48486
48540
  // static properties in classes introduce temporary variables
@@ -48538,13 +48592,13 @@ var ts;
48538
48592
  // - parameters are only in the scope of function body
48539
48593
  // This restriction does not apply to JSDoc comment types because they are parented
48540
48594
  // at a higher level than type parameters would normally be
48541
- if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 318 /* JSDocComment */) {
48595
+ if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /* JSDocComment */) {
48542
48596
  useResult = result.flags & 262144 /* TypeParameter */
48543
48597
  // type parameters are visible in parameter list, return type and type parameter list
48544
48598
  ? lastLocation === location.type ||
48545
48599
  lastLocation.kind === 163 /* Parameter */ ||
48546
- lastLocation.kind === 338 /* JSDocParameterTag */ ||
48547
- lastLocation.kind === 339 /* JSDocReturnTag */ ||
48600
+ lastLocation.kind === 339 /* JSDocParameterTag */ ||
48601
+ lastLocation.kind === 340 /* JSDocReturnTag */ ||
48548
48602
  lastLocation.kind === 162 /* TypeParameter */
48549
48603
  // local types not visible outside the function body
48550
48604
  : false;
@@ -48581,14 +48635,14 @@ var ts;
48581
48635
  }
48582
48636
  withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation);
48583
48637
  switch (location.kind) {
48584
- case 303 /* SourceFile */:
48638
+ case 304 /* SourceFile */:
48585
48639
  if (!ts.isExternalOrCommonJsModule(location))
48586
48640
  break;
48587
48641
  isInExternalModule = true;
48588
48642
  // falls through
48589
48643
  case 260 /* ModuleDeclaration */:
48590
48644
  var moduleExports = ((_a = getSymbolOfNode(location)) === null || _a === void 0 ? void 0 : _a.exports) || emptySymbols;
48591
- if (location.kind === 303 /* SourceFile */ || (ts.isModuleDeclaration(location) && location.flags & 8388608 /* Ambient */ && !ts.isGlobalScopeAugmentation(location))) {
48645
+ if (location.kind === 304 /* SourceFile */ || (ts.isModuleDeclaration(location) && location.flags & 8388608 /* Ambient */ && !ts.isGlobalScopeAugmentation(location))) {
48592
48646
  // It's an external module. First see if the module has an export default and if the local
48593
48647
  // name of that export default matches.
48594
48648
  if (result = moduleExports.get("default" /* Default */)) {
@@ -48765,9 +48819,9 @@ var ts;
48765
48819
  location = location.parent;
48766
48820
  }
48767
48821
  break;
48768
- case 343 /* JSDocTypedefTag */:
48769
- case 336 /* JSDocCallbackTag */:
48770
- case 337 /* JSDocEnumTag */:
48822
+ case 344 /* JSDocTypedefTag */:
48823
+ case 337 /* JSDocCallbackTag */:
48824
+ case 338 /* JSDocEnumTag */:
48771
48825
  // js type aliases do not resolve names from their host, so skip past it
48772
48826
  var root = ts.getJSDocRoot(location);
48773
48827
  if (root) {
@@ -48816,7 +48870,7 @@ var ts;
48816
48870
  }
48817
48871
  if (!result) {
48818
48872
  if (lastLocation) {
48819
- ts.Debug.assert(lastLocation.kind === 303 /* SourceFile */);
48873
+ ts.Debug.assert(lastLocation.kind === 304 /* SourceFile */);
48820
48874
  if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) {
48821
48875
  return lastLocation.symbol;
48822
48876
  }
@@ -49241,8 +49295,8 @@ var ts;
49241
49295
  && node.parent.left === node
49242
49296
  && node.parent.operatorToken.kind === 63 /* EqualsToken */
49243
49297
  && isAliasableOrJsExpression(node.parent.right)
49244
- || node.kind === 295 /* ShorthandPropertyAssignment */
49245
- || node.kind === 294 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer)
49298
+ || node.kind === 296 /* ShorthandPropertyAssignment */
49299
+ || node.kind === 295 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer)
49246
49300
  || ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
49247
49301
  }
49248
49302
  function isAliasableOrJsExpression(e) {
@@ -49646,9 +49700,9 @@ var ts;
49646
49700
  return getTargetOfExportAssignment(node, dontRecursivelyResolve);
49647
49701
  case 263 /* NamespaceExportDeclaration */:
49648
49702
  return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
49649
- case 295 /* ShorthandPropertyAssignment */:
49703
+ case 296 /* ShorthandPropertyAssignment */:
49650
49704
  return resolveEntityName(node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ true, dontRecursivelyResolve);
49651
- case 294 /* PropertyAssignment */:
49705
+ case 295 /* PropertyAssignment */:
49652
49706
  return getTargetOfPropertyAssignment(node, dontRecursivelyResolve);
49653
49707
  case 206 /* ElementAccessExpression */:
49654
49708
  case 205 /* PropertyAccessExpression */:
@@ -50012,7 +50066,7 @@ var ts;
50012
50066
  : undefined;
50013
50067
  }
50014
50068
  function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation) {
50015
- var _a, _b, _c, _d, _e, _f, _g;
50069
+ var _a, _b, _c, _d, _e, _f, _g, _h;
50016
50070
  if (isForAugmentation === void 0) { isForAugmentation = false; }
50017
50071
  if (ts.startsWith(moduleReference, "@types/")) {
50018
50072
  var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
@@ -50049,7 +50103,11 @@ var ts;
50049
50103
  }
50050
50104
  if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
50051
50105
  var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
50052
- if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
50106
+ var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
50107
+ var overrideClause = overrideClauseHost && ts.isImportTypeNode(overrideClauseHost) ? (_g = overrideClauseHost.assertions) === null || _g === void 0 ? void 0 : _g.assertClause : overrideClauseHost === null || overrideClauseHost === void 0 ? void 0 : overrideClauseHost.assertClause;
50108
+ // An override clause will take effect for type-only imports and import types, and allows importing the types across formats, regardless of
50109
+ // normal mode restrictions
50110
+ if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
50053
50111
  error(errorNode, ts.Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
50054
50112
  }
50055
50113
  if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json" /* Json */) {
@@ -50130,10 +50188,10 @@ var ts;
50130
50188
  }
50131
50189
  else if (mode === ts.ModuleKind.ESNext && resolutionIsNode12OrNext && isExtensionlessRelativePathImport) {
50132
50190
  var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
50133
- var suggestedExt = (_g = suggestedExtensions.find(function (_a) {
50191
+ var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
50134
50192
  var actualExt = _a[0], _importExt = _a[1];
50135
50193
  return host.fileExists(absoluteRef_1 + actualExt);
50136
- })) === null || _g === void 0 ? void 0 : _g[1];
50194
+ })) === null || _h === void 0 ? void 0 : _h[1];
50137
50195
  if (suggestedExt) {
50138
50196
  error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
50139
50197
  }
@@ -50201,9 +50259,10 @@ var ts;
50201
50259
  // references a symbol that is at least declared as a module or a variable. The target of the 'export =' may
50202
50260
  // combine other declarations with the module or variable (e.g. a class/module, function/module, interface/variable).
50203
50261
  function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) {
50262
+ var _a;
50204
50263
  var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
50205
50264
  if (!dontResolveAlias && symbol) {
50206
- if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !ts.getDeclarationOfKind(symbol, 303 /* SourceFile */)) {
50265
+ if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !ts.getDeclarationOfKind(symbol, 304 /* SourceFile */)) {
50207
50266
  var compilerOptionName = moduleKind >= ts.ModuleKind.ES2015
50208
50267
  ? "allowSyntheticDefaultImports"
50209
50268
  : "esModuleInterop";
@@ -50219,12 +50278,16 @@ var ts;
50219
50278
  if (defaultOnlyType) {
50220
50279
  return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent);
50221
50280
  }
50222
- if (ts.getESModuleInterop(compilerOptions)) {
50281
+ var targetFile = (_a = moduleSymbol === null || moduleSymbol === void 0 ? void 0 : moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
50282
+ var isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getUsageModeForExpression(reference), targetFile.impliedNodeFormat);
50283
+ if (ts.getESModuleInterop(compilerOptions) || isEsmCjsRef) {
50223
50284
  var sigs = getSignaturesOfStructuredType(type, 0 /* Call */);
50224
50285
  if (!sigs || !sigs.length) {
50225
50286
  sigs = getSignaturesOfStructuredType(type, 1 /* Construct */);
50226
50287
  }
50227
- if ((sigs && sigs.length) || getPropertyOfType(type, "default" /* Default */, /*skipObjectFunctionPropertyAugment*/ true)) {
50288
+ if ((sigs && sigs.length) ||
50289
+ getPropertyOfType(type, "default" /* Default */, /*skipObjectFunctionPropertyAugment*/ true) ||
50290
+ isEsmCjsRef) {
50228
50291
  var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
50229
50292
  return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
50230
50293
  }
@@ -50674,7 +50737,7 @@ var ts;
50674
50737
  }
50675
50738
  }
50676
50739
  switch (location.kind) {
50677
- case 303 /* SourceFile */:
50740
+ case 304 /* SourceFile */:
50678
50741
  if (!ts.isExternalOrCommonJsModule(location)) {
50679
50742
  break;
50680
50743
  }
@@ -50977,10 +51040,10 @@ var ts;
50977
51040
  return node && getSymbolOfNode(node);
50978
51041
  }
50979
51042
  function hasExternalModuleSymbol(declaration) {
50980
- return ts.isAmbientModule(declaration) || (declaration.kind === 303 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
51043
+ return ts.isAmbientModule(declaration) || (declaration.kind === 304 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
50981
51044
  }
50982
51045
  function hasNonGlobalAugmentationExternalModuleSymbol(declaration) {
50983
- return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind === 303 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
51046
+ return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind === 304 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration));
50984
51047
  }
50985
51048
  function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
50986
51049
  var aliasesToMakeVisible;
@@ -51084,7 +51147,7 @@ var ts;
51084
51147
  function symbolToStringWorker(writer) {
51085
51148
  var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); // TODO: GH#18217
51086
51149
  // add neverAsciiEscape for GH#39027
51087
- var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 303 /* SourceFile */ ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
51150
+ var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 304 /* SourceFile */ ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
51088
51151
  var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
51089
51152
  printer.writeNode(4 /* Unspecified */, entity, /*sourceFile*/ sourceFile, writer);
51090
51153
  return writer;
@@ -51554,7 +51617,7 @@ var ts;
51554
51617
  var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) &&
51555
51618
  (symbol.parent || // is exported function symbol
51556
51619
  ts.forEach(symbol.declarations, function (declaration) {
51557
- return declaration.parent.kind === 303 /* SourceFile */ || declaration.parent.kind === 261 /* ModuleBlock */;
51620
+ return declaration.parent.kind === 304 /* SourceFile */ || declaration.parent.kind === 261 /* ModuleBlock */;
51558
51621
  }));
51559
51622
  if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
51560
51623
  // typeof is allowed only for static/non local functions
@@ -51941,8 +52004,8 @@ var ts;
51941
52004
  }
51942
52005
  function preserveCommentsOn(node) {
51943
52006
  var _a;
51944
- if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 345 /* JSDocPropertyTag */; })) {
51945
- var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 345 /* JSDocPropertyTag */; });
52007
+ if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 346 /* JSDocPropertyTag */; })) {
52008
+ var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 346 /* JSDocPropertyTag */; });
51946
52009
  var commentText = ts.getTextOfJSDocComment(d.comment);
51947
52010
  if (commentText) {
51948
52011
  ts.setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
@@ -52100,7 +52163,7 @@ var ts;
52100
52163
  kind === 171 /* GetAccessor */ ? ts.factory.createGetAccessorDeclaration(/*decorators*/ undefined, modifiers, (_c = options === null || options === void 0 ? void 0 : options.name) !== null && _c !== void 0 ? _c : ts.factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ undefined) :
52101
52164
  kind === 172 /* SetAccessor */ ? ts.factory.createSetAccessorDeclaration(/*decorators*/ undefined, modifiers, (_d = options === null || options === void 0 ? void 0 : options.name) !== null && _d !== void 0 ? _d : ts.factory.createIdentifier(""), parameters, /*body*/ undefined) :
52102
52165
  kind === 175 /* IndexSignature */ ? ts.factory.createIndexSignature(/*decorators*/ undefined, modifiers, parameters, returnTypeNode) :
52103
- kind === 315 /* JSDocFunctionType */ ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
52166
+ kind === 316 /* JSDocFunctionType */ ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
52104
52167
  kind === 178 /* FunctionType */ ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
52105
52168
  kind === 179 /* ConstructorType */ ? ts.factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
52106
52169
  kind === 255 /* FunctionDeclaration */ ? ts.factory.createFunctionDeclaration(/*decorators*/ undefined, modifiers, /*asteriskToken*/ undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, /*body*/ undefined) :
@@ -52144,7 +52207,7 @@ var ts;
52144
52207
  function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) {
52145
52208
  var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 163 /* Parameter */);
52146
52209
  if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) {
52147
- parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 338 /* JSDocParameterTag */);
52210
+ parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 339 /* JSDocParameterTag */);
52148
52211
  }
52149
52212
  var parameterType = getTypeOfSymbol(parameterSymbol);
52150
52213
  if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
@@ -52322,13 +52385,13 @@ var ts;
52322
52385
  }
52323
52386
  return top;
52324
52387
  }
52325
- function getSpecifierForModuleSymbol(symbol, context) {
52388
+ function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) {
52326
52389
  var _a;
52327
- var file = ts.getDeclarationOfKind(symbol, 303 /* SourceFile */);
52390
+ var file = ts.getDeclarationOfKind(symbol, 304 /* SourceFile */);
52328
52391
  if (!file) {
52329
52392
  var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); });
52330
52393
  if (equivalentFileSymbol) {
52331
- file = ts.getDeclarationOfKind(equivalentFileSymbol, 303 /* SourceFile */);
52394
+ file = ts.getDeclarationOfKind(equivalentFileSymbol, 304 /* SourceFile */);
52332
52395
  }
52333
52396
  }
52334
52397
  if (file && file.moduleName !== undefined) {
@@ -52357,8 +52420,10 @@ var ts;
52357
52420
  return ts.getSourceFileOfNode(ts.getNonAugmentationDeclaration(symbol)).fileName; // A resolver may not be provided for baselines and errors - in those cases we use the fileName in full
52358
52421
  }
52359
52422
  var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
52423
+ var resolutionMode = overrideImportMode || (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat);
52424
+ var cacheKey = getSpecifierCacheKey(contextFile.path, resolutionMode);
52360
52425
  var links = getSymbolLinks(symbol);
52361
- var specifier = links.specifierCache && links.specifierCache.get(contextFile.path);
52426
+ var specifier = links.specifierCache && links.specifierCache.get(cacheKey);
52362
52427
  if (!specifier) {
52363
52428
  var isBundle_1 = !!ts.outFile(compilerOptions);
52364
52429
  // For declaration bundles, we need to generate absolute paths relative to the common source dir for imports,
@@ -52367,11 +52432,19 @@ var ts;
52367
52432
  // specifier preference
52368
52433
  var moduleResolverHost = context.tracker.moduleResolverHost;
52369
52434
  var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions;
52370
- specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "project-relative", importModuleSpecifierEnding: isBundle_1 ? "minimal" : undefined }));
52435
+ specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
52436
+ importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "project-relative",
52437
+ importModuleSpecifierEnding: isBundle_1 ? "minimal"
52438
+ : resolutionMode === ts.ModuleKind.ESNext ? "js"
52439
+ : undefined,
52440
+ }, { overrideImportMode: overrideImportMode }));
52371
52441
  (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map());
52372
- links.specifierCache.set(contextFile.path, specifier);
52442
+ links.specifierCache.set(cacheKey, specifier);
52373
52443
  }
52374
52444
  return specifier;
52445
+ function getSpecifierCacheKey(path, mode) {
52446
+ return mode === undefined ? path : mode + "|" + path;
52447
+ }
52375
52448
  }
52376
52449
  function symbolToEntityNameNode(symbol) {
52377
52450
  var identifier = ts.factory.createIdentifier(ts.unescapeLeadingUnderscores(symbol.escapedName));
@@ -52384,13 +52457,45 @@ var ts;
52384
52457
  // module is root, must use `ImportTypeNode`
52385
52458
  var nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined;
52386
52459
  var typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context);
52387
- var specifier = getSpecifierForModuleSymbol(chain[0], context);
52460
+ var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
52461
+ var targetFile = ts.getSourceFileOfModule(chain[0]);
52462
+ var specifier = void 0;
52463
+ var assertion = void 0;
52464
+ if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
52465
+ // An `import` type directed at an esm format file is only going to resolve in esm mode - set the esm mode assertion
52466
+ if ((targetFile === null || targetFile === void 0 ? void 0 : targetFile.impliedNodeFormat) === ts.ModuleKind.ESNext && targetFile.impliedNodeFormat !== (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat)) {
52467
+ specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
52468
+ assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
52469
+ ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral("import"))
52470
+ ])));
52471
+ }
52472
+ }
52473
+ if (!specifier) {
52474
+ specifier = getSpecifierForModuleSymbol(chain[0], context);
52475
+ }
52388
52476
  if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
52389
- // If ultimately we can only name the symbol with a reference that dives into a `node_modules` folder, we should error
52390
- // since declaration files with these kinds of references are liable to fail when published :(
52391
- context.encounteredError = true;
52392
- if (context.tracker.reportLikelyUnsafeImportRequiredError) {
52393
- context.tracker.reportLikelyUnsafeImportRequiredError(specifier);
52477
+ var oldSpecifier = specifier;
52478
+ if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
52479
+ // We might be able to write a portable import type using a mode override; try specifier generation again, but with a different mode set
52480
+ var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
52481
+ specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
52482
+ if (specifier.indexOf("/node_modules/") >= 0) {
52483
+ // Still unreachable :(
52484
+ specifier = oldSpecifier;
52485
+ }
52486
+ else {
52487
+ assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
52488
+ ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral(swappedMode === ts.ModuleKind.ESNext ? "import" : "require"))
52489
+ ])));
52490
+ }
52491
+ }
52492
+ if (!assertion) {
52493
+ // If ultimately we can only name the symbol with a reference that dives into a `node_modules` folder, we should error
52494
+ // since declaration files with these kinds of references are liable to fail when published :(
52495
+ context.encounteredError = true;
52496
+ if (context.tracker.reportLikelyUnsafeImportRequiredError) {
52497
+ context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
52498
+ }
52394
52499
  }
52395
52500
  }
52396
52501
  var lit = ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(specifier));
@@ -52402,12 +52507,12 @@ var ts;
52402
52507
  var lastId = ts.isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
52403
52508
  lastId.typeArguments = undefined;
52404
52509
  }
52405
- return ts.factory.createImportTypeNode(lit, nonRootParts, typeParameterNodes, isTypeOf);
52510
+ return ts.factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
52406
52511
  }
52407
52512
  else {
52408
52513
  var splitNode = getTopmostIndexedAccessType(nonRootParts);
52409
52514
  var qualifier = splitNode.objectType.typeName;
52410
- return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
52515
+ return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
52411
52516
  }
52412
52517
  }
52413
52518
  var entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
@@ -52733,7 +52838,7 @@ var ts;
52733
52838
  return transformed === existing ? ts.setTextRange(ts.factory.cloneNode(existing), existing) : transformed;
52734
52839
  function visitExistingNodeTreeSymbols(node) {
52735
52840
  // We don't _actually_ support jsdoc namepath types, emit `any` instead
52736
- if (ts.isJSDocAllType(node) || node.kind === 317 /* JSDocNamepathType */) {
52841
+ if (ts.isJSDocAllType(node) || node.kind === 318 /* JSDocNamepathType */) {
52737
52842
  return ts.factory.createKeywordTypeNode(130 /* AnyKeyword */);
52738
52843
  }
52739
52844
  if (ts.isJSDocUnknownType(node)) {
@@ -53608,7 +53713,7 @@ var ts;
53608
53713
  // We don't know how to serialize this (nested?) binding element
53609
53714
  ts.Debug.failBadSyntaxKind(((_c = node.parent) === null || _c === void 0 ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization");
53610
53715
  break;
53611
- case 295 /* ShorthandPropertyAssignment */:
53716
+ case 296 /* ShorthandPropertyAssignment */:
53612
53717
  if (((_e = (_d = node.parent) === null || _d === void 0 ? void 0 : _d.parent) === null || _e === void 0 ? void 0 : _e.kind) === 220 /* BinaryExpression */) {
53613
53718
  // module.exports = { SomeClass }
53614
53719
  serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), targetName);
@@ -54128,7 +54233,7 @@ var ts;
54128
54233
  ts.isExternalModuleAugmentation(node.parent.parent);
54129
54234
  }
54130
54235
  function isDefaultBindingContext(location) {
54131
- return location.kind === 303 /* SourceFile */ || ts.isAmbientModule(location);
54236
+ return location.kind === 304 /* SourceFile */ || ts.isAmbientModule(location);
54132
54237
  }
54133
54238
  function getNameOfSymbolFromNameType(symbol, context) {
54134
54239
  var nameType = getSymbolLinks(symbol).nameType;
@@ -54214,9 +54319,9 @@ var ts;
54214
54319
  return false;
54215
54320
  function determineIfDeclarationIsVisible() {
54216
54321
  switch (node.kind) {
54217
- case 336 /* JSDocCallbackTag */:
54218
- case 343 /* JSDocTypedefTag */:
54219
- case 337 /* JSDocEnumTag */:
54322
+ case 337 /* JSDocCallbackTag */:
54323
+ case 344 /* JSDocTypedefTag */:
54324
+ case 338 /* JSDocEnumTag */:
54220
54325
  // Top-level jsdoc type aliases are considered exported
54221
54326
  // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file
54222
54327
  return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent));
@@ -54243,7 +54348,7 @@ var ts;
54243
54348
  var parent = getDeclarationContainer(node);
54244
54349
  // If the node is not exported or it is not ambient module element (except import declaration)
54245
54350
  if (!(ts.getCombinedModifierFlags(node) & 1 /* Export */) &&
54246
- !(node.kind !== 264 /* ImportEqualsDeclaration */ && parent.kind !== 303 /* SourceFile */ && parent.flags & 8388608 /* Ambient */)) {
54351
+ !(node.kind !== 264 /* ImportEqualsDeclaration */ && parent.kind !== 304 /* SourceFile */ && parent.flags & 8388608 /* Ambient */)) {
54247
54352
  return isGlobalSourceFile(parent);
54248
54353
  }
54249
54354
  // Exported members/ambient module elements (exception import declaration) are visible if parent is visible
@@ -54287,7 +54392,7 @@ var ts;
54287
54392
  case 162 /* TypeParameter */:
54288
54393
  // Source file and namespace export are always visible
54289
54394
  // falls through
54290
- case 303 /* SourceFile */:
54395
+ case 304 /* SourceFile */:
54291
54396
  case 263 /* NamespaceExportDeclaration */:
54292
54397
  return true;
54293
54398
  // Export assignments do not create name bindings outside the module
@@ -54544,7 +54649,7 @@ var ts;
54544
54649
  var ancestor = node.parent.parent;
54545
54650
  switch (ancestor.kind) {
54546
54651
  case 202 /* BindingElement */:
54547
- case 294 /* PropertyAssignment */:
54652
+ case 295 /* PropertyAssignment */:
54548
54653
  return getSyntheticElementAccess(ancestor);
54549
54654
  case 203 /* ArrayLiteralExpression */:
54550
54655
  return getSyntheticElementAccess(node.parent);
@@ -54559,7 +54664,7 @@ var ts;
54559
54664
  if (node.kind === 202 /* BindingElement */ && parent.kind === 200 /* ObjectBindingPattern */) {
54560
54665
  return getLiteralPropertyNameText(node.propertyName || node.name);
54561
54666
  }
54562
- if (node.kind === 294 /* PropertyAssignment */ || node.kind === 295 /* ShorthandPropertyAssignment */) {
54667
+ if (node.kind === 295 /* PropertyAssignment */ || node.kind === 296 /* ShorthandPropertyAssignment */) {
54563
54668
  return getLiteralPropertyNameText(node.name);
54564
54669
  }
54565
54670
  return "" + parent.elements.indexOf(node);
@@ -55740,16 +55845,16 @@ var ts;
55740
55845
  case 167 /* MethodSignature */:
55741
55846
  case 178 /* FunctionType */:
55742
55847
  case 179 /* ConstructorType */:
55743
- case 315 /* JSDocFunctionType */:
55848
+ case 316 /* JSDocFunctionType */:
55744
55849
  case 255 /* FunctionDeclaration */:
55745
55850
  case 168 /* MethodDeclaration */:
55746
55851
  case 212 /* FunctionExpression */:
55747
55852
  case 213 /* ArrowFunction */:
55748
55853
  case 258 /* TypeAliasDeclaration */:
55749
- case 342 /* JSDocTemplateTag */:
55750
- case 343 /* JSDocTypedefTag */:
55751
- case 337 /* JSDocEnumTag */:
55752
- case 336 /* JSDocCallbackTag */:
55854
+ case 343 /* JSDocTemplateTag */:
55855
+ case 344 /* JSDocTypedefTag */:
55856
+ case 338 /* JSDocEnumTag */:
55857
+ case 337 /* JSDocCallbackTag */:
55753
55858
  case 194 /* MappedType */:
55754
55859
  case 188 /* ConditionalType */: {
55755
55860
  var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
@@ -55765,13 +55870,13 @@ var ts;
55765
55870
  getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
55766
55871
  return thisType ? ts.append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters;
55767
55872
  }
55768
- case 338 /* JSDocParameterTag */:
55873
+ case 339 /* JSDocParameterTag */:
55769
55874
  var paramSymbol = ts.getParameterSymbolFromJSDoc(node);
55770
55875
  if (paramSymbol) {
55771
55876
  node = paramSymbol.valueDeclaration;
55772
55877
  }
55773
55878
  break;
55774
- case 318 /* JSDocComment */: {
55879
+ case 319 /* JSDocComment */: {
55775
55880
  var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
55776
55881
  return node.tags
55777
55882
  ? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
@@ -56164,7 +56269,7 @@ var ts;
56164
56269
  }
56165
56270
  else {
56166
56271
  type = errorType;
56167
- if (declaration.kind === 337 /* JSDocEnumTag */) {
56272
+ if (declaration.kind === 338 /* JSDocEnumTag */) {
56168
56273
  error(declaration.typeExpression.type, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
56169
56274
  }
56170
56275
  else {
@@ -58285,10 +58390,10 @@ var ts;
58285
58390
  function isJSDocOptionalParameter(node) {
58286
58391
  return ts.isInJSFile(node) && (
58287
58392
  // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType
58288
- node.type && node.type.kind === 314 /* JSDocOptionalType */
58393
+ node.type && node.type.kind === 315 /* JSDocOptionalType */
58289
58394
  || ts.getJSDocParameterTags(node).some(function (_a) {
58290
58395
  var isBracketed = _a.isBracketed, typeExpression = _a.typeExpression;
58291
- return isBracketed || !!typeExpression && typeExpression.type.kind === 314 /* JSDocOptionalType */;
58396
+ return isBracketed || !!typeExpression && typeExpression.type.kind === 315 /* JSDocOptionalType */;
58292
58397
  }));
58293
58398
  }
58294
58399
  function tryFindAmbientModule(moduleName, withAugmentations) {
@@ -58328,7 +58433,7 @@ var ts;
58328
58433
  return false;
58329
58434
  }
58330
58435
  var isBracketed = node.isBracketed, typeExpression = node.typeExpression;
58331
- return isBracketed || !!typeExpression && typeExpression.type.kind === 314 /* JSDocOptionalType */;
58436
+ return isBracketed || !!typeExpression && typeExpression.type.kind === 315 /* JSDocOptionalType */;
58332
58437
  }
58333
58438
  function createTypePredicate(kind, parameterName, parameterIndex, type) {
58334
58439
  return { kind: kind, parameterName: parameterName, parameterIndex: parameterIndex, type: type };
@@ -58516,7 +58621,7 @@ var ts;
58516
58621
  case 205 /* PropertyAccessExpression */:
58517
58622
  case 206 /* ElementAccessExpression */:
58518
58623
  return traverse(node.expression);
58519
- case 294 /* PropertyAssignment */:
58624
+ case 295 /* PropertyAssignment */:
58520
58625
  return traverse(node.initializer);
58521
58626
  default:
58522
58627
  return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && !!ts.forEachChild(node, traverse);
@@ -59220,7 +59325,7 @@ var ts;
59220
59325
  function getConditionalFlowTypeOfType(type, node) {
59221
59326
  var constraints;
59222
59327
  var covariant = true;
59223
- while (node && !ts.isStatement(node) && node.kind !== 318 /* JSDocComment */) {
59328
+ while (node && !ts.isStatement(node) && node.kind !== 319 /* JSDocComment */) {
59224
59329
  var parent = node.parent;
59225
59330
  // only consider variance flipped by parameter locations - `keyof` types would usually be considered variance inverting, but
59226
59331
  // often get used in indexed accesses where they behave sortof invariantly, but our checking is lax
@@ -59592,10 +59697,10 @@ var ts;
59592
59697
  case 190 /* ParenthesizedType */:
59593
59698
  case 184 /* OptionalType */:
59594
59699
  case 196 /* NamedTupleMember */:
59595
- case 314 /* JSDocOptionalType */:
59596
- case 312 /* JSDocNullableType */:
59597
- case 313 /* JSDocNonNullableType */:
59598
- case 307 /* JSDocTypeExpression */:
59700
+ case 315 /* JSDocOptionalType */:
59701
+ case 313 /* JSDocNullableType */:
59702
+ case 314 /* JSDocNonNullableType */:
59703
+ case 308 /* JSDocTypeExpression */:
59599
59704
  return mayResolveTypeAlias(node.type);
59600
59705
  case 185 /* RestType */:
59601
59706
  return node.type.kind !== 182 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType);
@@ -61799,8 +61904,8 @@ var ts;
61799
61904
  function getTypeFromTypeNodeWorker(node) {
61800
61905
  switch (node.kind) {
61801
61906
  case 130 /* AnyKeyword */:
61802
- case 310 /* JSDocAllType */:
61803
- case 311 /* JSDocUnknownType */:
61907
+ case 311 /* JSDocAllType */:
61908
+ case 312 /* JSDocUnknownType */:
61804
61909
  return anyType;
61805
61910
  case 154 /* UnknownKeyword */:
61806
61911
  return unknownType;
@@ -61850,26 +61955,26 @@ var ts;
61850
61955
  return getTypeFromUnionTypeNode(node);
61851
61956
  case 187 /* IntersectionType */:
61852
61957
  return getTypeFromIntersectionTypeNode(node);
61853
- case 312 /* JSDocNullableType */:
61958
+ case 313 /* JSDocNullableType */:
61854
61959
  return getTypeFromJSDocNullableTypeNode(node);
61855
- case 314 /* JSDocOptionalType */:
61960
+ case 315 /* JSDocOptionalType */:
61856
61961
  return addOptionality(getTypeFromTypeNode(node.type));
61857
61962
  case 196 /* NamedTupleMember */:
61858
61963
  return getTypeFromNamedTupleTypeNode(node);
61859
61964
  case 190 /* ParenthesizedType */:
61860
- case 313 /* JSDocNonNullableType */:
61861
- case 307 /* JSDocTypeExpression */:
61965
+ case 314 /* JSDocNonNullableType */:
61966
+ case 308 /* JSDocTypeExpression */:
61862
61967
  return getTypeFromTypeNode(node.type);
61863
61968
  case 185 /* RestType */:
61864
61969
  return getTypeFromRestTypeNode(node);
61865
- case 316 /* JSDocVariadicType */:
61970
+ case 317 /* JSDocVariadicType */:
61866
61971
  return getTypeFromJSDocVariadicType(node);
61867
61972
  case 178 /* FunctionType */:
61868
61973
  case 179 /* ConstructorType */:
61869
61974
  case 181 /* TypeLiteral */:
61870
- case 320 /* JSDocTypeLiteral */:
61871
- case 315 /* JSDocFunctionType */:
61872
- case 321 /* JSDocSignature */:
61975
+ case 321 /* JSDocTypeLiteral */:
61976
+ case 316 /* JSDocFunctionType */:
61977
+ case 322 /* JSDocSignature */:
61873
61978
  return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
61874
61979
  case 192 /* TypeOperator */:
61875
61980
  return getTypeFromTypeOperatorNode(node);
@@ -62417,7 +62522,7 @@ var ts;
62417
62522
  case 220 /* BinaryExpression */:
62418
62523
  return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) &&
62419
62524
  (isContextSensitive(node.left) || isContextSensitive(node.right));
62420
- case 294 /* PropertyAssignment */:
62525
+ case 295 /* PropertyAssignment */:
62421
62526
  return isContextSensitive(node.initializer);
62422
62527
  case 211 /* ParenthesizedExpression */:
62423
62528
  return isContextSensitive(node.expression);
@@ -62933,8 +63038,8 @@ var ts;
62933
63038
  case 172 /* SetAccessor */: return [3 /*break*/, 2];
62934
63039
  case 171 /* GetAccessor */: return [3 /*break*/, 2];
62935
63040
  case 168 /* MethodDeclaration */: return [3 /*break*/, 2];
62936
- case 295 /* ShorthandPropertyAssignment */: return [3 /*break*/, 2];
62937
- case 294 /* PropertyAssignment */: return [3 /*break*/, 4];
63041
+ case 296 /* ShorthandPropertyAssignment */: return [3 /*break*/, 2];
63042
+ case 295 /* PropertyAssignment */: return [3 /*break*/, 4];
62938
63043
  }
62939
63044
  return [3 /*break*/, 6];
62940
63045
  case 2: return [4 /*yield*/, { errorNode: prop.name, innerExpression: undefined, nameType: type }];
@@ -66571,7 +66676,7 @@ var ts;
66571
66676
  return;
66572
66677
  }
66573
66678
  break;
66574
- case 315 /* JSDocFunctionType */:
66679
+ case 316 /* JSDocFunctionType */:
66575
66680
  error(declaration, ts.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
66576
66681
  return;
66577
66682
  case 255 /* FunctionDeclaration */:
@@ -66737,7 +66842,7 @@ var ts;
66737
66842
  function isNonGenericTopLevelType(type) {
66738
66843
  if (type.aliasSymbol && !type.aliasTypeArguments) {
66739
66844
  var declaration = ts.getDeclarationOfKind(type.aliasSymbol, 258 /* TypeAliasDeclaration */);
66740
- return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 303 /* SourceFile */ ? true : n.kind === 260 /* ModuleDeclaration */ ? false : "quit"; }));
66845
+ return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 304 /* SourceFile */ ? true : n.kind === 260 /* ModuleDeclaration */ ? false : "quit"; }));
66741
66846
  }
66742
66847
  return false;
66743
66848
  }
@@ -67833,7 +67938,7 @@ var ts;
67833
67938
  }
67834
67939
  // falls through
67835
67940
  default:
67836
- if (node.parent.kind === 295 /* ShorthandPropertyAssignment */) {
67941
+ if (node.parent.kind === 296 /* ShorthandPropertyAssignment */) {
67837
67942
  return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
67838
67943
  }
67839
67944
  else {
@@ -68058,7 +68163,7 @@ var ts;
68058
68163
  }
68059
68164
  function getMatchingUnionConstituentForObjectLiteral(unionType, node) {
68060
68165
  var keyPropertyName = getKeyPropertyName(unionType);
68061
- var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 294 /* PropertyAssignment */ &&
68166
+ var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 295 /* PropertyAssignment */ &&
68062
68167
  p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer); });
68063
68168
  var propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);
68064
68169
  return propType && getConstituentTypeForKeyType(unionType, propType);
@@ -68253,7 +68358,7 @@ var ts;
68253
68358
  }
68254
68359
  function getAssignedTypeOfBinaryExpression(node) {
68255
68360
  var isDestructuringDefaultAssignment = node.parent.kind === 203 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) ||
68256
- node.parent.kind === 294 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent);
68361
+ node.parent.kind === 295 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent);
68257
68362
  return isDestructuringDefaultAssignment ?
68258
68363
  getTypeWithDefault(getAssignedType(node), node.right) :
68259
68364
  getTypeOfExpression(node.right);
@@ -68289,9 +68394,9 @@ var ts;
68289
68394
  return getAssignedTypeOfArrayLiteralElement(parent, node);
68290
68395
  case 224 /* SpreadElement */:
68291
68396
  return getAssignedTypeOfSpreadExpression(parent);
68292
- case 294 /* PropertyAssignment */:
68397
+ case 295 /* PropertyAssignment */:
68293
68398
  return getAssignedTypeOfPropertyAssignment(parent);
68294
- case 295 /* ShorthandPropertyAssignment */:
68399
+ case 296 /* ShorthandPropertyAssignment */:
68295
68400
  return getAssignedTypeOfShorthandPropertyAssignment(parent);
68296
68401
  }
68297
68402
  return errorType;
@@ -69969,7 +70074,7 @@ var ts;
69969
70074
  return ts.findAncestor(node.parent, function (node) {
69970
70075
  return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
69971
70076
  node.kind === 261 /* ModuleBlock */ ||
69972
- node.kind === 303 /* SourceFile */ ||
70077
+ node.kind === 304 /* SourceFile */ ||
69973
70078
  node.kind === 166 /* PropertyDeclaration */;
69974
70079
  });
69975
70080
  }
@@ -70244,7 +70349,7 @@ var ts;
70244
70349
  // to the constructor in the initializer, we will need to substitute that
70245
70350
  // binding with an alias as the class name is not in scope.
70246
70351
  var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
70247
- while (container.kind !== 303 /* SourceFile */) {
70352
+ while (container.kind !== 304 /* SourceFile */) {
70248
70353
  if (container.parent === declaration) {
70249
70354
  if (ts.isPropertyDeclaration(container) && ts.isStatic(container) || ts.isClassStaticBlockDeclaration(container)) {
70250
70355
  getNodeLinks(declaration).flags |= 16777216 /* ClassWithConstructorReference */;
@@ -70615,7 +70720,7 @@ var ts;
70615
70720
  }
70616
70721
  // x.prototype = { method: function() { } }
70617
70722
  else if (container.kind === 212 /* FunctionExpression */ &&
70618
- container.parent.kind === 294 /* PropertyAssignment */ &&
70723
+ container.parent.kind === 295 /* PropertyAssignment */ &&
70619
70724
  container.parent.parent.kind === 204 /* ObjectLiteralExpression */ &&
70620
70725
  ts.isBinaryExpression(container.parent.parent.parent) &&
70621
70726
  ts.getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) {
@@ -70649,7 +70754,7 @@ var ts;
70649
70754
  }
70650
70755
  function getTypeForThisExpressionFromJSDoc(node) {
70651
70756
  var jsdocType = ts.getJSDocType(node);
70652
- if (jsdocType && jsdocType.kind === 315 /* JSDocFunctionType */) {
70757
+ if (jsdocType && jsdocType.kind === 316 /* JSDocFunctionType */) {
70653
70758
  var jsDocFunctionType = jsdocType;
70654
70759
  if (jsDocFunctionType.parameters.length > 0 &&
70655
70760
  jsDocFunctionType.parameters[0].name &&
@@ -70866,7 +70971,7 @@ var ts;
70866
70971
  return (func.kind === 168 /* MethodDeclaration */ ||
70867
70972
  func.kind === 171 /* GetAccessor */ ||
70868
70973
  func.kind === 172 /* SetAccessor */) && func.parent.kind === 204 /* ObjectLiteralExpression */ ? func.parent :
70869
- func.kind === 212 /* FunctionExpression */ && func.parent.kind === 294 /* PropertyAssignment */ ? func.parent.parent :
70974
+ func.kind === 212 /* FunctionExpression */ && func.parent.kind === 295 /* PropertyAssignment */ ? func.parent.parent :
70870
70975
  undefined;
70871
70976
  }
70872
70977
  function getThisTypeArgument(type) {
@@ -70905,7 +71010,7 @@ var ts;
70905
71010
  if (thisType) {
70906
71011
  return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral)));
70907
71012
  }
70908
- if (literal.parent.kind !== 294 /* PropertyAssignment */) {
71013
+ if (literal.parent.kind !== 295 /* PropertyAssignment */) {
70909
71014
  break;
70910
71015
  }
70911
71016
  literal = literal.parent.parent;
@@ -71441,7 +71546,7 @@ var ts;
71441
71546
  return false;
71442
71547
  }
71443
71548
  function discriminateContextualTypeByObjectMembers(node, contextualType) {
71444
- return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 294 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return getContextFreeTypeOfExpression(prop.initializer); }, prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216 /* Optional */) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
71549
+ return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 295 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return getContextFreeTypeOfExpression(prop.initializer); }, prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216 /* Optional */) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
71445
71550
  }
71446
71551
  function discriminateContextualTypeByJSXAttributes(node, contextualType) {
71447
71552
  return discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 284 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return getContextFreeTypeOfExpression(prop.initializer); }), prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216 /* Optional */) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
@@ -71545,10 +71650,10 @@ var ts;
71545
71650
  return ts.isConstTypeReference(parent.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(parent.type);
71546
71651
  case 220 /* BinaryExpression */:
71547
71652
  return getContextualTypeForBinaryOperand(node, contextFlags);
71548
- case 294 /* PropertyAssignment */:
71549
- case 295 /* ShorthandPropertyAssignment */:
71653
+ case 295 /* PropertyAssignment */:
71654
+ case 296 /* ShorthandPropertyAssignment */:
71550
71655
  return getContextualTypeForObjectLiteralElement(parent, contextFlags);
71551
- case 296 /* SpreadAssignment */:
71656
+ case 297 /* SpreadAssignment */:
71552
71657
  return getContextualType(parent.parent, contextFlags);
71553
71658
  case 203 /* ArrayLiteralExpression */: {
71554
71659
  var arrayLiteral = parent;
@@ -72078,14 +72183,14 @@ var ts;
72078
72183
  var member = getSymbolOfNode(memberDecl);
72079
72184
  var computedNameType = memberDecl.name && memberDecl.name.kind === 161 /* ComputedPropertyName */ ?
72080
72185
  checkComputedPropertyName(memberDecl.name) : undefined;
72081
- if (memberDecl.kind === 294 /* PropertyAssignment */ ||
72082
- memberDecl.kind === 295 /* ShorthandPropertyAssignment */ ||
72186
+ if (memberDecl.kind === 295 /* PropertyAssignment */ ||
72187
+ memberDecl.kind === 296 /* ShorthandPropertyAssignment */ ||
72083
72188
  ts.isObjectLiteralMethod(memberDecl)) {
72084
- var type = memberDecl.kind === 294 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) :
72189
+ var type = memberDecl.kind === 295 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) :
72085
72190
  // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring
72086
72191
  // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`.
72087
72192
  // we don't want to say "could not find 'a'".
72088
- memberDecl.kind === 295 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) :
72193
+ memberDecl.kind === 296 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) :
72089
72194
  checkObjectLiteralMethod(memberDecl, checkMode);
72090
72195
  if (isInJavascript) {
72091
72196
  var jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl);
@@ -72108,8 +72213,8 @@ var ts;
72108
72213
  if (inDestructuringPattern) {
72109
72214
  // If object literal is an assignment pattern and if the assignment pattern specifies a default value
72110
72215
  // for the property, make the property optional.
72111
- var isOptional = (memberDecl.kind === 294 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) ||
72112
- (memberDecl.kind === 295 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer);
72216
+ var isOptional = (memberDecl.kind === 295 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) ||
72217
+ (memberDecl.kind === 296 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer);
72113
72218
  if (isOptional) {
72114
72219
  prop.flags |= 16777216 /* Optional */;
72115
72220
  }
@@ -72135,7 +72240,7 @@ var ts;
72135
72240
  member = prop;
72136
72241
  allPropertiesTable === null || allPropertiesTable === void 0 ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
72137
72242
  }
72138
- else if (memberDecl.kind === 296 /* SpreadAssignment */) {
72243
+ else if (memberDecl.kind === 297 /* SpreadAssignment */) {
72139
72244
  if (languageVersion < 2 /* ES2015 */) {
72140
72245
  checkExternalEmitHelpers(memberDecl, 2 /* Assign */);
72141
72246
  }
@@ -72199,7 +72304,7 @@ var ts;
72199
72304
  // type with those properties for which the binding pattern specifies a default value.
72200
72305
  // If the object literal is spread into another object literal, skip this step and let the top-level object
72201
72306
  // literal handle it instead.
72202
- if (contextualTypeHasPattern && node.parent.kind !== 296 /* SpreadAssignment */) {
72307
+ if (contextualTypeHasPattern && node.parent.kind !== 297 /* SpreadAssignment */) {
72203
72308
  for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
72204
72309
  var prop = _e[_d];
72205
72310
  if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
@@ -73333,11 +73438,11 @@ var ts;
73333
73438
  switch (node.kind) {
73334
73439
  case 166 /* PropertyDeclaration */:
73335
73440
  return true;
73336
- case 294 /* PropertyAssignment */:
73441
+ case 295 /* PropertyAssignment */:
73337
73442
  case 168 /* MethodDeclaration */:
73338
73443
  case 171 /* GetAccessor */:
73339
73444
  case 172 /* SetAccessor */:
73340
- case 296 /* SpreadAssignment */:
73445
+ case 297 /* SpreadAssignment */:
73341
73446
  case 161 /* ComputedPropertyName */:
73342
73447
  case 232 /* TemplateSpan */:
73343
73448
  case 287 /* JsxExpression */:
@@ -75980,7 +76085,7 @@ var ts;
75980
76085
  }
75981
76086
  function getParameterIdentifierNameAtPosition(signature, pos) {
75982
76087
  var _a;
75983
- if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 315 /* JSDocFunctionType */) {
76088
+ if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 316 /* JSDocFunctionType */) {
75984
76089
  return undefined;
75985
76090
  }
75986
76091
  var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
@@ -77132,7 +77237,7 @@ var ts;
77132
77237
  if (rightIsThis === void 0) { rightIsThis = false; }
77133
77238
  var properties = node.properties;
77134
77239
  var property = properties[propertyIndex];
77135
- if (property.kind === 294 /* PropertyAssignment */ || property.kind === 295 /* ShorthandPropertyAssignment */) {
77240
+ if (property.kind === 295 /* PropertyAssignment */ || property.kind === 296 /* ShorthandPropertyAssignment */) {
77136
77241
  var name = property.name;
77137
77242
  var exprType = getLiteralTypeFromPropertyName(name);
77138
77243
  if (isTypeUsableAsPropertyName(exprType)) {
@@ -77145,9 +77250,9 @@ var ts;
77145
77250
  }
77146
77251
  var elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name);
77147
77252
  var type = getFlowTypeOfDestructuring(property, elementType);
77148
- return checkDestructuringAssignment(property.kind === 295 /* ShorthandPropertyAssignment */ ? property : property.initializer, type);
77253
+ return checkDestructuringAssignment(property.kind === 296 /* ShorthandPropertyAssignment */ ? property : property.initializer, type);
77149
77254
  }
77150
- else if (property.kind === 296 /* SpreadAssignment */) {
77255
+ else if (property.kind === 297 /* SpreadAssignment */) {
77151
77256
  if (propertyIndex < properties.length - 1) {
77152
77257
  error(property, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
77153
77258
  }
@@ -77230,7 +77335,7 @@ var ts;
77230
77335
  }
77231
77336
  function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) {
77232
77337
  var target;
77233
- if (exprOrAssignment.kind === 295 /* ShorthandPropertyAssignment */) {
77338
+ if (exprOrAssignment.kind === 296 /* ShorthandPropertyAssignment */) {
77234
77339
  var prop = exprOrAssignment;
77235
77340
  if (prop.objectAssignmentInitializer) {
77236
77341
  // In strict null checking mode, if a default value of a non-undefined type is specified, remove
@@ -77260,10 +77365,10 @@ var ts;
77260
77365
  }
77261
77366
  function checkReferenceAssignment(target, sourceType, checkMode) {
77262
77367
  var targetType = checkExpression(target, checkMode);
77263
- var error = target.parent.kind === 296 /* SpreadAssignment */ ?
77368
+ var error = target.parent.kind === 297 /* SpreadAssignment */ ?
77264
77369
  ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
77265
77370
  ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
77266
- var optionalError = target.parent.kind === 296 /* SpreadAssignment */ ?
77371
+ var optionalError = target.parent.kind === 297 /* SpreadAssignment */ ?
77267
77372
  ts.Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access :
77268
77373
  ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;
77269
77374
  if (checkReferenceExpression(target, error, optionalError)) {
@@ -78671,7 +78776,7 @@ var ts;
78671
78776
  checkAsyncFunctionReturnType(node, returnTypeNode);
78672
78777
  }
78673
78778
  }
78674
- if (node.kind !== 175 /* IndexSignature */ && node.kind !== 315 /* JSDocFunctionType */) {
78779
+ if (node.kind !== 175 /* IndexSignature */ && node.kind !== 316 /* JSDocFunctionType */) {
78675
78780
  registerForUnusedIdentifiersCheck(node);
78676
78781
  }
78677
78782
  }
@@ -79273,6 +79378,14 @@ var ts;
79273
79378
  }
79274
79379
  function checkImportType(node) {
79275
79380
  checkSourceElement(node.argument);
79381
+ if (node.assertions) {
79382
+ var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
79383
+ if (override) {
79384
+ if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
79385
+ grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
79386
+ }
79387
+ }
79388
+ }
79276
79389
  getTypeFromTypeNode(node);
79277
79390
  }
79278
79391
  function checkNamedTupleMember(node) {
@@ -79594,9 +79707,9 @@ var ts;
79594
79707
  case 258 /* TypeAliasDeclaration */:
79595
79708
  // A jsdoc typedef and callback are, by definition, type aliases.
79596
79709
  // falls through
79597
- case 343 /* JSDocTypedefTag */:
79598
- case 336 /* JSDocCallbackTag */:
79599
- case 337 /* JSDocEnumTag */:
79710
+ case 344 /* JSDocTypedefTag */:
79711
+ case 337 /* JSDocCallbackTag */:
79712
+ case 338 /* JSDocEnumTag */:
79600
79713
  return 2 /* ExportType */;
79601
79714
  case 260 /* ModuleDeclaration */:
79602
79715
  return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */
@@ -79604,9 +79717,9 @@ var ts;
79604
79717
  : 4 /* ExportNamespace */;
79605
79718
  case 256 /* ClassDeclaration */:
79606
79719
  case 259 /* EnumDeclaration */:
79607
- case 297 /* EnumMember */:
79720
+ case 298 /* EnumMember */:
79608
79721
  return 2 /* ExportType */ | 1 /* ExportValue */;
79609
- case 303 /* SourceFile */:
79722
+ case 304 /* SourceFile */:
79610
79723
  return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */;
79611
79724
  case 270 /* ExportAssignment */:
79612
79725
  case 220 /* BinaryExpression */:
@@ -80328,7 +80441,7 @@ var ts;
80328
80441
  checkUnusedClassMembers(node, addDiagnostic);
80329
80442
  checkUnusedTypeParameters(node, addDiagnostic);
80330
80443
  break;
80331
- case 303 /* SourceFile */:
80444
+ case 304 /* SourceFile */:
80332
80445
  case 260 /* ModuleDeclaration */:
80333
80446
  case 234 /* Block */:
80334
80447
  case 262 /* CaseBlock */:
@@ -80646,7 +80759,7 @@ var ts;
80646
80759
  node.kind === 167 /* MethodSignature */ ||
80647
80760
  node.kind === 171 /* GetAccessor */ ||
80648
80761
  node.kind === 172 /* SetAccessor */ ||
80649
- node.kind === 294 /* PropertyAssignment */) {
80762
+ node.kind === 295 /* PropertyAssignment */) {
80650
80763
  // it is ok to have member named '_super', '_this', `Promise`, etc. - member access is always qualified
80651
80764
  return false;
80652
80765
  }
@@ -80712,7 +80825,7 @@ var ts;
80712
80825
  }
80713
80826
  // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent
80714
80827
  var parent = getDeclarationContainer(node);
80715
- if (parent.kind === 303 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) {
80828
+ if (parent.kind === 304 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) {
80716
80829
  // If the declaration happens to be in external module, report error that require and exports are reserved keywords
80717
80830
  errorSkippedOn("noEmit", name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
80718
80831
  }
@@ -80727,7 +80840,7 @@ var ts;
80727
80840
  }
80728
80841
  // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent
80729
80842
  var parent = getDeclarationContainer(node);
80730
- if (parent.kind === 303 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2048 /* HasAsyncFunctions */) {
80843
+ if (parent.kind === 304 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2048 /* HasAsyncFunctions */) {
80731
80844
  // If the declaration happens to be in external module, report error that Promise is a reserved identifier.
80732
80845
  errorSkippedOn("noEmit", name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
80733
80846
  }
@@ -80849,7 +80962,7 @@ var ts;
80849
80962
  (container.kind === 234 /* Block */ && ts.isFunctionLike(container.parent) ||
80850
80963
  container.kind === 261 /* ModuleBlock */ ||
80851
80964
  container.kind === 260 /* ModuleDeclaration */ ||
80852
- container.kind === 303 /* SourceFile */);
80965
+ container.kind === 304 /* SourceFile */);
80853
80966
  // here we know that function scoped variable is shadowed by block scoped one
80854
80967
  // if they are defined in the same scope - binder has already reported redeclaration error
80855
80968
  // otherwise if variable has an initializer - show error that initialization will fail
@@ -83456,7 +83569,7 @@ var ts;
83456
83569
  return false;
83457
83570
  }
83458
83571
  var inAmbientExternalModule = node.parent.kind === 261 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
83459
- if (node.parent.kind !== 303 /* SourceFile */ && !inAmbientExternalModule) {
83572
+ if (node.parent.kind !== 304 /* SourceFile */ && !inAmbientExternalModule) {
83460
83573
  error(moduleName, node.kind === 271 /* ExportDeclaration */ ?
83461
83574
  ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
83462
83575
  ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
@@ -83599,6 +83712,14 @@ var ts;
83599
83712
  function checkAssertClause(declaration) {
83600
83713
  var _a;
83601
83714
  if (declaration.assertClause) {
83715
+ var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
83716
+ var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
83717
+ if (validForTypeAssertions && override) {
83718
+ if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
83719
+ return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
83720
+ }
83721
+ return; // Other grammar checks do not apply to type-only imports with resolution mode assertions
83722
+ }
83602
83723
  var mode = (moduleKind === ts.ModuleKind.NodeNext) && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
83603
83724
  if (mode !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.ESNext) {
83604
83725
  return grammarErrorOnNode(declaration.assertClause, moduleKind === ts.ModuleKind.NodeNext
@@ -83608,6 +83729,9 @@ var ts;
83608
83729
  if (ts.isImportDeclaration(declaration) ? (_a = declaration.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
83609
83730
  return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
83610
83731
  }
83732
+ if (override) {
83733
+ return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
83734
+ }
83611
83735
  }
83612
83736
  }
83613
83737
  function checkImportDeclaration(node) {
@@ -83700,7 +83824,7 @@ var ts;
83700
83824
  var inAmbientExternalModule = node.parent.kind === 261 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
83701
83825
  var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 261 /* ModuleBlock */ &&
83702
83826
  !node.moduleSpecifier && node.flags & 8388608 /* Ambient */;
83703
- if (node.parent.kind !== 303 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
83827
+ if (node.parent.kind !== 304 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
83704
83828
  error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
83705
83829
  }
83706
83830
  }
@@ -83745,7 +83869,7 @@ var ts;
83745
83869
  return false;
83746
83870
  }
83747
83871
  function checkGrammarModuleElementContext(node, errorMessage) {
83748
- var isInAppropriateContext = node.parent.kind === 303 /* SourceFile */ || node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 260 /* ModuleDeclaration */;
83872
+ var isInAppropriateContext = node.parent.kind === 304 /* SourceFile */ || node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 260 /* ModuleDeclaration */;
83749
83873
  if (!isInAppropriateContext) {
83750
83874
  grammarErrorOnFirstToken(node, errorMessage);
83751
83875
  }
@@ -83823,7 +83947,7 @@ var ts;
83823
83947
  // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors.
83824
83948
  return;
83825
83949
  }
83826
- var container = node.parent.kind === 303 /* SourceFile */ ? node.parent : node.parent.parent;
83950
+ var container = node.parent.kind === 304 /* SourceFile */ ? node.parent : node.parent.parent;
83827
83951
  if (container.kind === 260 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) {
83828
83952
  if (node.isExportEquals) {
83829
83953
  error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
@@ -84020,41 +84144,41 @@ var ts;
84020
84144
  return checkImportType(node);
84021
84145
  case 196 /* NamedTupleMember */:
84022
84146
  return checkNamedTupleMember(node);
84023
- case 326 /* JSDocAugmentsTag */:
84147
+ case 327 /* JSDocAugmentsTag */:
84024
84148
  return checkJSDocAugmentsTag(node);
84025
- case 327 /* JSDocImplementsTag */:
84149
+ case 328 /* JSDocImplementsTag */:
84026
84150
  return checkJSDocImplementsTag(node);
84027
- case 343 /* JSDocTypedefTag */:
84028
- case 336 /* JSDocCallbackTag */:
84029
- case 337 /* JSDocEnumTag */:
84151
+ case 344 /* JSDocTypedefTag */:
84152
+ case 337 /* JSDocCallbackTag */:
84153
+ case 338 /* JSDocEnumTag */:
84030
84154
  return checkJSDocTypeAliasTag(node);
84031
- case 342 /* JSDocTemplateTag */:
84155
+ case 343 /* JSDocTemplateTag */:
84032
84156
  return checkJSDocTemplateTag(node);
84033
- case 341 /* JSDocTypeTag */:
84157
+ case 342 /* JSDocTypeTag */:
84034
84158
  return checkJSDocTypeTag(node);
84035
- case 338 /* JSDocParameterTag */:
84159
+ case 339 /* JSDocParameterTag */:
84036
84160
  return checkJSDocParameterTag(node);
84037
- case 345 /* JSDocPropertyTag */:
84161
+ case 346 /* JSDocPropertyTag */:
84038
84162
  return checkJSDocPropertyTag(node);
84039
- case 315 /* JSDocFunctionType */:
84163
+ case 316 /* JSDocFunctionType */:
84040
84164
  checkJSDocFunctionType(node);
84041
84165
  // falls through
84042
- case 313 /* JSDocNonNullableType */:
84043
- case 312 /* JSDocNullableType */:
84044
- case 310 /* JSDocAllType */:
84045
- case 311 /* JSDocUnknownType */:
84046
- case 320 /* JSDocTypeLiteral */:
84166
+ case 314 /* JSDocNonNullableType */:
84167
+ case 313 /* JSDocNullableType */:
84168
+ case 311 /* JSDocAllType */:
84169
+ case 312 /* JSDocUnknownType */:
84170
+ case 321 /* JSDocTypeLiteral */:
84047
84171
  checkJSDocTypeIsInJsFile(node);
84048
84172
  ts.forEachChild(node, checkSourceElement);
84049
84173
  return;
84050
- case 316 /* JSDocVariadicType */:
84174
+ case 317 /* JSDocVariadicType */:
84051
84175
  checkJSDocVariadicType(node);
84052
84176
  return;
84053
- case 307 /* JSDocTypeExpression */:
84177
+ case 308 /* JSDocTypeExpression */:
84054
84178
  return checkSourceElement(node.type);
84055
- case 331 /* JSDocPublicTag */:
84056
- case 333 /* JSDocProtectedTag */:
84057
- case 332 /* JSDocPrivateTag */:
84179
+ case 332 /* JSDocPublicTag */:
84180
+ case 334 /* JSDocProtectedTag */:
84181
+ case 333 /* JSDocPrivateTag */:
84058
84182
  return checkJSDocAccessibilityModifiers(node);
84059
84183
  case 193 /* IndexedAccessType */:
84060
84184
  return checkIndexedAccessType(node);
@@ -84397,7 +84521,7 @@ var ts;
84397
84521
  copySymbols(location.locals, meaning);
84398
84522
  }
84399
84523
  switch (location.kind) {
84400
- case 303 /* SourceFile */:
84524
+ case 304 /* SourceFile */:
84401
84525
  if (!ts.isExternalModule(location))
84402
84526
  break;
84403
84527
  // falls through
@@ -84488,9 +84612,9 @@ var ts;
84488
84612
  case 257 /* InterfaceDeclaration */:
84489
84613
  case 258 /* TypeAliasDeclaration */:
84490
84614
  case 259 /* EnumDeclaration */:
84491
- case 343 /* JSDocTypedefTag */:
84492
- case 336 /* JSDocCallbackTag */:
84493
- case 337 /* JSDocEnumTag */:
84615
+ case 344 /* JSDocTypedefTag */:
84616
+ case 337 /* JSDocCallbackTag */:
84617
+ case 338 /* JSDocEnumTag */:
84494
84618
  return true;
84495
84619
  case 266 /* ImportClause */:
84496
84620
  return node.isTypeOnly;
@@ -84636,10 +84760,10 @@ var ts;
84636
84760
  return entityNameSymbol;
84637
84761
  }
84638
84762
  }
84639
- if (name.parent.kind === 338 /* JSDocParameterTag */) {
84763
+ if (name.parent.kind === 339 /* JSDocParameterTag */) {
84640
84764
  return ts.getParameterSymbolFromJSDoc(name.parent);
84641
84765
  }
84642
- if (name.parent.kind === 162 /* TypeParameter */ && name.parent.parent.kind === 342 /* JSDocTemplateTag */) {
84766
+ if (name.parent.kind === 162 /* TypeParameter */ && name.parent.parent.kind === 343 /* JSDocTemplateTag */) {
84643
84767
  ts.Debug.assert(!ts.isInJSFile(name)); // Otherwise `isDeclarationName` would have been true.
84644
84768
  var typeParameter = ts.getTypeParameterFromJsDoc(name.parent);
84645
84769
  return typeParameter && typeParameter.symbol;
@@ -84727,7 +84851,7 @@ var ts;
84727
84851
  }
84728
84852
  }
84729
84853
  function getSymbolAtLocation(node, ignoreErrors) {
84730
- if (node.kind === 303 /* SourceFile */) {
84854
+ if (node.kind === 304 /* SourceFile */) {
84731
84855
  return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
84732
84856
  }
84733
84857
  var parent = node.parent;
@@ -84854,7 +84978,7 @@ var ts;
84854
84978
  return undefined;
84855
84979
  }
84856
84980
  function getShorthandAssignmentValueSymbol(location) {
84857
- if (location && location.kind === 295 /* ShorthandPropertyAssignment */) {
84981
+ if (location && location.kind === 296 /* ShorthandPropertyAssignment */) {
84858
84982
  return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */);
84859
84983
  }
84860
84984
  return undefined;
@@ -84952,7 +85076,7 @@ var ts;
84952
85076
  }
84953
85077
  // If this is from nested object binding pattern
84954
85078
  // for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) {
84955
- if (expr.parent.kind === 294 /* PropertyAssignment */) {
85079
+ if (expr.parent.kind === 295 /* PropertyAssignment */) {
84956
85080
  var node_3 = ts.cast(expr.parent.parent, ts.isObjectLiteralExpression);
84957
85081
  var typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node_3) || errorType;
84958
85082
  var propertyIndex = ts.indexOfNode(node_3.properties, expr.parent);
@@ -85118,7 +85242,7 @@ var ts;
85118
85242
  }
85119
85243
  var parentSymbol_1 = getParentOfSymbol(symbol);
85120
85244
  if (parentSymbol_1) {
85121
- if (parentSymbol_1.flags & 512 /* ValueModule */ && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) === 303 /* SourceFile */) {
85245
+ if (parentSymbol_1.flags & 512 /* ValueModule */ && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) === 304 /* SourceFile */) {
85122
85246
  var symbolFile = parentSymbol_1.valueDeclaration;
85123
85247
  var referenceFile = ts.getSourceFileOfNode(node);
85124
85248
  // If `node` accesses an export and that export isn't in the same file, then symbol is a namespace export, so return undefined.
@@ -85243,7 +85367,7 @@ var ts;
85243
85367
  }
85244
85368
  function isTopLevelValueImportEqualsWithEntityName(nodeIn) {
85245
85369
  var node = ts.getParseTreeNode(nodeIn, ts.isImportEqualsDeclaration);
85246
- if (node === undefined || node.parent.kind !== 303 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) {
85370
+ if (node === undefined || node.parent.kind !== 304 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) {
85247
85371
  // parent is not source file or it is not reference to internal module
85248
85372
  return false;
85249
85373
  }
@@ -85358,7 +85482,7 @@ var ts;
85358
85482
  }
85359
85483
  function canHaveConstantValue(node) {
85360
85484
  switch (node.kind) {
85361
- case 297 /* EnumMember */:
85485
+ case 298 /* EnumMember */:
85362
85486
  case 205 /* PropertyAccessExpression */:
85363
85487
  case 206 /* ElementAccessExpression */:
85364
85488
  return true;
@@ -85366,7 +85490,7 @@ var ts;
85366
85490
  return false;
85367
85491
  }
85368
85492
  function getConstantValue(node) {
85369
- if (node.kind === 297 /* EnumMember */) {
85493
+ if (node.kind === 298 /* EnumMember */) {
85370
85494
  return getEnumMemberValue(node);
85371
85495
  }
85372
85496
  var symbol = getNodeLinks(node).resolvedSymbol;
@@ -85664,7 +85788,7 @@ var ts;
85664
85788
  },
85665
85789
  getDeclarationStatementsForSourceFile: function (node, flags, tracker, bundled) {
85666
85790
  var n = ts.getParseTreeNode(node);
85667
- ts.Debug.assert(n && n.kind === 303 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile");
85791
+ ts.Debug.assert(n && n.kind === 304 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile");
85668
85792
  var sym = getSymbolOfNode(node);
85669
85793
  if (!sym) {
85670
85794
  return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled);
@@ -85761,7 +85885,7 @@ var ts;
85761
85885
  break;
85762
85886
  }
85763
85887
  }
85764
- if (current.valueDeclaration && current.valueDeclaration.kind === 303 /* SourceFile */ && current.flags & 512 /* ValueModule */) {
85888
+ if (current.valueDeclaration && current.valueDeclaration.kind === 304 /* SourceFile */ && current.flags & 512 /* ValueModule */) {
85765
85889
  return false;
85766
85890
  }
85767
85891
  // check that at least one declaration of top level symbol originates from type declaration file
@@ -85794,7 +85918,7 @@ var ts;
85794
85918
  if (!moduleSymbol) {
85795
85919
  return undefined;
85796
85920
  }
85797
- return ts.getDeclarationOfKind(moduleSymbol, 303 /* SourceFile */);
85921
+ return ts.getDeclarationOfKind(moduleSymbol, 304 /* SourceFile */);
85798
85922
  }
85799
85923
  function initializeTypeChecker() {
85800
85924
  // Bind all source files and propagate errors
@@ -86077,7 +86201,7 @@ var ts;
86077
86201
  else if (flags & 256 /* Async */) {
86078
86202
  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
86079
86203
  }
86080
- else if (node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 303 /* SourceFile */) {
86204
+ else if (node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 304 /* SourceFile */) {
86081
86205
  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
86082
86206
  }
86083
86207
  else if (flags & 128 /* Abstract */) {
@@ -86103,7 +86227,7 @@ var ts;
86103
86227
  else if (flags & 256 /* Async */) {
86104
86228
  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
86105
86229
  }
86106
- else if (node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 303 /* SourceFile */) {
86230
+ else if (node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 304 /* SourceFile */) {
86107
86231
  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
86108
86232
  }
86109
86233
  else if (node.kind === 163 /* Parameter */) {
@@ -86150,7 +86274,7 @@ var ts;
86150
86274
  flags |= 1 /* Export */;
86151
86275
  break;
86152
86276
  case 88 /* DefaultKeyword */:
86153
- var container = node.parent.kind === 303 /* SourceFile */ ? node.parent : node.parent.parent;
86277
+ var container = node.parent.kind === 304 /* SourceFile */ ? node.parent : node.parent.parent;
86154
86278
  if (container.kind === 260 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) {
86155
86279
  return grammarErrorOnNode(modifier, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
86156
86280
  }
@@ -86292,7 +86416,7 @@ var ts;
86292
86416
  case 163 /* Parameter */:
86293
86417
  return false;
86294
86418
  default:
86295
- if (node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 303 /* SourceFile */) {
86419
+ if (node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 304 /* SourceFile */) {
86296
86420
  return false;
86297
86421
  }
86298
86422
  switch (node.kind) {
@@ -86579,7 +86703,7 @@ var ts;
86579
86703
  var seen = new ts.Map();
86580
86704
  for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
86581
86705
  var prop = _a[_i];
86582
- if (prop.kind === 296 /* SpreadAssignment */) {
86706
+ if (prop.kind === 297 /* SpreadAssignment */) {
86583
86707
  if (inDestructuring) {
86584
86708
  // a rest property cannot be destructured any further
86585
86709
  var expression = ts.skipParentheses(prop.expression);
@@ -86594,7 +86718,7 @@ var ts;
86594
86718
  // If the name is not a ComputedPropertyName, the grammar checking will skip it
86595
86719
  checkGrammarComputedPropertyName(name);
86596
86720
  }
86597
- if (prop.kind === 295 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) {
86721
+ if (prop.kind === 296 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) {
86598
86722
  // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern
86599
86723
  // outside of destructuring it is a syntax error
86600
86724
  grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern);
@@ -86621,10 +86745,10 @@ var ts;
86621
86745
  // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields
86622
86746
  var currentKind = void 0;
86623
86747
  switch (prop.kind) {
86624
- case 295 /* ShorthandPropertyAssignment */:
86748
+ case 296 /* ShorthandPropertyAssignment */:
86625
86749
  checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
86626
86750
  // falls through
86627
- case 294 /* PropertyAssignment */:
86751
+ case 295 /* PropertyAssignment */:
86628
86752
  // Grammar checking for computedPropertyName and shorthandPropertyAssignment
86629
86753
  checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
86630
86754
  if (name.kind === 8 /* NumericLiteral */) {
@@ -87318,7 +87442,7 @@ var ts;
87318
87442
  // to prevent noisiness. So use a bit on the block to indicate if
87319
87443
  // this has already been reported, and don't report if it has.
87320
87444
  //
87321
- if (node.parent.kind === 234 /* Block */ || node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 303 /* SourceFile */) {
87445
+ if (node.parent.kind === 234 /* Block */ || node.parent.kind === 261 /* ModuleBlock */ || node.parent.kind === 304 /* SourceFile */) {
87322
87446
  var links_2 = getNodeLinks(node.parent);
87323
87447
  // Check if the containing block ever report this error
87324
87448
  if (!links_2.hasReportedStatementInAmbientContext) {
@@ -87343,7 +87467,7 @@ var ts;
87343
87467
  else if (ts.isChildOfNodeWithKind(node, 195 /* LiteralType */)) {
87344
87468
  diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
87345
87469
  }
87346
- else if (ts.isChildOfNodeWithKind(node, 297 /* EnumMember */)) {
87470
+ else if (ts.isChildOfNodeWithKind(node, 298 /* EnumMember */)) {
87347
87471
  diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
87348
87472
  }
87349
87473
  if (diagnosticMessage) {
@@ -87911,7 +88035,10 @@ var ts;
87911
88035
  return factory.updateInferTypeNode(node, nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration));
87912
88036
  case 199 /* ImportType */:
87913
88037
  ts.Debug.type(node);
87914
- return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), visitNodes(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
88038
+ return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.assertions, visitor, ts.isNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), visitNodes(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
88039
+ case 294 /* ImportTypeAssertionContainer */:
88040
+ ts.Debug.type(node);
88041
+ return factory.updateImportTypeAssertionContainer(node, nodeVisitor(node.assertClause, visitor, ts.isNode), node.multiLine);
87915
88042
  case 196 /* NamedTupleMember */:
87916
88043
  ts.Debug.type(node);
87917
88044
  return factory.updateNamedTupleMember(node, visitNode(node.dotDotDotToken, visitor, ts.isDotDotDotToken), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.questionToken, visitor, ts.isQuestionToken), visitNode(node.type, visitor, ts.isTypeNode));
@@ -88218,28 +88345,28 @@ var ts;
88218
88345
  ts.Debug.type(node);
88219
88346
  return factory.updateCatchClause(node, nodeVisitor(node.variableDeclaration, visitor, ts.isVariableDeclaration), nodeVisitor(node.block, visitor, ts.isBlock));
88220
88347
  // Property assignments
88221
- case 294 /* PropertyAssignment */:
88348
+ case 295 /* PropertyAssignment */:
88222
88349
  ts.Debug.type(node);
88223
88350
  return factory.updatePropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
88224
- case 295 /* ShorthandPropertyAssignment */:
88351
+ case 296 /* ShorthandPropertyAssignment */:
88225
88352
  ts.Debug.type(node);
88226
88353
  return factory.updateShorthandPropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, ts.isExpression));
88227
- case 296 /* SpreadAssignment */:
88354
+ case 297 /* SpreadAssignment */:
88228
88355
  ts.Debug.type(node);
88229
88356
  return factory.updateSpreadAssignment(node, nodeVisitor(node.expression, visitor, ts.isExpression));
88230
88357
  // Enum
88231
- case 297 /* EnumMember */:
88358
+ case 298 /* EnumMember */:
88232
88359
  ts.Debug.type(node);
88233
88360
  return factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
88234
88361
  // Top-level nodes
88235
- case 303 /* SourceFile */:
88362
+ case 304 /* SourceFile */:
88236
88363
  ts.Debug.type(node);
88237
88364
  return factory.updateSourceFile(node, visitLexicalEnvironment(node.statements, visitor, context));
88238
88365
  // Transformation nodes
88239
- case 348 /* PartiallyEmittedExpression */:
88366
+ case 349 /* PartiallyEmittedExpression */:
88240
88367
  ts.Debug.type(node);
88241
88368
  return factory.updatePartiallyEmittedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
88242
- case 349 /* CommaListExpression */:
88369
+ case 350 /* CommaListExpression */:
88243
88370
  ts.Debug.type(node);
88244
88371
  return factory.updateCommaListExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
88245
88372
  default:
@@ -88930,7 +89057,7 @@ var ts;
88930
89057
  function chainBundle(context, transformSourceFile) {
88931
89058
  return transformSourceFileOrBundle;
88932
89059
  function transformSourceFileOrBundle(node) {
88933
- return node.kind === 303 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node);
89060
+ return node.kind === 304 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node);
88934
89061
  }
88935
89062
  function transformBundle(node) {
88936
89063
  return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
@@ -89884,14 +90011,14 @@ var ts;
89884
90011
  var applicableSubstitutions;
89885
90012
  return transformSourceFileOrBundle;
89886
90013
  function transformSourceFileOrBundle(node) {
89887
- if (node.kind === 304 /* Bundle */) {
90014
+ if (node.kind === 305 /* Bundle */) {
89888
90015
  return transformBundle(node);
89889
90016
  }
89890
90017
  return transformSourceFile(node);
89891
90018
  }
89892
90019
  function transformBundle(node) {
89893
90020
  return factory.createBundle(node.sourceFiles.map(transformSourceFile), ts.mapDefined(node.prepends, function (prepend) {
89894
- if (prepend.kind === 306 /* InputFiles */) {
90021
+ if (prepend.kind === 307 /* InputFiles */) {
89895
90022
  return ts.createUnparsedSourceFile(prepend, "js");
89896
90023
  }
89897
90024
  return prepend;
@@ -89942,7 +90069,7 @@ var ts;
89942
90069
  */
89943
90070
  function onBeforeVisitNode(node) {
89944
90071
  switch (node.kind) {
89945
- case 303 /* SourceFile */:
90072
+ case 304 /* SourceFile */:
89946
90073
  case 262 /* CaseBlock */:
89947
90074
  case 261 /* ModuleBlock */:
89948
90075
  case 234 /* Block */:
@@ -91164,15 +91291,15 @@ var ts;
91164
91291
  case 199 /* ImportType */:
91165
91292
  break;
91166
91293
  // handle JSDoc types from an invalid parse
91167
- case 310 /* JSDocAllType */:
91168
- case 311 /* JSDocUnknownType */:
91169
- case 315 /* JSDocFunctionType */:
91170
- case 316 /* JSDocVariadicType */:
91171
- case 317 /* JSDocNamepathType */:
91294
+ case 311 /* JSDocAllType */:
91295
+ case 312 /* JSDocUnknownType */:
91296
+ case 316 /* JSDocFunctionType */:
91297
+ case 317 /* JSDocVariadicType */:
91298
+ case 318 /* JSDocNamepathType */:
91172
91299
  break;
91173
- case 312 /* JSDocNullableType */:
91174
- case 313 /* JSDocNonNullableType */:
91175
- case 314 /* JSDocOptionalType */:
91300
+ case 313 /* JSDocNullableType */:
91301
+ case 314 /* JSDocNonNullableType */:
91302
+ case 315 /* JSDocOptionalType */:
91176
91303
  return serializeTypeNode(node.type);
91177
91304
  default:
91178
91305
  return ts.Debug.failBadSyntaxKind(node);
@@ -91890,7 +92017,7 @@ var ts;
91890
92017
  // enums in any other scope are emitted as a `let` declaration.
91891
92018
  var statement = factory.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.createVariableDeclarationList([
91892
92019
  factory.createVariableDeclaration(factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))
91893
- ], currentLexicalScope.kind === 303 /* SourceFile */ ? 0 /* None */ : 1 /* Let */));
92020
+ ], currentLexicalScope.kind === 304 /* SourceFile */ ? 0 /* None */ : 1 /* Let */));
91894
92021
  ts.setOriginalNode(statement, node);
91895
92022
  recordEmittedDeclarationInScope(node);
91896
92023
  if (isFirstEmittedDeclarationInScope(node)) {
@@ -92373,7 +92500,7 @@ var ts;
92373
92500
  // We need to enable substitutions for identifiers and shorthand property assignments. This allows us to
92374
92501
  // substitute the names of exported members of a namespace.
92375
92502
  context.enableSubstitution(79 /* Identifier */);
92376
- context.enableSubstitution(295 /* ShorthandPropertyAssignment */);
92503
+ context.enableSubstitution(296 /* ShorthandPropertyAssignment */);
92377
92504
  // We need to be notified when entering and exiting namespaces.
92378
92505
  context.enableEmitNotification(260 /* ModuleDeclaration */);
92379
92506
  }
@@ -92483,7 +92610,7 @@ var ts;
92483
92610
  // If we are nested within a namespace declaration, we may need to qualifiy
92484
92611
  // an identifier that is exported from a merged namespace.
92485
92612
  var container = resolver.getReferencedExportContainer(node, /*prefixLocals*/ false);
92486
- if (container && container.kind !== 303 /* SourceFile */) {
92613
+ if (container && container.kind !== 304 /* SourceFile */) {
92487
92614
  var substitute = (applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 260 /* ModuleDeclaration */) ||
92488
92615
  (applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 259 /* EnumDeclaration */);
92489
92616
  if (substitute) {
@@ -94888,7 +95015,7 @@ var ts;
94888
95015
  return visitObjectLiteralExpression(node);
94889
95016
  case 220 /* BinaryExpression */:
94890
95017
  return visitBinaryExpression(node, expressionResultIsUnused);
94891
- case 349 /* CommaListExpression */:
95018
+ case 350 /* CommaListExpression */:
94892
95019
  return visitCommaListExpression(node, expressionResultIsUnused);
94893
95020
  case 291 /* CatchClause */:
94894
95021
  return visitCatchClause(node);
@@ -94987,7 +95114,7 @@ var ts;
94987
95114
  var objects = [];
94988
95115
  for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
94989
95116
  var e = elements_4[_i];
94990
- if (e.kind === 296 /* SpreadAssignment */) {
95117
+ if (e.kind === 297 /* SpreadAssignment */) {
94991
95118
  if (chunkObject) {
94992
95119
  objects.push(factory.createObjectLiteralExpression(chunkObject));
94993
95120
  chunkObject = undefined;
@@ -94996,7 +95123,7 @@ var ts;
94996
95123
  objects.push(ts.visitNode(target, visitor, ts.isExpression));
94997
95124
  }
94998
95125
  else {
94999
- chunkObject = ts.append(chunkObject, e.kind === 294 /* PropertyAssignment */
95126
+ chunkObject = ts.append(chunkObject, e.kind === 295 /* PropertyAssignment */
95000
95127
  ? factory.createPropertyAssignment(e.name, ts.visitNode(e.initializer, visitor, ts.isExpression))
95001
95128
  : ts.visitNode(e, visitor, ts.isObjectLiteralElementLike));
95002
95129
  }
@@ -96984,7 +97111,7 @@ var ts;
96984
97111
  return visitObjectLiteralExpression(node);
96985
97112
  case 291 /* CatchClause */:
96986
97113
  return visitCatchClause(node);
96987
- case 295 /* ShorthandPropertyAssignment */:
97114
+ case 296 /* ShorthandPropertyAssignment */:
96988
97115
  return visitShorthandPropertyAssignment(node);
96989
97116
  case 161 /* ComputedPropertyName */:
96990
97117
  return visitComputedPropertyName(node);
@@ -96998,7 +97125,7 @@ var ts;
96998
97125
  return visitParenthesizedExpression(node, expressionResultIsUnused);
96999
97126
  case 220 /* BinaryExpression */:
97000
97127
  return visitBinaryExpression(node, expressionResultIsUnused);
97001
- case 349 /* CommaListExpression */:
97128
+ case 350 /* CommaListExpression */:
97002
97129
  return visitCommaListExpression(node, expressionResultIsUnused);
97003
97130
  case 14 /* NoSubstitutionTemplateLiteral */:
97004
97131
  case 15 /* TemplateHead */:
@@ -99199,10 +99326,10 @@ var ts;
99199
99326
  case 168 /* MethodDeclaration */:
99200
99327
  expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
99201
99328
  break;
99202
- case 294 /* PropertyAssignment */:
99329
+ case 295 /* PropertyAssignment */:
99203
99330
  expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
99204
99331
  break;
99205
- case 295 /* ShorthandPropertyAssignment */:
99332
+ case 296 /* ShorthandPropertyAssignment */:
99206
99333
  expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
99207
99334
  break;
99208
99335
  default:
@@ -99947,7 +100074,7 @@ var ts;
99947
100074
  var previousOnSubstituteNode = context.onSubstituteNode;
99948
100075
  context.onSubstituteNode = onSubstituteNode;
99949
100076
  context.enableSubstitution(205 /* PropertyAccessExpression */);
99950
- context.enableSubstitution(294 /* PropertyAssignment */);
100077
+ context.enableSubstitution(295 /* PropertyAssignment */);
99951
100078
  return ts.chainBundle(context, transformSourceFile);
99952
100079
  /**
99953
100080
  * Transforms an ES5 source file to ES3.
@@ -100362,7 +100489,7 @@ var ts;
100362
100489
  switch (node.kind) {
100363
100490
  case 220 /* BinaryExpression */:
100364
100491
  return visitBinaryExpression(node);
100365
- case 349 /* CommaListExpression */:
100492
+ case 350 /* CommaListExpression */:
100366
100493
  return visitCommaListExpression(node);
100367
100494
  case 221 /* ConditionalExpression */:
100368
100495
  return visitConditionalExpression(node);
@@ -102640,8 +102767,8 @@ var ts;
102640
102767
  context.enableSubstitution(209 /* TaggedTemplateExpression */); // Substitute calls to imported/exported symbols to avoid incorrect `this`.
102641
102768
  context.enableSubstitution(79 /* Identifier */); // Substitutes expression identifiers with imported/exported symbols.
102642
102769
  context.enableSubstitution(220 /* BinaryExpression */); // Substitutes assignments to exported symbols.
102643
- context.enableSubstitution(295 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols.
102644
- context.enableEmitNotification(303 /* SourceFile */); // Restore state when substituting nodes in a file.
102770
+ context.enableSubstitution(296 /* ShorthandPropertyAssignment */); // Substitutes shorthand property assignments for imported/exported symbols.
102771
+ context.enableEmitNotification(304 /* SourceFile */); // Restore state when substituting nodes in a file.
102645
102772
  var moduleInfoMap = []; // The ExternalModuleInfo for each file.
102646
102773
  var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found.
102647
102774
  var currentSourceFile; // The current file.
@@ -102983,9 +103110,9 @@ var ts;
102983
103110
  return visitFunctionDeclaration(node);
102984
103111
  case 256 /* ClassDeclaration */:
102985
103112
  return visitClassDeclaration(node);
102986
- case 350 /* MergeDeclarationMarker */:
103113
+ case 351 /* MergeDeclarationMarker */:
102987
103114
  return visitMergeDeclarationMarker(node);
102988
- case 351 /* EndOfDeclarationMarker */:
103115
+ case 352 /* EndOfDeclarationMarker */:
102989
103116
  return visitEndOfDeclarationMarker(node);
102990
103117
  default:
102991
103118
  return visitor(node);
@@ -103004,7 +103131,7 @@ var ts;
103004
103131
  return visitExpressionStatement(node);
103005
103132
  case 211 /* ParenthesizedExpression */:
103006
103133
  return visitParenthesizedExpression(node, valueIsDiscarded);
103007
- case 348 /* PartiallyEmittedExpression */:
103134
+ case 349 /* PartiallyEmittedExpression */:
103008
103135
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
103009
103136
  case 207 /* CallExpression */:
103010
103137
  if (ts.isImportCall(node) && currentSourceFile.impliedNodeFormat === undefined) {
@@ -103033,17 +103160,17 @@ var ts;
103033
103160
  for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
103034
103161
  var elem = _a[_i];
103035
103162
  switch (elem.kind) {
103036
- case 294 /* PropertyAssignment */:
103163
+ case 295 /* PropertyAssignment */:
103037
103164
  if (destructuringNeedsFlattening(elem.initializer)) {
103038
103165
  return true;
103039
103166
  }
103040
103167
  break;
103041
- case 295 /* ShorthandPropertyAssignment */:
103168
+ case 296 /* ShorthandPropertyAssignment */:
103042
103169
  if (destructuringNeedsFlattening(elem.name)) {
103043
103170
  return true;
103044
103171
  }
103045
103172
  break;
103046
- case 296 /* SpreadAssignment */:
103173
+ case 297 /* SpreadAssignment */:
103047
103174
  if (destructuringNeedsFlattening(elem.expression)) {
103048
103175
  return true;
103049
103176
  }
@@ -103909,7 +104036,7 @@ var ts;
103909
104036
  * @param emit A callback used to emit the node in the printer.
103910
104037
  */
103911
104038
  function onEmitNode(hint, node, emitCallback) {
103912
- if (node.kind === 303 /* SourceFile */) {
104039
+ if (node.kind === 304 /* SourceFile */) {
103913
104040
  currentSourceFile = node;
103914
104041
  currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
103915
104042
  previousOnEmitNode(hint, node, emitCallback);
@@ -104019,7 +104146,7 @@ var ts;
104019
104146
  }
104020
104147
  else if (!(ts.isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64 /* AllowNameSubstitution */)) && !ts.isLocalName(node)) {
104021
104148
  var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
104022
- if (exportContainer && exportContainer.kind === 303 /* SourceFile */) {
104149
+ if (exportContainer && exportContainer.kind === 304 /* SourceFile */) {
104023
104150
  return ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(node)),
104024
104151
  /*location*/ node);
104025
104152
  }
@@ -104109,10 +104236,10 @@ var ts;
104109
104236
  context.onSubstituteNode = onSubstituteNode;
104110
104237
  context.onEmitNode = onEmitNode;
104111
104238
  context.enableSubstitution(79 /* Identifier */); // Substitutes expression identifiers for imported symbols.
104112
- context.enableSubstitution(295 /* ShorthandPropertyAssignment */); // Substitutes expression identifiers for imported symbols
104239
+ context.enableSubstitution(296 /* ShorthandPropertyAssignment */); // Substitutes expression identifiers for imported symbols
104113
104240
  context.enableSubstitution(220 /* BinaryExpression */); // Substitutes assignments to exported symbols.
104114
104241
  context.enableSubstitution(230 /* MetaProperty */); // Substitutes 'import.meta'
104115
- context.enableEmitNotification(303 /* SourceFile */); // Restore state when substituting nodes in a file.
104242
+ context.enableEmitNotification(304 /* SourceFile */); // Restore state when substituting nodes in a file.
104116
104243
  var moduleInfoMap = []; // The ExternalModuleInfo for each file.
104117
104244
  var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found.
104118
104245
  var exportFunctionsMap = []; // The export function associated with a source file.
@@ -104683,7 +104810,7 @@ var ts;
104683
104810
  function shouldHoistVariableDeclarationList(node) {
104684
104811
  // hoist only non-block scoped declarations or block scoped declarations parented by source file
104685
104812
  return (ts.getEmitFlags(node) & 2097152 /* NoHoisting */) === 0
104686
- && (enclosingBlockScopedContainer.kind === 303 /* SourceFile */
104813
+ && (enclosingBlockScopedContainer.kind === 304 /* SourceFile */
104687
104814
  || (ts.getOriginalNode(node).flags & 3 /* BlockScoped */) === 0);
104688
104815
  }
104689
104816
  /**
@@ -105026,9 +105153,9 @@ var ts;
105026
105153
  return visitCatchClause(node);
105027
105154
  case 234 /* Block */:
105028
105155
  return visitBlock(node);
105029
- case 350 /* MergeDeclarationMarker */:
105156
+ case 351 /* MergeDeclarationMarker */:
105030
105157
  return visitMergeDeclarationMarker(node);
105031
- case 351 /* EndOfDeclarationMarker */:
105158
+ case 352 /* EndOfDeclarationMarker */:
105032
105159
  return visitEndOfDeclarationMarker(node);
105033
105160
  default:
105034
105161
  return visitor(node);
@@ -105220,7 +105347,7 @@ var ts;
105220
105347
  return visitExpressionStatement(node);
105221
105348
  case 211 /* ParenthesizedExpression */:
105222
105349
  return visitParenthesizedExpression(node, valueIsDiscarded);
105223
- case 348 /* PartiallyEmittedExpression */:
105350
+ case 349 /* PartiallyEmittedExpression */:
105224
105351
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
105225
105352
  case 220 /* BinaryExpression */:
105226
105353
  if (ts.isDestructuringAssignment(node)) {
@@ -105313,7 +105440,7 @@ var ts;
105313
105440
  }
105314
105441
  else if (ts.isIdentifier(node)) {
105315
105442
  var container = resolver.getReferencedExportContainer(node);
105316
- return container !== undefined && container.kind === 303 /* SourceFile */;
105443
+ return container !== undefined && container.kind === 304 /* SourceFile */;
105317
105444
  }
105318
105445
  else {
105319
105446
  return false;
@@ -105391,7 +105518,7 @@ var ts;
105391
105518
  * @param emitCallback A callback used to emit the node in the printer.
105392
105519
  */
105393
105520
  function onEmitNode(hint, node, emitCallback) {
105394
- if (node.kind === 303 /* SourceFile */) {
105521
+ if (node.kind === 304 /* SourceFile */) {
105395
105522
  var id = ts.getOriginalNodeId(node);
105396
105523
  currentSourceFile = node;
105397
105524
  moduleInfo = moduleInfoMap[id];
@@ -105441,7 +105568,7 @@ var ts;
105441
105568
  */
105442
105569
  function substituteUnspecified(node) {
105443
105570
  switch (node.kind) {
105444
- case 295 /* ShorthandPropertyAssignment */:
105571
+ case 296 /* ShorthandPropertyAssignment */:
105445
105572
  return substituteShorthandPropertyAssignment(node);
105446
105573
  }
105447
105574
  return node;
@@ -105570,7 +105697,7 @@ var ts;
105570
105697
  || resolver.getReferencedValueDeclaration(name);
105571
105698
  if (valueDeclaration) {
105572
105699
  var exportContainer = resolver.getReferencedExportContainer(name, /*prefixLocals*/ false);
105573
- if (exportContainer && exportContainer.kind === 303 /* SourceFile */) {
105700
+ if (exportContainer && exportContainer.kind === 304 /* SourceFile */) {
105574
105701
  exportedNames = ts.append(exportedNames, factory.getDeclarationName(valueDeclaration));
105575
105702
  }
105576
105703
  exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
@@ -105613,7 +105740,7 @@ var ts;
105613
105740
  var previousOnSubstituteNode = context.onSubstituteNode;
105614
105741
  context.onEmitNode = onEmitNode;
105615
105742
  context.onSubstituteNode = onSubstituteNode;
105616
- context.enableEmitNotification(303 /* SourceFile */);
105743
+ context.enableEmitNotification(304 /* SourceFile */);
105617
105744
  context.enableSubstitution(79 /* Identifier */);
105618
105745
  var helperNameSubstitutions;
105619
105746
  var currentSourceFile;
@@ -105821,8 +105948,8 @@ var ts;
105821
105948
  var cjsOnEmitNode = context.onEmitNode;
105822
105949
  context.onSubstituteNode = onSubstituteNode;
105823
105950
  context.onEmitNode = onEmitNode;
105824
- context.enableSubstitution(303 /* SourceFile */);
105825
- context.enableEmitNotification(303 /* SourceFile */);
105951
+ context.enableSubstitution(304 /* SourceFile */);
105952
+ context.enableEmitNotification(304 /* SourceFile */);
105826
105953
  var currentSourceFile;
105827
105954
  return transformSourceFileOrBundle;
105828
105955
  function onSubstituteNode(hint, node) {
@@ -105869,7 +105996,7 @@ var ts;
105869
105996
  return result;
105870
105997
  }
105871
105998
  function transformSourceFileOrBundle(node) {
105872
- return node.kind === 303 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node);
105999
+ return node.kind === 304 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node);
105873
106000
  }
105874
106001
  function transformBundle(node) {
105875
106002
  return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
@@ -106518,10 +106645,10 @@ var ts;
106518
106645
  return result;
106519
106646
  }
106520
106647
  function transformRoot(node) {
106521
- if (node.kind === 303 /* SourceFile */ && node.isDeclarationFile) {
106648
+ if (node.kind === 304 /* SourceFile */ && node.isDeclarationFile) {
106522
106649
  return node;
106523
106650
  }
106524
- if (node.kind === 304 /* Bundle */) {
106651
+ if (node.kind === 305 /* Bundle */) {
106525
106652
  isBundledEmit = true;
106526
106653
  refs = new ts.Map();
106527
106654
  libs = new ts.Map();
@@ -106551,7 +106678,7 @@ var ts;
106551
106678
  var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
106552
106679
  return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), /*isDeclarationFile*/ true, /*referencedFiles*/ [], /*typeReferences*/ [], /*hasNoDefaultLib*/ false, /*libReferences*/ []);
106553
106680
  }), ts.mapDefined(node.prepends, function (prepend) {
106554
- if (prepend.kind === 306 /* InputFiles */) {
106681
+ if (prepend.kind === 307 /* InputFiles */) {
106555
106682
  var sourceFile = ts.createUnparsedSourceFile(prepend, "dts", stripInternal);
106556
106683
  hasNoDefaultLib_1 = hasNoDefaultLib_1 || !!sourceFile.hasNoDefaultLib;
106557
106684
  collectReferences(sourceFile, refs);
@@ -106923,34 +107050,31 @@ var ts;
106923
107050
  if (!decl.importClause) {
106924
107051
  // import "mod" - possibly needed for side effects? (global interface patches, module augmentations, etc)
106925
107052
  return factory.updateImportDeclaration(decl,
106926
- /*decorators*/ undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
106927
- /*assertClause*/ undefined);
107053
+ /*decorators*/ undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
106928
107054
  }
106929
107055
  // The `importClause` visibility corresponds to the default's visibility.
106930
107056
  var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
106931
107057
  if (!decl.importClause.namedBindings) {
106932
107058
  // No named bindings (either namespace or list), meaning the import is just default or should be elided
106933
107059
  return visibleDefaultBinding && factory.updateImportDeclaration(decl, /*decorators*/ undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding,
106934
- /*namedBindings*/ undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), /*assertClause*/ undefined);
107060
+ /*namedBindings*/ undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
106935
107061
  }
106936
107062
  if (decl.importClause.namedBindings.kind === 267 /* NamespaceImport */) {
106937
107063
  // Namespace import (optionally with visible default)
106938
107064
  var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : /*namedBindings*/ undefined;
106939
- return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, /*decorators*/ undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), /*assertClause*/ undefined) : undefined;
107065
+ return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, /*decorators*/ undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined) : undefined;
106940
107066
  }
106941
107067
  // Named imports (optionally with visible default)
106942
107068
  var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
106943
107069
  if ((bindingList && bindingList.length) || visibleDefaultBinding) {
106944
107070
  return factory.updateImportDeclaration(decl,
106945
- /*decorators*/ undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
106946
- /*assertClause*/ undefined);
107071
+ /*decorators*/ undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
106947
107072
  }
106948
107073
  // Augmentation of export depends on import
106949
107074
  if (resolver.isImportRequiredByAugmentation(decl)) {
106950
107075
  return factory.updateImportDeclaration(decl,
106951
107076
  /*decorators*/ undefined, decl.modifiers,
106952
- /*importClause*/ undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
106953
- /*assertClause*/ undefined);
107077
+ /*importClause*/ undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
106954
107078
  }
106955
107079
  // Nothing visible
106956
107080
  }
@@ -107159,7 +107283,7 @@ var ts;
107159
107283
  case 199 /* ImportType */: {
107160
107284
  if (!ts.isLiteralImportTypeNode(input))
107161
107285
  return cleanup(input);
107162
- return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
107286
+ return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.assertions, input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
107163
107287
  }
107164
107288
  default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
107165
107289
  }
@@ -107206,8 +107330,7 @@ var ts;
107206
107330
  // Always visible if the parent node isn't dropped for being not visible
107207
107331
  // Rewrite external module names if necessary
107208
107332
  return factory.updateExportDeclaration(input,
107209
- /*decorators*/ undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier),
107210
- /*assertClause*/ undefined);
107333
+ /*decorators*/ undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), ts.getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined);
107211
107334
  }
107212
107335
  case 270 /* ExportAssignment */: {
107213
107336
  // Always visible if the parent node isn't dropped for being not visible
@@ -107574,7 +107697,7 @@ var ts;
107574
107697
  function ensureModifierFlags(node) {
107575
107698
  var mask = 27647 /* All */ ^ (4 /* Public */ | 256 /* Async */ | 16384 /* Override */); // No async and override modifiers in declaration files
107576
107699
  var additions = (needsDeclare && !isAlwaysType(node)) ? 2 /* Ambient */ : 0 /* None */;
107577
- var parentIsFile = node.parent.kind === 303 /* SourceFile */;
107700
+ var parentIsFile = node.parent.kind === 304 /* SourceFile */;
107578
107701
  if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) {
107579
107702
  mask ^= 2 /* Ambient */;
107580
107703
  additions = 0 /* None */;
@@ -107821,7 +107944,7 @@ var ts;
107821
107944
  * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files.
107822
107945
  */
107823
107946
  function transformNodes(resolver, host, factory, options, nodes, transformers, allowDtsFiles) {
107824
- var enabledSyntaxKindFeatures = new Array(353 /* Count */);
107947
+ var enabledSyntaxKindFeatures = new Array(354 /* Count */);
107825
107948
  var lexicalEnvironmentVariableDeclarations;
107826
107949
  var lexicalEnvironmentFunctionDeclarations;
107827
107950
  var lexicalEnvironmentStatements;
@@ -107903,7 +108026,7 @@ var ts;
107903
108026
  var transformed = [];
107904
108027
  for (var _a = 0, nodes_3 = nodes; _a < nodes_3.length; _a++) {
107905
108028
  var node = nodes_3[_a];
107906
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit" /* Emit */, "transformNodes", node.kind === 303 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end });
108029
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit" /* Emit */, "transformNodes", node.kind === 304 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end });
107907
108030
  transformed.push((allowDtsFiles ? transformation : transformRoot)(node));
107908
108031
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
107909
108032
  }
@@ -108309,7 +108432,7 @@ var ts;
108309
108432
  /*@internal*/
108310
108433
  function getOutputPathsFor(sourceFile, host, forceDtsPaths) {
108311
108434
  var options = host.getCompilerOptions();
108312
- if (sourceFile.kind === 304 /* Bundle */) {
108435
+ if (sourceFile.kind === 305 /* Bundle */) {
108313
108436
  return getOutputPathsForBundle(options, forceDtsPaths);
108314
108437
  }
108315
108438
  else {
@@ -108658,7 +108781,7 @@ var ts;
108658
108781
  extendedDiagnostics: compilerOptions.extendedDiagnostics,
108659
108782
  // Explicitly do not passthru either `inline` option
108660
108783
  });
108661
- if (forceDtsEmit && declarationTransform.transformed[0].kind === 303 /* SourceFile */) {
108784
+ if (forceDtsEmit && declarationTransform.transformed[0].kind === 304 /* SourceFile */) {
108662
108785
  var sourceFile = declarationTransform.transformed[0];
108663
108786
  exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
108664
108787
  }
@@ -108681,8 +108804,8 @@ var ts;
108681
108804
  ts.forEachChild(node, collectLinkedAliases);
108682
108805
  }
108683
108806
  function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle, printer, mapOptions) {
108684
- var bundle = sourceFileOrBundle.kind === 304 /* Bundle */ ? sourceFileOrBundle : undefined;
108685
- var sourceFile = sourceFileOrBundle.kind === 303 /* SourceFile */ ? sourceFileOrBundle : undefined;
108807
+ var bundle = sourceFileOrBundle.kind === 305 /* Bundle */ ? sourceFileOrBundle : undefined;
108808
+ var sourceFile = sourceFileOrBundle.kind === 304 /* SourceFile */ ? sourceFileOrBundle : undefined;
108686
108809
  var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
108687
108810
  var sourceMapGenerator;
108688
108811
  if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) {
@@ -108723,7 +108846,7 @@ var ts;
108723
108846
  }
108724
108847
  function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
108725
108848
  return (mapOptions.sourceMap || mapOptions.inlineSourceMap)
108726
- && (sourceFileOrBundle.kind !== 303 /* SourceFile */ || !ts.fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */));
108849
+ && (sourceFileOrBundle.kind !== 304 /* SourceFile */ || !ts.fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */));
108727
108850
  }
108728
108851
  function getSourceRoot(mapOptions) {
108729
108852
  // Normalize source root and make sure it has trailing "/" so that it can be used to combine paths with the
@@ -109034,9 +109157,9 @@ var ts;
109034
109157
  break;
109035
109158
  }
109036
109159
  switch (node.kind) {
109037
- case 303 /* SourceFile */: return printFile(node);
109038
- case 304 /* Bundle */: return printBundle(node);
109039
- case 305 /* UnparsedSource */: return printUnparsedSource(node);
109160
+ case 304 /* SourceFile */: return printFile(node);
109161
+ case 305 /* Bundle */: return printBundle(node);
109162
+ case 306 /* UnparsedSource */: return printUnparsedSource(node);
109040
109163
  }
109041
109164
  writeNode(hint, node, sourceFile, beginPrint());
109042
109165
  return endPrint();
@@ -109585,100 +109708,100 @@ var ts;
109585
109708
  case 291 /* CatchClause */:
109586
109709
  return emitCatchClause(node);
109587
109710
  // Property assignments
109588
- case 294 /* PropertyAssignment */:
109711
+ case 295 /* PropertyAssignment */:
109589
109712
  return emitPropertyAssignment(node);
109590
- case 295 /* ShorthandPropertyAssignment */:
109713
+ case 296 /* ShorthandPropertyAssignment */:
109591
109714
  return emitShorthandPropertyAssignment(node);
109592
- case 296 /* SpreadAssignment */:
109715
+ case 297 /* SpreadAssignment */:
109593
109716
  return emitSpreadAssignment(node);
109594
109717
  // Enum
109595
- case 297 /* EnumMember */:
109718
+ case 298 /* EnumMember */:
109596
109719
  return emitEnumMember(node);
109597
109720
  // Unparsed
109598
- case 298 /* UnparsedPrologue */:
109721
+ case 299 /* UnparsedPrologue */:
109599
109722
  return writeUnparsedNode(node);
109600
- case 305 /* UnparsedSource */:
109601
- case 299 /* UnparsedPrepend */:
109723
+ case 306 /* UnparsedSource */:
109724
+ case 300 /* UnparsedPrepend */:
109602
109725
  return emitUnparsedSourceOrPrepend(node);
109603
- case 300 /* UnparsedText */:
109604
- case 301 /* UnparsedInternalText */:
109726
+ case 301 /* UnparsedText */:
109727
+ case 302 /* UnparsedInternalText */:
109605
109728
  return emitUnparsedTextLike(node);
109606
- case 302 /* UnparsedSyntheticReference */:
109729
+ case 303 /* UnparsedSyntheticReference */:
109607
109730
  return emitUnparsedSyntheticReference(node);
109608
109731
  // Top-level nodes
109609
- case 303 /* SourceFile */:
109732
+ case 304 /* SourceFile */:
109610
109733
  return emitSourceFile(node);
109611
- case 304 /* Bundle */:
109734
+ case 305 /* Bundle */:
109612
109735
  return ts.Debug.fail("Bundles should be printed using printBundle");
109613
109736
  // SyntaxKind.UnparsedSource (handled above)
109614
- case 306 /* InputFiles */:
109737
+ case 307 /* InputFiles */:
109615
109738
  return ts.Debug.fail("InputFiles should not be printed");
109616
109739
  // JSDoc nodes (only used in codefixes currently)
109617
- case 307 /* JSDocTypeExpression */:
109740
+ case 308 /* JSDocTypeExpression */:
109618
109741
  return emitJSDocTypeExpression(node);
109619
- case 308 /* JSDocNameReference */:
109742
+ case 309 /* JSDocNameReference */:
109620
109743
  return emitJSDocNameReference(node);
109621
- case 310 /* JSDocAllType */:
109744
+ case 311 /* JSDocAllType */:
109622
109745
  return writePunctuation("*");
109623
- case 311 /* JSDocUnknownType */:
109746
+ case 312 /* JSDocUnknownType */:
109624
109747
  return writePunctuation("?");
109625
- case 312 /* JSDocNullableType */:
109748
+ case 313 /* JSDocNullableType */:
109626
109749
  return emitJSDocNullableType(node);
109627
- case 313 /* JSDocNonNullableType */:
109750
+ case 314 /* JSDocNonNullableType */:
109628
109751
  return emitJSDocNonNullableType(node);
109629
- case 314 /* JSDocOptionalType */:
109752
+ case 315 /* JSDocOptionalType */:
109630
109753
  return emitJSDocOptionalType(node);
109631
- case 315 /* JSDocFunctionType */:
109754
+ case 316 /* JSDocFunctionType */:
109632
109755
  return emitJSDocFunctionType(node);
109633
109756
  case 185 /* RestType */:
109634
- case 316 /* JSDocVariadicType */:
109757
+ case 317 /* JSDocVariadicType */:
109635
109758
  return emitRestOrJSDocVariadicType(node);
109636
- case 317 /* JSDocNamepathType */:
109759
+ case 318 /* JSDocNamepathType */:
109637
109760
  return;
109638
- case 318 /* JSDocComment */:
109761
+ case 319 /* JSDocComment */:
109639
109762
  return emitJSDoc(node);
109640
- case 320 /* JSDocTypeLiteral */:
109763
+ case 321 /* JSDocTypeLiteral */:
109641
109764
  return emitJSDocTypeLiteral(node);
109642
- case 321 /* JSDocSignature */:
109765
+ case 322 /* JSDocSignature */:
109643
109766
  return emitJSDocSignature(node);
109644
- case 325 /* JSDocTag */:
109645
- case 330 /* JSDocClassTag */:
109646
- case 335 /* JSDocOverrideTag */:
109767
+ case 326 /* JSDocTag */:
109768
+ case 331 /* JSDocClassTag */:
109769
+ case 336 /* JSDocOverrideTag */:
109647
109770
  return emitJSDocSimpleTag(node);
109648
- case 326 /* JSDocAugmentsTag */:
109649
- case 327 /* JSDocImplementsTag */:
109771
+ case 327 /* JSDocAugmentsTag */:
109772
+ case 328 /* JSDocImplementsTag */:
109650
109773
  return emitJSDocHeritageTag(node);
109651
- case 328 /* JSDocAuthorTag */:
109652
- case 329 /* JSDocDeprecatedTag */:
109774
+ case 329 /* JSDocAuthorTag */:
109775
+ case 330 /* JSDocDeprecatedTag */:
109653
109776
  return;
109654
109777
  // SyntaxKind.JSDocClassTag (see JSDocTag, above)
109655
- case 331 /* JSDocPublicTag */:
109656
- case 332 /* JSDocPrivateTag */:
109657
- case 333 /* JSDocProtectedTag */:
109658
- case 334 /* JSDocReadonlyTag */:
109778
+ case 332 /* JSDocPublicTag */:
109779
+ case 333 /* JSDocPrivateTag */:
109780
+ case 334 /* JSDocProtectedTag */:
109781
+ case 335 /* JSDocReadonlyTag */:
109659
109782
  return;
109660
- case 336 /* JSDocCallbackTag */:
109783
+ case 337 /* JSDocCallbackTag */:
109661
109784
  return emitJSDocCallbackTag(node);
109662
109785
  // SyntaxKind.JSDocEnumTag (see below)
109663
- case 338 /* JSDocParameterTag */:
109664
- case 345 /* JSDocPropertyTag */:
109786
+ case 339 /* JSDocParameterTag */:
109787
+ case 346 /* JSDocPropertyTag */:
109665
109788
  return emitJSDocPropertyLikeTag(node);
109666
- case 337 /* JSDocEnumTag */:
109667
- case 339 /* JSDocReturnTag */:
109668
- case 340 /* JSDocThisTag */:
109669
- case 341 /* JSDocTypeTag */:
109789
+ case 338 /* JSDocEnumTag */:
109790
+ case 340 /* JSDocReturnTag */:
109791
+ case 341 /* JSDocThisTag */:
109792
+ case 342 /* JSDocTypeTag */:
109670
109793
  return emitJSDocSimpleTypedTag(node);
109671
- case 342 /* JSDocTemplateTag */:
109794
+ case 343 /* JSDocTemplateTag */:
109672
109795
  return emitJSDocTemplateTag(node);
109673
- case 343 /* JSDocTypedefTag */:
109796
+ case 344 /* JSDocTypedefTag */:
109674
109797
  return emitJSDocTypedefTag(node);
109675
- case 344 /* JSDocSeeTag */:
109798
+ case 345 /* JSDocSeeTag */:
109676
109799
  return emitJSDocSeeTag(node);
109677
109800
  // SyntaxKind.JSDocPropertyTag (see JSDocParameterTag, above)
109678
109801
  // Transformation nodes
109679
- case 347 /* NotEmittedStatement */:
109680
- case 351 /* EndOfDeclarationMarker */:
109681
- case 350 /* MergeDeclarationMarker */:
109802
+ case 348 /* NotEmittedStatement */:
109803
+ case 352 /* EndOfDeclarationMarker */:
109804
+ case 351 /* MergeDeclarationMarker */:
109682
109805
  return;
109683
109806
  }
109684
109807
  if (ts.isExpression(node)) {
@@ -109776,19 +109899,19 @@ var ts;
109776
109899
  case 281 /* JsxFragment */:
109777
109900
  return emitJsxFragment(node);
109778
109901
  // Synthesized list
109779
- case 346 /* SyntaxList */:
109902
+ case 347 /* SyntaxList */:
109780
109903
  return ts.Debug.fail("SyntaxList should not be printed");
109781
109904
  // Transformation nodes
109782
- case 347 /* NotEmittedStatement */:
109905
+ case 348 /* NotEmittedStatement */:
109783
109906
  return;
109784
- case 348 /* PartiallyEmittedExpression */:
109907
+ case 349 /* PartiallyEmittedExpression */:
109785
109908
  return emitPartiallyEmittedExpression(node);
109786
- case 349 /* CommaListExpression */:
109909
+ case 350 /* CommaListExpression */:
109787
109910
  return emitCommaList(node);
109788
- case 350 /* MergeDeclarationMarker */:
109789
- case 351 /* EndOfDeclarationMarker */:
109911
+ case 351 /* MergeDeclarationMarker */:
109912
+ case 352 /* EndOfDeclarationMarker */:
109790
109913
  return;
109791
- case 352 /* SyntheticReferenceExpression */:
109914
+ case 353 /* SyntheticReferenceExpression */:
109792
109915
  return ts.Debug.fail("SyntheticReferenceExpression should not be printed");
109793
109916
  }
109794
109917
  }
@@ -109836,7 +109959,7 @@ var ts;
109836
109959
  }
109837
109960
  function emitHelpers(node) {
109838
109961
  var helpersEmitted = false;
109839
- var bundle = node.kind === 304 /* Bundle */ ? node : undefined;
109962
+ var bundle = node.kind === 305 /* Bundle */ ? node : undefined;
109840
109963
  if (bundle && moduleKind === ts.ModuleKind.None) {
109841
109964
  return;
109842
109965
  }
@@ -109936,7 +110059,7 @@ var ts;
109936
110059
  var pos = getTextPosWithWriteLine();
109937
110060
  writeUnparsedNode(unparsed);
109938
110061
  if (bundleFileInfo) {
109939
- updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind === 300 /* UnparsedText */ ?
110062
+ updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind === 301 /* UnparsedText */ ?
109940
110063
  "text" /* Text */ :
109941
110064
  "internal" /* Internal */);
109942
110065
  }
@@ -110034,7 +110157,7 @@ var ts;
110034
110157
  emit(node.dotDotDotToken);
110035
110158
  emitNodeWithWriter(node.name, writeParameter);
110036
110159
  emit(node.questionToken);
110037
- if (node.parent && node.parent.kind === 315 /* JSDocFunctionType */ && !node.name) {
110160
+ if (node.parent && node.parent.kind === 316 /* JSDocFunctionType */ && !node.name) {
110038
110161
  emit(node.type);
110039
110162
  }
110040
110163
  else {
@@ -110348,6 +110471,19 @@ var ts;
110348
110471
  writeKeyword("import");
110349
110472
  writePunctuation("(");
110350
110473
  emit(node.argument);
110474
+ if (node.assertions) {
110475
+ writePunctuation(",");
110476
+ writeSpace();
110477
+ writePunctuation("{");
110478
+ writeSpace();
110479
+ writeKeyword("assert");
110480
+ writePunctuation(":");
110481
+ writeSpace();
110482
+ var elements = node.assertions.assertClause.elements;
110483
+ emitList(node.assertions.assertClause, elements, 526226 /* ImportClauseEntries */);
110484
+ writeSpace();
110485
+ writePunctuation("}");
110486
+ }
110351
110487
  writePunctuation(")");
110352
110488
  if (node.qualifier) {
110353
110489
  writePunctuation(".");
@@ -111563,7 +111699,7 @@ var ts;
111563
111699
  }
111564
111700
  }
111565
111701
  if (node.tags) {
111566
- if (node.tags.length === 1 && node.tags[0].kind === 341 /* JSDocTypeTag */ && !node.comment) {
111702
+ if (node.tags.length === 1 && node.tags[0].kind === 342 /* JSDocTypeTag */ && !node.comment) {
111567
111703
  writeSpace();
111568
111704
  emit(node.tags[0]);
111569
111705
  }
@@ -111608,7 +111744,7 @@ var ts;
111608
111744
  function emitJSDocTypedefTag(tag) {
111609
111745
  emitJSDocTagName(tag.tagName);
111610
111746
  if (tag.typeExpression) {
111611
- if (tag.typeExpression.kind === 307 /* JSDocTypeExpression */) {
111747
+ if (tag.typeExpression.kind === 308 /* JSDocTypeExpression */) {
111612
111748
  emitJSDocTypeExpression(tag.typeExpression);
111613
111749
  }
111614
111750
  else {
@@ -111627,7 +111763,7 @@ var ts;
111627
111763
  emit(tag.fullName);
111628
111764
  }
111629
111765
  emitJSDocComment(tag.comment);
111630
- if (tag.typeExpression && tag.typeExpression.kind === 320 /* JSDocTypeLiteral */) {
111766
+ if (tag.typeExpression && tag.typeExpression.kind === 321 /* JSDocTypeLiteral */) {
111631
111767
  emitJSDocTypeLiteral(tag.typeExpression);
111632
111768
  }
111633
111769
  }
@@ -112687,8 +112823,8 @@ var ts;
112687
112823
  if (!node)
112688
112824
  return;
112689
112825
  switch (node.kind) {
112690
- case 294 /* PropertyAssignment */:
112691
- case 295 /* ShorthandPropertyAssignment */:
112826
+ case 295 /* PropertyAssignment */:
112827
+ case 296 /* ShorthandPropertyAssignment */:
112692
112828
  case 166 /* PropertyDeclaration */:
112693
112829
  case 168 /* MethodDeclaration */:
112694
112830
  case 171 /* GetAccessor */:
@@ -112975,7 +113111,7 @@ var ts;
112975
113111
  // Emit leading comments if the position is not synthesized and the node
112976
113112
  // has not opted out from emitting leading comments.
112977
113113
  if (!skipLeadingComments) {
112978
- emitLeadingComments(pos, /*isEmittedNode*/ node.kind !== 347 /* NotEmittedStatement */);
113114
+ emitLeadingComments(pos, /*isEmittedNode*/ node.kind !== 348 /* NotEmittedStatement */);
112979
113115
  }
112980
113116
  if (!skipLeadingComments || (pos >= 0 && (emitFlags & 512 /* NoLeadingComments */) !== 0)) {
112981
113117
  // Advance the container position if comments get emitted or if they've been disabled explicitly using NoLeadingComments.
@@ -113005,7 +113141,7 @@ var ts;
113005
113141
  declarationListContainerEnd = savedDeclarationListContainerEnd;
113006
113142
  // Emit trailing comments if the position is not synthesized and the node
113007
113143
  // has not opted out from emitting leading comments and is an emitted node.
113008
- if (!skipTrailingComments && node.kind !== 347 /* NotEmittedStatement */) {
113144
+ if (!skipTrailingComments && node.kind !== 348 /* NotEmittedStatement */) {
113009
113145
  emitTrailingComments(end);
113010
113146
  }
113011
113147
  }
@@ -113280,7 +113416,7 @@ var ts;
113280
113416
  }
113281
113417
  else {
113282
113418
  var source = sourceMapRange.source || sourceMapSource;
113283
- if (node.kind !== 347 /* NotEmittedStatement */
113419
+ if (node.kind !== 348 /* NotEmittedStatement */
113284
113420
  && (emitFlags & 16 /* NoLeadingSourceMap */) === 0
113285
113421
  && sourceMapRange.pos >= 0) {
113286
113422
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
@@ -113298,7 +113434,7 @@ var ts;
113298
113434
  if (emitFlags & 64 /* NoNestedSourceMaps */) {
113299
113435
  sourceMapsDisabled = false;
113300
113436
  }
113301
- if (node.kind !== 347 /* NotEmittedStatement */
113437
+ if (node.kind !== 348 /* NotEmittedStatement */
113302
113438
  && (emitFlags & 32 /* NoTrailingSourceMap */) === 0
113303
113439
  && sourceMapRange.end >= 0) {
113304
113440
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
@@ -114421,21 +114557,72 @@ var ts;
114421
114557
  }
114422
114558
  ts.getModeForResolutionAtIndex = getModeForResolutionAtIndex;
114423
114559
  /* @internal */
114424
- function getModeForUsageLocation(file, usage) {
114560
+ function isExclusivelyTypeOnlyImportOrExport(decl) {
114425
114561
  var _a;
114562
+ if (ts.isExportDeclaration(decl)) {
114563
+ return decl.isTypeOnly;
114564
+ }
114565
+ if ((_a = decl.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly) {
114566
+ return true;
114567
+ }
114568
+ return false;
114569
+ }
114570
+ ts.isExclusivelyTypeOnlyImportOrExport = isExclusivelyTypeOnlyImportOrExport;
114571
+ /* @internal */
114572
+ function getModeForUsageLocation(file, usage) {
114573
+ var _a, _b;
114426
114574
  if (file.impliedNodeFormat === undefined)
114427
114575
  return undefined;
114576
+ if ((ts.isImportDeclaration(usage.parent) || ts.isExportDeclaration(usage.parent))) {
114577
+ var isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
114578
+ if (isTypeOnly) {
114579
+ var override = getResolutionModeOverrideForClause(usage.parent.assertClause);
114580
+ if (override) {
114581
+ return override;
114582
+ }
114583
+ }
114584
+ }
114585
+ if (usage.parent.parent && ts.isImportTypeNode(usage.parent.parent)) {
114586
+ var override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) === null || _a === void 0 ? void 0 : _a.assertClause);
114587
+ if (override) {
114588
+ return override;
114589
+ }
114590
+ }
114428
114591
  if (file.impliedNodeFormat !== ts.ModuleKind.ESNext) {
114429
114592
  // in cjs files, import call expressions are esm format, otherwise everything is cjs
114430
114593
  return ts.isImportCall(ts.walkUpParenthesizedExpressions(usage.parent)) ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
114431
114594
  }
114432
114595
  // in esm files, import=require statements are cjs format, otherwise everything is esm
114433
114596
  // imports are only parent'd up to their containing declaration/expression, so access farther parents with care
114434
- var exprParentParent = (_a = ts.walkUpParenthesizedExpressions(usage.parent)) === null || _a === void 0 ? void 0 : _a.parent;
114597
+ var exprParentParent = (_b = ts.walkUpParenthesizedExpressions(usage.parent)) === null || _b === void 0 ? void 0 : _b.parent;
114435
114598
  return exprParentParent && ts.isImportEqualsDeclaration(exprParentParent) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
114436
114599
  }
114437
114600
  ts.getModeForUsageLocation = getModeForUsageLocation;
114438
114601
  /* @internal */
114602
+ function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) {
114603
+ if (!clause)
114604
+ return undefined;
114605
+ if (ts.length(clause.elements) !== 1) {
114606
+ grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(clause, ts.Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require);
114607
+ return undefined;
114608
+ }
114609
+ var elem = clause.elements[0];
114610
+ if (!ts.isStringLiteralLike(elem.name))
114611
+ return undefined;
114612
+ if (elem.name.text !== "resolution-mode") {
114613
+ grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.name, ts.Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions);
114614
+ return undefined;
114615
+ }
114616
+ if (!ts.isStringLiteralLike(elem.value))
114617
+ return undefined;
114618
+ if (elem.value.text !== "import" && elem.value.text !== "require") {
114619
+ grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.value, ts.Diagnostics.resolution_mode_should_be_either_require_or_import);
114620
+ return undefined;
114621
+ }
114622
+ return elem.value.text === "import" ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
114623
+ }
114624
+ ts.getResolutionModeOverrideForClause = getResolutionModeOverrideForClause;
114625
+ /* @internal */
114439
114626
  function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
114440
114627
  if (names.length === 0) {
114441
114628
  return [];
@@ -120082,8 +120269,9 @@ var ts;
120082
120269
  // Because when this is called by the file renamer, `importingSourceFile` is the file being renamed,
120083
120270
  // while `importingSourceFileName` its *new* name. We need a source file just to get its
120084
120271
  // `impliedNodeFormat` and to detect certain preferences from existing import module specifiers.
120085
- function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier) {
120086
- var res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host), {});
120272
+ function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier, options) {
120273
+ if (options === void 0) { options = {}; }
120274
+ var res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host), {}, options);
120087
120275
  if (res === oldImportSpecifier)
120088
120276
  return undefined;
120089
120277
  return res;
@@ -120095,65 +120283,77 @@ var ts;
120095
120283
  // one currently being produced; the latter to the one being imported). We need an implementation file
120096
120284
  // just to get its `impliedNodeFormat` and to detect certain preferences from existing import module
120097
120285
  // specifiers.
120098
- function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host) {
120099
- return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferences(host, {}, compilerOptions, importingSourceFile), {});
120286
+ function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, options) {
120287
+ if (options === void 0) { options = {}; }
120288
+ return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferences(host, {}, compilerOptions, importingSourceFile), {}, options);
120100
120289
  }
120101
120290
  moduleSpecifiers_1.getModuleSpecifier = getModuleSpecifier;
120102
- function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences) {
120291
+ function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options) {
120292
+ if (options === void 0) { options = {}; }
120103
120293
  var info = getInfo(importingSourceFile.path, host);
120104
- var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences);
120105
- return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, /*packageNameOnly*/ true); });
120294
+ var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
120295
+ return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, /*packageNameOnly*/ true, options.overrideImportMode); });
120106
120296
  }
120107
120297
  moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
120108
- function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences) {
120298
+ function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
120299
+ if (options === void 0) { options = {}; }
120109
120300
  var info = getInfo(importingSourceFileName, host);
120110
- var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences);
120111
- return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions); }) ||
120301
+ var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
120302
+ return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, /*packageNameOnly*/ undefined, options.overrideImportMode); }) ||
120112
120303
  getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
120113
120304
  }
120114
- function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences) {
120115
- return tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences)[0];
120305
+ function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
120306
+ if (options === void 0) { options = {}; }
120307
+ return tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options)[0];
120116
120308
  }
120117
120309
  moduleSpecifiers_1.tryGetModuleSpecifiersFromCache = tryGetModuleSpecifiersFromCache;
120118
- function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences) {
120310
+ function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options) {
120119
120311
  var _a;
120312
+ if (options === void 0) { options = {}; }
120120
120313
  var moduleSourceFile = ts.getSourceFileOfModule(moduleSymbol);
120121
120314
  if (!moduleSourceFile) {
120122
120315
  return ts.emptyArray;
120123
120316
  }
120124
120317
  var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
120125
- var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences);
120318
+ var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences, options);
120126
120319
  return [cached === null || cached === void 0 ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached === null || cached === void 0 ? void 0 : cached.modulePaths, cache];
120127
120320
  }
120128
120321
  /** Returns an import for each symlink and for the realpath. */
120129
- function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
120130
- return getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences).moduleSpecifiers;
120322
+ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
120323
+ if (options === void 0) { options = {}; }
120324
+ return getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options).moduleSpecifiers;
120131
120325
  }
120132
120326
  moduleSpecifiers_1.getModuleSpecifiers = getModuleSpecifiers;
120133
- function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
120327
+ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
120328
+ if (options === void 0) { options = {}; }
120134
120329
  var computedWithoutCache = false;
120135
120330
  var ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
120136
120331
  if (ambient)
120137
120332
  return { moduleSpecifiers: [ambient], computedWithoutCache: computedWithoutCache };
120138
120333
  // eslint-disable-next-line prefer-const
120139
- var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
120334
+ var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
120140
120335
  if (specifiers)
120141
120336
  return { moduleSpecifiers: specifiers, computedWithoutCache: computedWithoutCache };
120142
120337
  if (!moduleSourceFile)
120143
120338
  return { moduleSpecifiers: ts.emptyArray, computedWithoutCache: computedWithoutCache };
120144
120339
  computedWithoutCache = true;
120145
120340
  modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
120146
- var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences);
120147
- cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, modulePaths, result);
120341
+ var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options);
120342
+ cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
120148
120343
  return { moduleSpecifiers: result, computedWithoutCache: computedWithoutCache };
120149
120344
  }
120150
120345
  moduleSpecifiers_1.getModuleSpecifiersWithCacheInfo = getModuleSpecifiersWithCacheInfo;
120151
- function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences) {
120346
+ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options) {
120347
+ if (options === void 0) { options = {}; }
120152
120348
  var info = getInfo(importingSourceFile.path, host);
120153
120349
  var preferences = getPreferences(host, userPreferences, compilerOptions, importingSourceFile);
120154
120350
  var existingSpecifier = ts.forEach(modulePaths, function (modulePath) { return ts.forEach(host.getFileIncludeReasons().get(ts.toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), function (reason) {
120155
120351
  if (reason.kind !== ts.FileIncludeKind.Import || reason.file !== importingSourceFile.path)
120156
120352
  return undefined;
120353
+ // If the candidate import mode doesn't match the mode we're generating for, don't consider it
120354
+ // TODO: maybe useful to keep around as an alternative option for certain contexts where the mode is overridable
120355
+ if (importingSourceFile.impliedNodeFormat && importingSourceFile.impliedNodeFormat !== ts.getModeForResolutionAtIndex(importingSourceFile, reason.index))
120356
+ return undefined;
120157
120357
  var specifier = ts.getModuleNameStringLiteralAt(importingSourceFile, reason.index).text;
120158
120358
  // If the preference is for non relative and the module specifier is relative, ignore it
120159
120359
  return preferences.relativePreference !== 1 /* NonRelative */ || !ts.pathIsRelative(specifier) ?
@@ -120175,7 +120375,7 @@ var ts;
120175
120375
  var relativeSpecifiers;
120176
120376
  for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
120177
120377
  var modulePath = modulePaths_1[_i];
120178
- var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions);
120378
+ var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, /*packageNameOnly*/ undefined, options.overrideImportMode);
120179
120379
  nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
120180
120380
  if (specifier && modulePath.isRedirect) {
120181
120381
  // If we got a specifier for a redirect, it was a bare package specifier (e.g. "@foo/bar",
@@ -120351,18 +120551,19 @@ var ts;
120351
120551
  * Looks for existing imports that use symlinks to this module.
120352
120552
  * Symlinks will be returned first so they are preferred over the real path.
120353
120553
  */
120354
- function getAllModulePaths(importingFilePath, importedFileName, host, preferences, importedFilePath) {
120554
+ function getAllModulePaths(importingFilePath, importedFileName, host, preferences, options) {
120355
120555
  var _a;
120356
- if (importedFilePath === void 0) { importedFilePath = ts.toPath(importedFileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host)); }
120556
+ if (options === void 0) { options = {}; }
120557
+ var importedFilePath = ts.toPath(importedFileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host));
120357
120558
  var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
120358
120559
  if (cache) {
120359
- var cached = cache.get(importingFilePath, importedFilePath, preferences);
120560
+ var cached = cache.get(importingFilePath, importedFilePath, preferences, options);
120360
120561
  if (cached === null || cached === void 0 ? void 0 : cached.modulePaths)
120361
120562
  return cached.modulePaths;
120362
120563
  }
120363
120564
  var modulePaths = getAllModulePathsWorker(importingFilePath, importedFileName, host);
120364
120565
  if (cache) {
120365
- cache.setModulePaths(importingFilePath, importedFilePath, preferences, modulePaths);
120566
+ cache.setModulePaths(importingFilePath, importedFilePath, preferences, options, modulePaths);
120366
120567
  }
120367
120568
  return modulePaths;
120368
120569
  }
@@ -120567,7 +120768,7 @@ var ts;
120567
120768
  ? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
120568
120769
  : ts.removeFileExtension(relativePath);
120569
120770
  }
120570
- function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly) {
120771
+ function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
120571
120772
  var path = _a.path, isRedirect = _a.isRedirect;
120572
120773
  var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
120573
120774
  if (!host.fileExists || !host.readFile) {
@@ -120637,7 +120838,7 @@ var ts;
120637
120838
  // an ImportEqualsDeclaration in an ESM-implied file or an ImportCall in a CJS-implied file. But since this function is
120638
120839
  // usually called to conjure an import out of thin air, we don't have an existing usage to call `getModeForUsageAtIndex`
120639
120840
  // with, so for now we just stick with the mode of the file.
120640
- var conditions = ["node", importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
120841
+ var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
120641
120842
  var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
120642
120843
  ? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)
120643
120844
  : undefined;