typescript 5.0.0-dev.20230116 → 5.0.0-dev.20230118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsserver.js CHANGED
@@ -1001,6 +1001,8 @@ __export(server_exports, {
1001
1001
  getJSDocReturnTag: () => getJSDocReturnTag,
1002
1002
  getJSDocReturnType: () => getJSDocReturnType,
1003
1003
  getJSDocRoot: () => getJSDocRoot,
1004
+ getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
1005
+ getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
1004
1006
  getJSDocTags: () => getJSDocTags,
1005
1007
  getJSDocTagsNoCache: () => getJSDocTagsNoCache,
1006
1008
  getJSDocTemplateTag: () => getJSDocTemplateTag,
@@ -1340,6 +1342,7 @@ __export(server_exports, {
1340
1342
  isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
1341
1343
  isArray: () => isArray,
1342
1344
  isArrayBindingElement: () => isArrayBindingElement,
1345
+ isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
1343
1346
  isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
1344
1347
  isArrayBindingPattern: () => isArrayBindingPattern,
1345
1348
  isArrayLiteralExpression: () => isArrayLiteralExpression,
@@ -1372,6 +1375,7 @@ __export(server_exports, {
1372
1375
  isBindableStaticNameExpression: () => isBindableStaticNameExpression,
1373
1376
  isBindingElement: () => isBindingElement,
1374
1377
  isBindingName: () => isBindingName,
1378
+ isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
1375
1379
  isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
1376
1380
  isBindingPattern: () => isBindingPattern,
1377
1381
  isBlock: () => isBlock,
@@ -1578,6 +1582,7 @@ __export(server_exports, {
1578
1582
  isInferTypeNode: () => isInferTypeNode,
1579
1583
  isInfinityOrNaNString: () => isInfinityOrNaNString,
1580
1584
  isInitializedProperty: () => isInitializedProperty,
1585
+ isInitializedVariable: () => isInitializedVariable,
1581
1586
  isInsideJsxElement: () => isInsideJsxElement,
1582
1587
  isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
1583
1588
  isInsideNodeModules: () => isInsideNodeModules,
@@ -1627,6 +1632,8 @@ __export(server_exports, {
1627
1632
  isJSDocPublicTag: () => isJSDocPublicTag,
1628
1633
  isJSDocReadonlyTag: () => isJSDocReadonlyTag,
1629
1634
  isJSDocReturnTag: () => isJSDocReturnTag,
1635
+ isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
1636
+ isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
1630
1637
  isJSDocSeeTag: () => isJSDocSeeTag,
1631
1638
  isJSDocSignature: () => isJSDocSignature,
1632
1639
  isJSDocTag: () => isJSDocTag,
@@ -1682,11 +1689,14 @@ __export(server_exports, {
1682
1689
  isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
1683
1690
  isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
1684
1691
  isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
1692
+ isLiteralTypeLiteral: () => isLiteralTypeLiteral,
1685
1693
  isLiteralTypeNode: () => isLiteralTypeNode,
1686
1694
  isLocalName: () => isLocalName,
1687
1695
  isLogicalOperator: () => isLogicalOperator,
1688
1696
  isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
1689
1697
  isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
1698
+ isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
1699
+ isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
1690
1700
  isMappedTypeNode: () => isMappedTypeNode,
1691
1701
  isMemberName: () => isMemberName,
1692
1702
  isMergeDeclarationMarker: () => isMergeDeclarationMarker,
@@ -2372,6 +2382,7 @@ __export(server_exports, {
2372
2382
  tryGetDirectories: () => tryGetDirectories,
2373
2383
  tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
2374
2384
  tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
2385
+ tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
2375
2386
  tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
2376
2387
  tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
2377
2388
  tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
@@ -2671,7 +2682,7 @@ __export(ts_server_exports3, {
2671
2682
 
2672
2683
  // src/compiler/corePublic.ts
2673
2684
  var versionMajorMinor = "5.0";
2674
- var version = `${versionMajorMinor}.0-dev.20230116`;
2685
+ var version = `${versionMajorMinor}.0-dev.20230118`;
2675
2686
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2676
2687
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2677
2688
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6471,14 +6482,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6471
6482
  SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag";
6472
6483
  SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag";
6473
6484
  SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag";
6474
- SyntaxKind5[SyntaxKind5["SyntaxList"] = 353] = "SyntaxList";
6475
- SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 354] = "NotEmittedStatement";
6476
- SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 355] = "PartiallyEmittedExpression";
6477
- SyntaxKind5[SyntaxKind5["CommaListExpression"] = 356] = "CommaListExpression";
6478
- SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 357] = "MergeDeclarationMarker";
6479
- SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 358] = "EndOfDeclarationMarker";
6480
- SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 359] = "SyntheticReferenceExpression";
6481
- SyntaxKind5[SyntaxKind5["Count"] = 360] = "Count";
6485
+ SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag";
6486
+ SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList";
6487
+ SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement";
6488
+ SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression";
6489
+ SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression";
6490
+ SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker";
6491
+ SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker";
6492
+ SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression";
6493
+ SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count";
6482
6494
  SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
6483
6495
  SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
6484
6496
  SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -6507,9 +6519,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6507
6519
  SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
6508
6520
  SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
6509
6521
  SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
6510
- SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 352 /* JSDocThrowsTag */] = "LastJSDocNode";
6522
+ SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode";
6511
6523
  SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
6512
- SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 352 /* JSDocThrowsTag */] = "LastJSDocTagNode";
6524
+ SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
6513
6525
  SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
6514
6526
  SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
6515
6527
  return SyntaxKind5;
@@ -10671,7 +10683,7 @@ var Diagnostics = {
10671
10683
  Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
10672
10684
  Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
10673
10685
  Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."),
10674
- Option_allowImportingTsExtensions_can_only_be_used_when_moduleResolution_is_set_to_bundler_and_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_moduleResolution_is_set_to_bundler_and_eithe_5096", "Option 'allowImportingTsExtensions' can only be used when 'moduleResolution' is set to 'bundler' and either 'noEmit' or 'emitDeclarationOnly' is set."),
10686
+ Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
10675
10687
  An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
10676
10688
  Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
10677
10689
  Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(5099, 1 /* Error */, "Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Aster_5099", `Import assignment is not allowed when 'moduleResolution' is set to 'bundler'. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
@@ -11593,7 +11605,8 @@ var Diagnostics = {
11593
11605
  _0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
11594
11606
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
11595
11607
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
11596
- The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here.")
11608
+ The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
11609
+ Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string.")
11597
11610
  };
11598
11611
 
11599
11612
  // src/compiler/scanner.ts
@@ -12204,10 +12217,7 @@ function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
12204
12217
  initial
12205
12218
  );
12206
12219
  }
12207
- function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
12208
- if (!comments) {
12209
- comments = [];
12210
- }
12220
+ function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
12211
12221
  comments.push({ kind, pos, end, hasTrailingNewLine });
12212
12222
  return comments;
12213
12223
  }
@@ -13990,7 +14000,10 @@ function getOriginalNode(node, nodeTest) {
13990
14000
  node = node.original;
13991
14001
  }
13992
14002
  }
13993
- return !nodeTest || nodeTest(node) ? node : void 0;
14003
+ if (!node || !nodeTest) {
14004
+ return node;
14005
+ }
14006
+ return nodeTest(node) ? node : void 0;
13994
14007
  }
13995
14008
  function findAncestor(node, callback) {
13996
14009
  while (node) {
@@ -14308,6 +14321,9 @@ function getJSDocReturnTag(node) {
14308
14321
  function getJSDocTemplateTag(node) {
14309
14322
  return getFirstJSDocTag(node, isJSDocTemplateTag);
14310
14323
  }
14324
+ function getJSDocSatisfiesTag(node) {
14325
+ return getFirstJSDocTag(node, isJSDocSatisfiesTag);
14326
+ }
14311
14327
  function getJSDocTypeTag(node) {
14312
14328
  const tag = getFirstJSDocTag(node, isJSDocTypeTag);
14313
14329
  if (tag && tag.typeExpression && tag.typeExpression.type) {
@@ -14731,6 +14747,9 @@ function isDeclarationBindingElement(bindingElement) {
14731
14747
  }
14732
14748
  return false;
14733
14749
  }
14750
+ function isBindingOrAssignmentElement(node) {
14751
+ return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
14752
+ }
14734
14753
  function isBindingOrAssignmentPattern(node) {
14735
14754
  return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
14736
14755
  }
@@ -14760,6 +14779,24 @@ function isArrayBindingOrAssignmentPattern(node) {
14760
14779
  }
14761
14780
  return false;
14762
14781
  }
14782
+ function isArrayBindingOrAssignmentElement(node) {
14783
+ switch (node.kind) {
14784
+ case 205 /* BindingElement */:
14785
+ case 229 /* OmittedExpression */:
14786
+ case 227 /* SpreadElement */:
14787
+ case 206 /* ArrayLiteralExpression */:
14788
+ case 207 /* ObjectLiteralExpression */:
14789
+ case 79 /* Identifier */:
14790
+ case 208 /* PropertyAccessExpression */:
14791
+ case 209 /* ElementAccessExpression */:
14792
+ return true;
14793
+ }
14794
+ return isAssignmentExpression(
14795
+ node,
14796
+ /*excludeCompoundAssignment*/
14797
+ true
14798
+ );
14799
+ }
14763
14800
  function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
14764
14801
  const kind = node.kind;
14765
14802
  return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
@@ -14855,6 +14892,18 @@ function isUnaryExpressionWithWrite(expr) {
14855
14892
  return false;
14856
14893
  }
14857
14894
  }
14895
+ function isLiteralTypeLiteral(node) {
14896
+ node = skipPartiallyEmittedExpressions(node);
14897
+ switch (skipPartiallyEmittedExpressions(node).kind) {
14898
+ case 104 /* NullKeyword */:
14899
+ case 110 /* TrueKeyword */:
14900
+ case 95 /* FalseKeyword */:
14901
+ case 221 /* PrefixUnaryExpression */:
14902
+ return true;
14903
+ default:
14904
+ return isLiteralExpression(node);
14905
+ }
14906
+ }
14858
14907
  function isExpression(node) {
14859
14908
  return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
14860
14909
  }
@@ -14867,8 +14916,8 @@ function isExpressionKind(kind) {
14867
14916
  case 227 /* SpreadElement */:
14868
14917
  case 231 /* AsExpression */:
14869
14918
  case 229 /* OmittedExpression */:
14870
- case 356 /* CommaListExpression */:
14871
- case 355 /* PartiallyEmittedExpression */:
14919
+ case 357 /* CommaListExpression */:
14920
+ case 356 /* PartiallyEmittedExpression */:
14872
14921
  case 235 /* SatisfiesExpression */:
14873
14922
  return true;
14874
14923
  default:
@@ -15053,7 +15102,7 @@ function isDeclarationStatementKind(kind) {
15053
15102
  return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */;
15054
15103
  }
15055
15104
  function isStatementKindButNotDeclarationKind(kind) {
15056
- return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 354 /* NotEmittedStatement */ || kind === 358 /* EndOfDeclarationMarker */ || kind === 357 /* MergeDeclarationMarker */;
15105
+ return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */;
15057
15106
  }
15058
15107
  function isDeclaration(node) {
15059
15108
  if (node.kind === 165 /* TypeParameter */) {
@@ -15114,13 +15163,13 @@ function isCaseOrDefaultClause(node) {
15114
15163
  return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
15115
15164
  }
15116
15165
  function isJSDocNode(node) {
15117
- return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 352 /* LastJSDocNode */;
15166
+ return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */;
15118
15167
  }
15119
15168
  function isJSDocCommentContainingNode(node) {
15120
15169
  return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
15121
15170
  }
15122
15171
  function isJSDocTag(node) {
15123
- return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 352 /* LastJSDocTagNode */;
15172
+ return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */;
15124
15173
  }
15125
15174
  function isSetAccessor(node) {
15126
15175
  return node.kind === 175 /* SetAccessor */;
@@ -15536,7 +15585,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
15536
15585
  if (includeJsDoc && hasJSDocNodes(node)) {
15537
15586
  return getTokenPosOfNode(node.jsDoc[0], sourceFile);
15538
15587
  }
15539
- if (node.kind === 353 /* SyntaxList */ && node._children.length > 0) {
15588
+ if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) {
15540
15589
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
15541
15590
  }
15542
15591
  return skipTrivia(
@@ -15845,6 +15894,7 @@ function isBlockScope(node, parentNode) {
15845
15894
  return false;
15846
15895
  }
15847
15896
  function isDeclarationWithTypeParameters(node) {
15897
+ Debug.type(node);
15848
15898
  switch (node.kind) {
15849
15899
  case 341 /* JSDocCallbackTag */:
15850
15900
  case 349 /* JSDocTypedefTag */:
@@ -15856,6 +15906,7 @@ function isDeclarationWithTypeParameters(node) {
15856
15906
  }
15857
15907
  }
15858
15908
  function isDeclarationWithTypeParameterChildren(node) {
15909
+ Debug.type(node);
15859
15910
  switch (node.kind) {
15860
15911
  case 176 /* CallSignature */:
15861
15912
  case 177 /* ConstructSignature */:
@@ -17414,7 +17465,7 @@ function filterOwnedJSDocTags(hostNode, jsDoc) {
17414
17465
  return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0;
17415
17466
  }
17416
17467
  function ownsJSDocTag(hostNode, tag) {
17417
- return !isJSDocTypeTag(tag) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
17468
+ return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
17418
17469
  }
17419
17470
  function getNextJSDocCommentLocation(node) {
17420
17471
  const parent2 = node.parent;
@@ -17997,7 +18048,7 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => {
17997
18048
  })(OperatorPrecedence || {});
17998
18049
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
17999
18050
  switch (nodeKind) {
18000
- case 356 /* CommaListExpression */:
18051
+ case 357 /* CommaListExpression */:
18001
18052
  return 0 /* Comma */;
18002
18053
  case 227 /* SpreadElement */:
18003
18054
  return 1 /* Spread */;
@@ -18999,14 +19050,23 @@ function modifierToFlag(token) {
18999
19050
  }
19000
19051
  return 0 /* None */;
19001
19052
  }
19053
+ function isBinaryLogicalOperator(token) {
19054
+ return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */;
19055
+ }
19002
19056
  function isLogicalOperator(token) {
19003
- return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */ || token === 53 /* ExclamationToken */;
19057
+ return isBinaryLogicalOperator(token) || token === 53 /* ExclamationToken */;
19004
19058
  }
19005
19059
  function isLogicalOrCoalescingAssignmentOperator(token) {
19006
19060
  return token === 75 /* BarBarEqualsToken */ || token === 76 /* AmpersandAmpersandEqualsToken */ || token === 77 /* QuestionQuestionEqualsToken */;
19007
19061
  }
19008
19062
  function isLogicalOrCoalescingAssignmentExpression(expr) {
19009
- return isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
19063
+ return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
19064
+ }
19065
+ function isLogicalOrCoalescingBinaryOperator(token) {
19066
+ return isBinaryLogicalOperator(token) || token === 60 /* QuestionQuestionToken */;
19067
+ }
19068
+ function isLogicalOrCoalescingBinaryExpression(expr) {
19069
+ return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);
19010
19070
  }
19011
19071
  function isAssignmentOperator(token) {
19012
19072
  return token >= 63 /* FirstAssignment */ && token <= 78 /* LastAssignment */;
@@ -19383,7 +19443,7 @@ function getInitializedVariables(node) {
19383
19443
  return filter(node.declarations, isInitializedVariable);
19384
19444
  }
19385
19445
  function isInitializedVariable(node) {
19386
- return node.initializer !== void 0;
19446
+ return isVariableDeclaration(node) && node.initializer !== void 0;
19387
19447
  }
19388
19448
  function isWatchSet(options) {
19389
19449
  return options.watch && hasProperty(options, "watch");
@@ -19570,7 +19630,7 @@ function isObjectTypeDeclaration(node) {
19570
19630
  return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node);
19571
19631
  }
19572
19632
  function isTypeNodeKind(kind) {
19573
- return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */;
19633
+ return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */;
19574
19634
  }
19575
19635
  function isAccessExpression(node) {
19576
19636
  return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
@@ -19652,7 +19712,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
19652
19712
  case 209 /* ElementAccessExpression */:
19653
19713
  case 208 /* PropertyAccessExpression */:
19654
19714
  case 232 /* NonNullExpression */:
19655
- case 355 /* PartiallyEmittedExpression */:
19715
+ case 356 /* PartiallyEmittedExpression */:
19656
19716
  case 235 /* SatisfiesExpression */:
19657
19717
  node = node.expression;
19658
19718
  continue;
@@ -20966,7 +21026,7 @@ function getContainingNodeArray(node) {
20966
21026
  return parent2.types;
20967
21027
  case 186 /* TupleType */:
20968
21028
  case 206 /* ArrayLiteralExpression */:
20969
- case 356 /* CommaListExpression */:
21029
+ case 357 /* CommaListExpression */:
20970
21030
  case 272 /* NamedImports */:
20971
21031
  case 276 /* NamedExports */:
20972
21032
  return parent2.elements;
@@ -21151,6 +21211,16 @@ function isNonNullAccess(node) {
21151
21211
  const kind = node.kind;
21152
21212
  return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
21153
21213
  }
21214
+ function isJSDocSatisfiesExpression(node) {
21215
+ return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);
21216
+ }
21217
+ function getJSDocSatisfiesExpressionType(node) {
21218
+ return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));
21219
+ }
21220
+ function tryGetJSDocSatisfiesTypeNode(node) {
21221
+ const tag = getJSDocSatisfiesTag(node);
21222
+ return tag && tag.typeExpression && tag.typeExpression.type;
21223
+ }
21154
21224
 
21155
21225
  // src/compiler/factory/baseNodeFactory.ts
21156
21226
  function createBaseNodeFactory() {
@@ -22175,6 +22245,12 @@ function createNodeFactory(flags, baseFactory2) {
22175
22245
  get updateJSDocThrowsTag() {
22176
22246
  return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */);
22177
22247
  },
22248
+ get createJSDocSatisfiesTag() {
22249
+ return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */);
22250
+ },
22251
+ get updateJSDocSatisfiesTag() {
22252
+ return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */);
22253
+ },
22178
22254
  createJSDocEnumTag: createJSDocEnumTag2,
22179
22255
  updateJSDocEnumTag,
22180
22256
  createJSDocUnknownTag,
@@ -25334,18 +25410,18 @@ function createNodeFactory(flags, baseFactory2) {
25334
25410
  return node;
25335
25411
  }
25336
25412
  function createSyntaxList3(children) {
25337
- const node = createBaseNode(353 /* SyntaxList */);
25413
+ const node = createBaseNode(354 /* SyntaxList */);
25338
25414
  node._children = children;
25339
25415
  return node;
25340
25416
  }
25341
25417
  function createNotEmittedStatement2(original) {
25342
- const node = createBaseNode(354 /* NotEmittedStatement */);
25418
+ const node = createBaseNode(355 /* NotEmittedStatement */);
25343
25419
  node.original = original;
25344
25420
  setTextRange(node, original);
25345
25421
  return node;
25346
25422
  }
25347
25423
  function createPartiallyEmittedExpression2(expression, original) {
25348
- const node = createBaseNode(355 /* PartiallyEmittedExpression */);
25424
+ const node = createBaseNode(356 /* PartiallyEmittedExpression */);
25349
25425
  node.expression = expression;
25350
25426
  node.original = original;
25351
25427
  node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
@@ -25367,7 +25443,7 @@ function createNodeFactory(flags, baseFactory2) {
25367
25443
  return node;
25368
25444
  }
25369
25445
  function createCommaListExpression(elements) {
25370
- const node = createBaseNode(356 /* CommaListExpression */);
25446
+ const node = createBaseNode(357 /* CommaListExpression */);
25371
25447
  node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements));
25372
25448
  node.transformFlags |= propagateChildrenFlags(node.elements);
25373
25449
  return node;
@@ -25376,19 +25452,19 @@ function createNodeFactory(flags, baseFactory2) {
25376
25452
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
25377
25453
  }
25378
25454
  function createEndOfDeclarationMarker(original) {
25379
- const node = createBaseNode(358 /* EndOfDeclarationMarker */);
25455
+ const node = createBaseNode(359 /* EndOfDeclarationMarker */);
25380
25456
  node.emitNode = {};
25381
25457
  node.original = original;
25382
25458
  return node;
25383
25459
  }
25384
25460
  function createMergeDeclarationMarker(original) {
25385
- const node = createBaseNode(357 /* MergeDeclarationMarker */);
25461
+ const node = createBaseNode(358 /* MergeDeclarationMarker */);
25386
25462
  node.emitNode = {};
25387
25463
  node.original = original;
25388
25464
  return node;
25389
25465
  }
25390
25466
  function createSyntheticReferenceExpression(expression, thisArg) {
25391
- const node = createBaseNode(359 /* SyntheticReferenceExpression */);
25467
+ const node = createBaseNode(360 /* SyntheticReferenceExpression */);
25392
25468
  node.expression = expression;
25393
25469
  node.thisArg = thisArg;
25394
25470
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -25628,7 +25704,7 @@ function createNodeFactory(flags, baseFactory2) {
25628
25704
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
25629
25705
  case 232 /* NonNullExpression */:
25630
25706
  return updateNonNullExpression2(outerExpression, expression);
25631
- case 355 /* PartiallyEmittedExpression */:
25707
+ case 356 /* PartiallyEmittedExpression */:
25632
25708
  return updatePartiallyEmittedExpression2(outerExpression, expression);
25633
25709
  }
25634
25710
  }
@@ -26164,7 +26240,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
26164
26240
  case 213 /* TypeAssertionExpression */:
26165
26241
  case 235 /* SatisfiesExpression */:
26166
26242
  case 231 /* AsExpression */:
26167
- case 355 /* PartiallyEmittedExpression */:
26243
+ case 356 /* PartiallyEmittedExpression */:
26168
26244
  case 214 /* ParenthesizedExpression */:
26169
26245
  case 106 /* SuperKeyword */:
26170
26246
  return -2147483648 /* OuterExpressionExcludes */;
@@ -27803,10 +27879,10 @@ function isSyntheticExpression(node) {
27803
27879
  return node.kind === 234 /* SyntheticExpression */;
27804
27880
  }
27805
27881
  function isPartiallyEmittedExpression(node) {
27806
- return node.kind === 355 /* PartiallyEmittedExpression */;
27882
+ return node.kind === 356 /* PartiallyEmittedExpression */;
27807
27883
  }
27808
27884
  function isCommaListExpression(node) {
27809
- return node.kind === 356 /* CommaListExpression */;
27885
+ return node.kind === 357 /* CommaListExpression */;
27810
27886
  }
27811
27887
  function isTemplateSpan(node) {
27812
27888
  return node.kind === 236 /* TemplateSpan */;
@@ -27950,16 +28026,16 @@ function isMissingDeclaration(node) {
27950
28026
  return node.kind === 279 /* MissingDeclaration */;
27951
28027
  }
27952
28028
  function isNotEmittedStatement(node) {
27953
- return node.kind === 354 /* NotEmittedStatement */;
28029
+ return node.kind === 355 /* NotEmittedStatement */;
27954
28030
  }
27955
28031
  function isSyntheticReference(node) {
27956
- return node.kind === 359 /* SyntheticReferenceExpression */;
28032
+ return node.kind === 360 /* SyntheticReferenceExpression */;
27957
28033
  }
27958
28034
  function isMergeDeclarationMarker(node) {
27959
- return node.kind === 357 /* MergeDeclarationMarker */;
28035
+ return node.kind === 358 /* MergeDeclarationMarker */;
27960
28036
  }
27961
28037
  function isEndOfDeclarationMarker(node) {
27962
- return node.kind === 358 /* EndOfDeclarationMarker */;
28038
+ return node.kind === 359 /* EndOfDeclarationMarker */;
27963
28039
  }
27964
28040
  function isExternalModuleReference(node) {
27965
28041
  return node.kind === 280 /* ExternalModuleReference */;
@@ -28150,11 +28226,14 @@ function isJSDocPropertyTag(node) {
28150
28226
  function isJSDocImplementsTag(node) {
28151
28227
  return node.kind === 332 /* JSDocImplementsTag */;
28152
28228
  }
28229
+ function isJSDocSatisfiesTag(node) {
28230
+ return node.kind === 353 /* JSDocSatisfiesTag */;
28231
+ }
28153
28232
  function isJSDocThrowsTag(node) {
28154
28233
  return node.kind === 352 /* JSDocThrowsTag */;
28155
28234
  }
28156
28235
  function isSyntaxList(n) {
28157
- return n.kind === 353 /* SyntaxList */;
28236
+ return n.kind === 354 /* SyntaxList */;
28158
28237
  }
28159
28238
 
28160
28239
  // src/compiler/factory/utilities.ts
@@ -28522,7 +28601,7 @@ function startsWithUseStrict(statements) {
28522
28601
  return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
28523
28602
  }
28524
28603
  function isCommaSequence(node) {
28525
- return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 356 /* CommaListExpression */;
28604
+ return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 357 /* CommaListExpression */;
28526
28605
  }
28527
28606
  function isJSDocTypeAssertion(node) {
28528
28607
  return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
@@ -28545,7 +28624,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
28545
28624
  return (kinds & 2 /* TypeAssertions */) !== 0;
28546
28625
  case 232 /* NonNullExpression */:
28547
28626
  return (kinds & 4 /* NonNullAssertions */) !== 0;
28548
- case 355 /* PartiallyEmittedExpression */:
28627
+ case 356 /* PartiallyEmittedExpression */:
28549
28628
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
28550
28629
  }
28551
28630
  return false;
@@ -29548,7 +29627,7 @@ var forEachChildTable = {
29548
29627
  [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
29549
29628
  return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
29550
29629
  },
29551
- [356 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
29630
+ [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
29552
29631
  return visitNodes(cbNode, cbNodes, node.elements);
29553
29632
  },
29554
29633
  [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
@@ -29620,6 +29699,7 @@ var forEachChildTable = {
29620
29699
  [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
29621
29700
  [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
29622
29701
  [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
29702
+ [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
29623
29703
  [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
29624
29704
  [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
29625
29705
  [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
@@ -29639,7 +29719,7 @@ var forEachChildTable = {
29639
29719
  [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
29640
29720
  [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
29641
29721
  [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
29642
- [355 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
29722
+ [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
29643
29723
  };
29644
29724
  function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
29645
29725
  return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
@@ -35715,6 +35795,9 @@ var Parser;
35715
35795
  case "overload":
35716
35796
  tag = parseOverloadTag(start3, tagName, margin, indentText);
35717
35797
  break;
35798
+ case "satisfies":
35799
+ tag = parseSatisfiesTag(start3, tagName, margin, indentText);
35800
+ break;
35718
35801
  case "see":
35719
35802
  tag = parseSeeTag(start3, tagName, margin, indentText);
35720
35803
  break;
@@ -36023,6 +36106,14 @@ var Parser;
36023
36106
  const className = parseExpressionWithTypeArgumentsForAugments();
36024
36107
  return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start3, getNodePos(), margin, indentText)), start3);
36025
36108
  }
36109
+ function parseSatisfiesTag(start3, tagName, margin, indentText) {
36110
+ const typeExpression = parseJSDocTypeExpression(
36111
+ /*mayOmitBraces*/
36112
+ false
36113
+ );
36114
+ const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), margin, indentText) : void 0;
36115
+ return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start3);
36116
+ }
36026
36117
  function parseExpressionWithTypeArgumentsForAugments() {
36027
36118
  const usedBrace = parseOptional(18 /* OpenBraceToken */);
36028
36119
  const pos = getNodePos();
@@ -37859,7 +37950,7 @@ var commandOptionsWithoutBuild = [
37859
37950
  {
37860
37951
  name: "allowImportingTsExtensions",
37861
37952
  type: "boolean",
37862
- affectsModuleResolution: true,
37953
+ affectsSemanticDiagnostics: true,
37863
37954
  category: Diagnostics.Modules,
37864
37955
  description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
37865
37956
  defaultValueDescription: false
@@ -39646,7 +39737,7 @@ function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) {
39646
39737
  const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
39647
39738
  json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
39648
39739
  let extendedConfigPath;
39649
- if (json.extends) {
39740
+ if (json.extends || json.extends === "") {
39650
39741
  if (!isCompilerOptionsValue(extendsOptionDeclaration, json.extends)) {
39651
39742
  errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", getCompilerOptionValueTypeString(extendsOptionDeclaration)));
39652
39743
  } else {
@@ -39773,7 +39864,11 @@ function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiag
39773
39864
  if (resolved.resolvedModule) {
39774
39865
  return resolved.resolvedModule.resolvedFileName;
39775
39866
  }
39776
- errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
39867
+ if (extendedConfig === "") {
39868
+ errors.push(createDiagnostic(Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
39869
+ } else {
39870
+ errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
39871
+ }
39777
39872
  return void 0;
39778
39873
  }
39779
39874
  function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
@@ -40056,6 +40151,7 @@ function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile,
40056
40151
  }
40057
40152
  }
40058
40153
  function specToDiagnostic(spec, disallowTrailingRecursion) {
40154
+ Debug.assert(typeof spec === "string");
40059
40155
  if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
40060
40156
  return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
40061
40157
  } else if (invalidDotDotAfterRecursiveWildcard(spec)) {
@@ -42637,7 +42733,7 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
42637
42733
  }
42638
42734
  }
42639
42735
  function shouldAllowImportingTsExtension(compilerOptions, fromFileName) {
42640
- return getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */ && (!!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName));
42736
+ return !!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName);
42641
42737
  }
42642
42738
  function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) {
42643
42739
  const traceEnabled = isTraceEnabled(compilerOptions, host);
@@ -43512,13 +43608,12 @@ function createBinder() {
43512
43608
  } else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) {
43513
43609
  node = node.operand;
43514
43610
  } else {
43515
- return node.kind === 223 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */);
43611
+ return isLogicalOrCoalescingBinaryExpression(node);
43516
43612
  }
43517
43613
  }
43518
43614
  }
43519
43615
  function isLogicalAssignmentExpression(node) {
43520
- node = skipParentheses(node);
43521
- return isBinaryExpression(node) && isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind);
43616
+ return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));
43522
43617
  }
43523
43618
  function isTopLevelLogicalExpression(node) {
43524
43619
  while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 53 /* ExclamationToken */) {
@@ -43901,7 +43996,7 @@ function createBinder() {
43901
43996
  };
43902
43997
  }
43903
43998
  const operator = node.operatorToken.kind;
43904
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */ || isLogicalOrCoalescingAssignmentOperator(operator)) {
43999
+ if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {
43905
44000
  if (isTopLevelLogicalExpression(node)) {
43906
44001
  const postExpressionLabel = createBranchLabel();
43907
44002
  bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
@@ -47415,7 +47510,7 @@ function createTypeChecker(host) {
47415
47510
  if (jsxFragmentPragma) {
47416
47511
  const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
47417
47512
  file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
47418
- visitNode(file.localJsxFragmentFactory, markAsSynthetic);
47513
+ visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);
47419
47514
  if (file.localJsxFragmentFactory) {
47420
47515
  return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
47421
47516
  }
@@ -47458,7 +47553,7 @@ function createTypeChecker(host) {
47458
47553
  if (jsxPragma) {
47459
47554
  const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
47460
47555
  file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
47461
- visitNode(file.localJsxFactory, markAsSynthetic);
47556
+ visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);
47462
47557
  if (file.localJsxFactory) {
47463
47558
  return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
47464
47559
  }
@@ -48969,6 +49064,7 @@ function createTypeChecker(host) {
48969
49064
  return valueSymbol;
48970
49065
  }
48971
49066
  const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
49067
+ Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
48972
49068
  result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
48973
49069
  result.parent = valueSymbol.parent || typeSymbol.parent;
48974
49070
  if (valueSymbol.valueDeclaration)
@@ -52608,7 +52704,7 @@ function createTypeChecker(host) {
52608
52704
  }
52609
52705
  let hadError = false;
52610
52706
  const file = getSourceFileOfNode(existing);
52611
- const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
52707
+ const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
52612
52708
  if (hadError) {
52613
52709
  return void 0;
52614
52710
  }
@@ -52621,16 +52717,16 @@ function createTypeChecker(host) {
52621
52717
  return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
52622
52718
  }
52623
52719
  if (isJSDocNullableType(node)) {
52624
- return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
52720
+ return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
52625
52721
  }
52626
52722
  if (isJSDocOptionalType(node)) {
52627
- return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
52723
+ return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
52628
52724
  }
52629
52725
  if (isJSDocNonNullableType(node)) {
52630
52726
  return visitNode(node.type, visitExistingNodeTreeSymbols);
52631
52727
  }
52632
52728
  if (isJSDocVariadicType(node)) {
52633
- return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
52729
+ return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
52634
52730
  }
52635
52731
  if (isJSDocTypeLiteral(node)) {
52636
52732
  return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
@@ -52642,7 +52738,7 @@ function createTypeChecker(host) {
52642
52738
  void 0,
52643
52739
  name,
52644
52740
  t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
52645
- overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
52741
+ overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
52646
52742
  );
52647
52743
  }));
52648
52744
  }
@@ -52661,9 +52757,9 @@ function createTypeChecker(host) {
52661
52757
  "x",
52662
52758
  /*questionToken*/
52663
52759
  void 0,
52664
- visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
52760
+ visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)
52665
52761
  )],
52666
- visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
52762
+ visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)
52667
52763
  )]);
52668
52764
  }
52669
52765
  if (isJSDocFunctionType(node)) {
@@ -52672,33 +52768,33 @@ function createTypeChecker(host) {
52672
52768
  return factory.createConstructorTypeNode(
52673
52769
  /*modifiers*/
52674
52770
  void 0,
52675
- visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
52771
+ visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
52676
52772
  mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
52677
52773
  /*modifiers*/
52678
52774
  void 0,
52679
52775
  getEffectiveDotDotDotForParameter(p),
52680
52776
  getNameForJSDocFunctionParameter(p, i),
52681
52777
  p.questionToken,
52682
- visitNode(p.type, visitExistingNodeTreeSymbols),
52778
+ visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
52683
52779
  /*initializer*/
52684
52780
  void 0
52685
52781
  )),
52686
- visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
52782
+ visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
52687
52783
  );
52688
52784
  } else {
52689
52785
  return factory.createFunctionTypeNode(
52690
- visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
52786
+ visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
52691
52787
  map(node.parameters, (p, i) => factory.createParameterDeclaration(
52692
52788
  /*modifiers*/
52693
52789
  void 0,
52694
52790
  getEffectiveDotDotDotForParameter(p),
52695
52791
  getNameForJSDocFunctionParameter(p, i),
52696
52792
  p.questionToken,
52697
- visitNode(p.type, visitExistingNodeTreeSymbols),
52793
+ visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
52698
52794
  /*initializer*/
52699
52795
  void 0
52700
52796
  )),
52701
- visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
52797
+ visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
52702
52798
  );
52703
52799
  }
52704
52800
  }
@@ -53620,7 +53716,7 @@ function createTypeChecker(host) {
53620
53716
  break;
53621
53717
  }
53622
53718
  case 268 /* ImportEqualsDeclaration */:
53623
- if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
53719
+ if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {
53624
53720
  serializeMaybeAliasAssignment(symbol);
53625
53721
  break;
53626
53722
  }
@@ -69889,7 +69985,7 @@ function createTypeChecker(host) {
69889
69985
  }
69890
69986
  }
69891
69987
  function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
69892
- const typeNode = getEffectiveTypeAnnotationNode(declaration);
69988
+ const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);
69893
69989
  if (typeNode) {
69894
69990
  return getTypeFromTypeNode(typeNode);
69895
69991
  }
@@ -70498,8 +70594,16 @@ function createTypeChecker(host) {
70498
70594
  Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */);
70499
70595
  return getContextualTypeForSubstitutionExpression(parent2.parent, node);
70500
70596
  case 214 /* ParenthesizedExpression */: {
70501
- const tag = isInJSFile(parent2) ? getJSDocTypeTag(parent2) : void 0;
70502
- return !tag ? getContextualType2(parent2, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(tag.typeExpression.type);
70597
+ if (isInJSFile(parent2)) {
70598
+ if (isJSDocSatisfiesExpression(parent2)) {
70599
+ return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2));
70600
+ }
70601
+ const typeTag = getJSDocTypeTag(parent2);
70602
+ if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {
70603
+ return getTypeFromTypeNode(typeTag.typeExpression.type);
70604
+ }
70605
+ }
70606
+ return getContextualType2(parent2, contextFlags);
70503
70607
  }
70504
70608
  case 232 /* NonNullExpression */:
70505
70609
  return getContextualType2(parent2, contextFlags);
@@ -74703,12 +74807,15 @@ function createTypeChecker(host) {
74703
74807
  }
74704
74808
  function checkSatisfiesExpression(node) {
74705
74809
  checkSourceElement(node.type);
74706
- const exprType = checkExpression(node.expression);
74707
- const targetType = getTypeFromTypeNode(node.type);
74810
+ return checkSatisfiesExpressionWorker(node.expression, node.type);
74811
+ }
74812
+ function checkSatisfiesExpressionWorker(expression, target, checkMode) {
74813
+ const exprType = checkExpression(expression, checkMode);
74814
+ const targetType = getTypeFromTypeNode(target);
74708
74815
  if (isErrorType(targetType)) {
74709
74816
  return targetType;
74710
74817
  }
74711
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, node.type, node.expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
74818
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
74712
74819
  return exprType;
74713
74820
  }
74714
74821
  function checkMetaProperty(node) {
@@ -76115,12 +76222,12 @@ function createTypeChecker(host) {
76115
76222
  void 0
76116
76223
  );
76117
76224
  const operator = operatorToken.kind;
76118
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
76119
- if (operator === 55 /* AmpersandAmpersandToken */) {
76120
- let parent2 = node.parent;
76121
- while (parent2.kind === 214 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) {
76122
- parent2 = parent2.parent;
76123
- }
76225
+ if (isLogicalOrCoalescingBinaryOperator(operator)) {
76226
+ let parent2 = node.parent;
76227
+ while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) {
76228
+ parent2 = parent2.parent;
76229
+ }
76230
+ if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) {
76124
76231
  checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0);
76125
76232
  }
76126
76233
  checkTruthinessOfType(leftType, node.left);
@@ -76197,7 +76304,7 @@ function createTypeChecker(host) {
76197
76304
  return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */);
76198
76305
  }
76199
76306
  let leftType;
76200
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
76307
+ if (isLogicalOrCoalescingBinaryOperator(operator)) {
76201
76308
  leftType = checkTruthinessExpression(left, checkMode);
76202
76309
  } else {
76203
76310
  leftType = checkExpression(left, checkMode);
@@ -76740,6 +76847,12 @@ function createTypeChecker(host) {
76740
76847
  }
76741
76848
  function checkDeclarationInitializer(declaration, checkMode, contextualType) {
76742
76849
  const initializer = getEffectiveInitializer(declaration);
76850
+ if (isInJSFile(declaration)) {
76851
+ const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);
76852
+ if (typeNode) {
76853
+ return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);
76854
+ }
76855
+ }
76743
76856
  const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(
76744
76857
  initializer,
76745
76858
  contextualType,
@@ -77067,9 +77180,14 @@ function createTypeChecker(host) {
77067
77180
  }
77068
77181
  }
77069
77182
  function checkParenthesizedExpression(node, checkMode) {
77070
- if (hasJSDocNodes(node) && isJSDocTypeAssertion(node)) {
77071
- const type = getJSDocTypeAssertionType(node);
77072
- return checkAssertionWorker(type, type, node.expression, checkMode);
77183
+ if (hasJSDocNodes(node)) {
77184
+ if (isJSDocSatisfiesExpression(node)) {
77185
+ return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
77186
+ }
77187
+ if (isJSDocTypeAssertion(node)) {
77188
+ const type = getJSDocTypeAssertionType(node);
77189
+ return checkAssertionWorker(type, type, node.expression, checkMode);
77190
+ }
77073
77191
  }
77074
77192
  return checkExpression(node.expression, checkMode);
77075
77193
  }
@@ -78771,6 +78889,19 @@ function createTypeChecker(host) {
78771
78889
  function checkJSDocTypeTag(node) {
78772
78890
  checkSourceElement(node.typeExpression);
78773
78891
  }
78892
+ function checkJSDocSatisfiesTag(node) {
78893
+ checkSourceElement(node.typeExpression);
78894
+ const host2 = getEffectiveJSDocHost(node);
78895
+ if (host2) {
78896
+ const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);
78897
+ if (length(tags) > 1) {
78898
+ for (let i = 1; i < length(tags); i++) {
78899
+ const tagName = tags[i].tagName;
78900
+ error(tagName, Diagnostics._0_tag_already_specified, idText(tagName));
78901
+ }
78902
+ }
78903
+ }
78904
+ }
78774
78905
  function checkJSDocLinkLikeTag(node) {
78775
78906
  if (node.name) {
78776
78907
  resolveJSDocMemberName(
@@ -79556,15 +79687,24 @@ function createTypeChecker(host) {
79556
79687
  function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) {
79557
79688
  if (!strictNullChecks)
79558
79689
  return;
79559
- helper(condExpr, body);
79560
- while (isBinaryExpression(condExpr) && condExpr.operatorToken.kind === 56 /* BarBarToken */) {
79561
- condExpr = condExpr.left;
79562
- helper(condExpr, body);
79690
+ bothHelper(condExpr, body);
79691
+ function bothHelper(condExpr2, body2) {
79692
+ condExpr2 = skipParentheses(condExpr2);
79693
+ helper(condExpr2, body2);
79694
+ while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 60 /* QuestionQuestionToken */)) {
79695
+ condExpr2 = skipParentheses(condExpr2.left);
79696
+ helper(condExpr2, body2);
79697
+ }
79563
79698
  }
79564
79699
  function helper(condExpr2, body2) {
79565
- const location = isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 55 /* AmpersandAmpersandToken */) ? condExpr2.right : condExpr2;
79566
- if (isModuleExportsAccessExpression(location))
79700
+ const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
79701
+ if (isModuleExportsAccessExpression(location)) {
79567
79702
  return;
79703
+ }
79704
+ if (isLogicalOrCoalescingBinaryExpression(location)) {
79705
+ bothHelper(location, body2);
79706
+ return;
79707
+ }
79568
79708
  const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
79569
79709
  const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion3(location.expression);
79570
79710
  if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
@@ -79574,7 +79714,7 @@ function createTypeChecker(host) {
79574
79714
  if (callSignatures.length === 0 && !isPromise) {
79575
79715
  return;
79576
79716
  }
79577
- const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : isBinaryExpression(location) && isIdentifier(location.right) ? location.right : void 0;
79717
+ const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;
79578
79718
  const testedSymbol = testedNode && getSymbolAtLocation(testedNode);
79579
79719
  if (!testedSymbol && !isPromise) {
79580
79720
  return;
@@ -82375,6 +82515,8 @@ function createTypeChecker(host) {
82375
82515
  case 338 /* JSDocProtectedTag */:
82376
82516
  case 337 /* JSDocPrivateTag */:
82377
82517
  return checkJSDocAccessibilityModifiers(node);
82518
+ case 353 /* JSDocSatisfiesTag */:
82519
+ return checkJSDocSatisfiesTag(node);
82378
82520
  case 196 /* IndexedAccessType */:
82379
82521
  return checkIndexedAccessType(node);
82380
82522
  case 197 /* MappedType */:
@@ -85933,13 +86075,10 @@ var SymbolTrackerImpl = class {
85933
86075
 
85934
86076
  // src/compiler/visitorPublic.ts
85935
86077
  function visitNode(node, visitor, test, lift) {
85936
- if (node === void 0 || visitor === void 0) {
86078
+ if (node === void 0) {
85937
86079
  return node;
85938
86080
  }
85939
86081
  const visited = visitor(node);
85940
- if (visited === node) {
85941
- return node;
85942
- }
85943
86082
  let visitedNode;
85944
86083
  if (visited === void 0) {
85945
86084
  return void 0;
@@ -85952,7 +86091,7 @@ function visitNode(node, visitor, test, lift) {
85952
86091
  return visitedNode;
85953
86092
  }
85954
86093
  function visitNodes2(nodes, visitor, test, start2, count) {
85955
- if (nodes === void 0 || visitor === void 0) {
86094
+ if (nodes === void 0) {
85956
86095
  return nodes;
85957
86096
  }
85958
86097
  const length2 = nodes.length;
@@ -86001,25 +86140,30 @@ function visitArrayWorker(nodes, visitor, test, start2, count) {
86001
86140
  }
86002
86141
  for (let i = 0; i < count; i++) {
86003
86142
  const node = nodes[i + start2];
86004
- const visited = node !== void 0 ? visitor(node) : void 0;
86143
+ const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
86005
86144
  if (updated !== void 0 || visited === void 0 || visited !== node) {
86006
86145
  if (updated === void 0) {
86007
86146
  updated = nodes.slice(0, i);
86147
+ Debug.assertEachNode(updated, test);
86008
86148
  }
86009
86149
  if (visited) {
86010
86150
  if (isArray(visited)) {
86011
86151
  for (const visitedNode of visited) {
86012
- void Debug.assertNode(visitedNode, test);
86152
+ Debug.assertNode(visitedNode, test);
86013
86153
  updated.push(visitedNode);
86014
86154
  }
86015
86155
  } else {
86016
- void Debug.assertNode(visited, test);
86156
+ Debug.assertNode(visited, test);
86017
86157
  updated.push(visited);
86018
86158
  }
86019
86159
  }
86020
86160
  }
86021
86161
  }
86022
- return updated != null ? updated : nodes;
86162
+ if (updated) {
86163
+ return updated;
86164
+ }
86165
+ Debug.assertEachNode(nodes, test);
86166
+ return nodes;
86023
86167
  }
86024
86168
  function visitLexicalEnvironment(statements, visitor, context, start2, ensureUseStrict, nodesVisitor = visitNodes2) {
86025
86169
  context.startLexicalEnvironment();
@@ -86033,7 +86177,7 @@ function visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2)
86033
86177
  context.startLexicalEnvironment();
86034
86178
  if (nodes) {
86035
86179
  context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
86036
- updated = nodesVisitor(nodes, visitor, isParameterDeclaration);
86180
+ updated = nodesVisitor(nodes, visitor, isParameter);
86037
86181
  if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
86038
86182
  updated = addDefaultValueAssignmentsIfNeeded(updated, context);
86039
86183
  }
@@ -86155,6 +86299,7 @@ function visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) {
86155
86299
  function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
86156
86300
  context.startBlockScope();
86157
86301
  const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
86302
+ Debug.assert(updated);
86158
86303
  const declarations = context.endBlockScope();
86159
86304
  if (some(declarations)) {
86160
86305
  if (isBlock(updated)) {
@@ -86177,14 +86322,14 @@ var visitEachChildTable = {
86177
86322
  [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86178
86323
  return context.factory.updateQualifiedName(
86179
86324
  node,
86180
- nodeVisitor(node.left, visitor, isEntityName),
86181
- nodeVisitor(node.right, visitor, isIdentifier)
86325
+ Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),
86326
+ Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))
86182
86327
  );
86183
86328
  },
86184
86329
  [164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86185
86330
  return context.factory.updateComputedPropertyName(
86186
86331
  node,
86187
- nodeVisitor(node.expression, visitor, isExpression)
86332
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86188
86333
  );
86189
86334
  },
86190
86335
  // Signature elements
@@ -86192,7 +86337,7 @@ var visitEachChildTable = {
86192
86337
  return context.factory.updateTypeParameterDeclaration(
86193
86338
  node,
86194
86339
  nodesVisitor(node.modifiers, visitor, isModifier),
86195
- nodeVisitor(node.name, visitor, isIdentifier),
86340
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
86196
86341
  nodeVisitor(node.constraint, visitor, isTypeNode),
86197
86342
  nodeVisitor(node.default, visitor, isTypeNode)
86198
86343
  );
@@ -86201,9 +86346,9 @@ var visitEachChildTable = {
86201
86346
  return context.factory.updateParameterDeclaration(
86202
86347
  node,
86203
86348
  nodesVisitor(node.modifiers, visitor, isModifierLike),
86204
- nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
86205
- nodeVisitor(node.name, visitor, isBindingName),
86206
- nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
86349
+ tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
86350
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
86351
+ tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
86207
86352
  nodeVisitor(node.type, visitor, isTypeNode),
86208
86353
  nodeVisitor(node.initializer, visitor, isExpression)
86209
86354
  );
@@ -86211,7 +86356,7 @@ var visitEachChildTable = {
86211
86356
  [167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86212
86357
  return context.factory.updateDecorator(
86213
86358
  node,
86214
- nodeVisitor(node.expression, visitor, isExpression)
86359
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86215
86360
  );
86216
86361
  },
86217
86362
  // Type elements
@@ -86219,19 +86364,19 @@ var visitEachChildTable = {
86219
86364
  return context.factory.updatePropertySignature(
86220
86365
  node,
86221
86366
  nodesVisitor(node.modifiers, visitor, isModifier),
86222
- nodeVisitor(node.name, visitor, isPropertyName),
86223
- nodeVisitor(node.questionToken, tokenVisitor, isToken),
86367
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
86368
+ tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
86224
86369
  nodeVisitor(node.type, visitor, isTypeNode)
86225
86370
  );
86226
86371
  },
86227
86372
  [169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
86228
- var _a2;
86373
+ var _a2, _b;
86229
86374
  return context.factory.updatePropertyDeclaration(
86230
86375
  node,
86231
86376
  nodesVisitor(node.modifiers, visitor, isModifierLike),
86232
- nodeVisitor(node.name, visitor, isPropertyName),
86377
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
86233
86378
  // QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
86234
- nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
86379
+ tokenVisitor ? nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : (_b = node.questionToken) != null ? _b : node.exclamationToken,
86235
86380
  nodeVisitor(node.type, visitor, isTypeNode),
86236
86381
  nodeVisitor(node.initializer, visitor, isExpression)
86237
86382
  );
@@ -86240,10 +86385,10 @@ var visitEachChildTable = {
86240
86385
  return context.factory.updateMethodSignature(
86241
86386
  node,
86242
86387
  nodesVisitor(node.modifiers, visitor, isModifier),
86243
- nodeVisitor(node.name, visitor, isPropertyName),
86244
- nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
86388
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
86389
+ tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
86245
86390
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86246
- nodesVisitor(node.parameters, visitor, isParameterDeclaration),
86391
+ nodesVisitor(node.parameters, visitor, isParameter),
86247
86392
  nodeVisitor(node.type, visitor, isTypeNode)
86248
86393
  );
86249
86394
  },
@@ -86251,9 +86396,9 @@ var visitEachChildTable = {
86251
86396
  return context.factory.updateMethodDeclaration(
86252
86397
  node,
86253
86398
  nodesVisitor(node.modifiers, visitor, isModifierLike),
86254
- nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
86255
- nodeVisitor(node.name, visitor, isPropertyName),
86256
- nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
86399
+ tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
86400
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
86401
+ tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
86257
86402
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86258
86403
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
86259
86404
  nodeVisitor(node.type, visitor, isTypeNode),
@@ -86272,7 +86417,7 @@ var visitEachChildTable = {
86272
86417
  return context.factory.updateGetAccessorDeclaration(
86273
86418
  node,
86274
86419
  nodesVisitor(node.modifiers, visitor, isModifierLike),
86275
- nodeVisitor(node.name, visitor, isPropertyName),
86420
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
86276
86421
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
86277
86422
  nodeVisitor(node.type, visitor, isTypeNode),
86278
86423
  visitFunctionBody(node.body, visitor, context, nodeVisitor)
@@ -86282,7 +86427,7 @@ var visitEachChildTable = {
86282
86427
  return context.factory.updateSetAccessorDeclaration(
86283
86428
  node,
86284
86429
  nodesVisitor(node.modifiers, visitor, isModifierLike),
86285
- nodeVisitor(node.name, visitor, isPropertyName),
86430
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
86286
86431
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
86287
86432
  visitFunctionBody(node.body, visitor, context, nodeVisitor)
86288
86433
  );
@@ -86299,7 +86444,7 @@ var visitEachChildTable = {
86299
86444
  return context.factory.updateCallSignature(
86300
86445
  node,
86301
86446
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86302
- nodesVisitor(node.parameters, visitor, isParameterDeclaration),
86447
+ nodesVisitor(node.parameters, visitor, isParameter),
86303
86448
  nodeVisitor(node.type, visitor, isTypeNode)
86304
86449
  );
86305
86450
  },
@@ -86307,7 +86452,7 @@ var visitEachChildTable = {
86307
86452
  return context.factory.updateConstructSignature(
86308
86453
  node,
86309
86454
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86310
- nodesVisitor(node.parameters, visitor, isParameterDeclaration),
86455
+ nodesVisitor(node.parameters, visitor, isParameter),
86311
86456
  nodeVisitor(node.type, visitor, isTypeNode)
86312
86457
  );
86313
86458
  },
@@ -86315,8 +86460,8 @@ var visitEachChildTable = {
86315
86460
  return context.factory.updateIndexSignature(
86316
86461
  node,
86317
86462
  nodesVisitor(node.modifiers, visitor, isModifier),
86318
- nodesVisitor(node.parameters, visitor, isParameterDeclaration),
86319
- nodeVisitor(node.type, visitor, isTypeNode)
86463
+ nodesVisitor(node.parameters, visitor, isParameter),
86464
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86320
86465
  );
86321
86466
  },
86322
86467
  // Types
@@ -86324,14 +86469,14 @@ var visitEachChildTable = {
86324
86469
  return context.factory.updateTypePredicateNode(
86325
86470
  node,
86326
86471
  nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
86327
- nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
86472
+ Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),
86328
86473
  nodeVisitor(node.type, visitor, isTypeNode)
86329
86474
  );
86330
86475
  },
86331
86476
  [180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86332
86477
  return context.factory.updateTypeReferenceNode(
86333
86478
  node,
86334
- nodeVisitor(node.typeName, visitor, isEntityName),
86479
+ Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
86335
86480
  nodesVisitor(node.typeArguments, visitor, isTypeNode)
86336
86481
  );
86337
86482
  },
@@ -86339,8 +86484,8 @@ var visitEachChildTable = {
86339
86484
  return context.factory.updateFunctionTypeNode(
86340
86485
  node,
86341
86486
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86342
- nodesVisitor(node.parameters, visitor, isParameterDeclaration),
86343
- nodeVisitor(node.type, visitor, isTypeNode)
86487
+ nodesVisitor(node.parameters, visitor, isParameter),
86488
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86344
86489
  );
86345
86490
  },
86346
86491
  [182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -86348,14 +86493,14 @@ var visitEachChildTable = {
86348
86493
  node,
86349
86494
  nodesVisitor(node.modifiers, visitor, isModifier),
86350
86495
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86351
- nodesVisitor(node.parameters, visitor, isParameterDeclaration),
86352
- nodeVisitor(node.type, visitor, isTypeNode)
86496
+ nodesVisitor(node.parameters, visitor, isParameter),
86497
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86353
86498
  );
86354
86499
  },
86355
86500
  [183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86356
86501
  return context.factory.updateTypeQueryNode(
86357
86502
  node,
86358
- nodeVisitor(node.exprName, visitor, isEntityName),
86503
+ Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),
86359
86504
  nodesVisitor(node.typeArguments, visitor, isTypeNode)
86360
86505
  );
86361
86506
  },
@@ -86368,7 +86513,7 @@ var visitEachChildTable = {
86368
86513
  [185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86369
86514
  return context.factory.updateArrayTypeNode(
86370
86515
  node,
86371
- nodeVisitor(node.elementType, visitor, isTypeNode)
86516
+ Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))
86372
86517
  );
86373
86518
  },
86374
86519
  [186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
@@ -86380,13 +86525,13 @@ var visitEachChildTable = {
86380
86525
  [187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86381
86526
  return context.factory.updateOptionalTypeNode(
86382
86527
  node,
86383
- nodeVisitor(node.type, visitor, isTypeNode)
86528
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86384
86529
  );
86385
86530
  },
86386
86531
  [188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86387
86532
  return context.factory.updateRestTypeNode(
86388
86533
  node,
86389
- nodeVisitor(node.type, visitor, isTypeNode)
86534
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86390
86535
  );
86391
86536
  },
86392
86537
  [189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
@@ -86404,22 +86549,22 @@ var visitEachChildTable = {
86404
86549
  [191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86405
86550
  return context.factory.updateConditionalTypeNode(
86406
86551
  node,
86407
- nodeVisitor(node.checkType, visitor, isTypeNode),
86408
- nodeVisitor(node.extendsType, visitor, isTypeNode),
86409
- nodeVisitor(node.trueType, visitor, isTypeNode),
86410
- nodeVisitor(node.falseType, visitor, isTypeNode)
86552
+ Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),
86553
+ Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),
86554
+ Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),
86555
+ Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))
86411
86556
  );
86412
86557
  },
86413
86558
  [192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86414
86559
  return context.factory.updateInferTypeNode(
86415
86560
  node,
86416
- nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
86561
+ Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))
86417
86562
  );
86418
86563
  },
86419
86564
  [202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86420
86565
  return context.factory.updateImportTypeNode(
86421
86566
  node,
86422
- nodeVisitor(node.argument, visitor, isTypeNode),
86567
+ Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
86423
86568
  nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
86424
86569
  nodeVisitor(node.qualifier, visitor, isEntityName),
86425
86570
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
@@ -86429,45 +86574,45 @@ var visitEachChildTable = {
86429
86574
  [298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86430
86575
  return context.factory.updateImportTypeAssertionContainer(
86431
86576
  node,
86432
- nodeVisitor(node.assertClause, visitor, isAssertClause),
86577
+ Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),
86433
86578
  node.multiLine
86434
86579
  );
86435
86580
  },
86436
86581
  [199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86437
86582
  return context.factory.updateNamedTupleMember(
86438
86583
  node,
86439
- nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
86440
- nodeVisitor(node.name, visitor, isIdentifier),
86441
- nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
86442
- nodeVisitor(node.type, visitor, isTypeNode)
86584
+ tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
86585
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
86586
+ tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
86587
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86443
86588
  );
86444
86589
  },
86445
86590
  [193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86446
86591
  return context.factory.updateParenthesizedType(
86447
86592
  node,
86448
- nodeVisitor(node.type, visitor, isTypeNode)
86593
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86449
86594
  );
86450
86595
  },
86451
86596
  [195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86452
86597
  return context.factory.updateTypeOperatorNode(
86453
86598
  node,
86454
- nodeVisitor(node.type, visitor, isTypeNode)
86599
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86455
86600
  );
86456
86601
  },
86457
86602
  [196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86458
86603
  return context.factory.updateIndexedAccessTypeNode(
86459
86604
  node,
86460
- nodeVisitor(node.objectType, visitor, isTypeNode),
86461
- nodeVisitor(node.indexType, visitor, isTypeNode)
86605
+ Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),
86606
+ Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))
86462
86607
  );
86463
86608
  },
86464
86609
  [197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
86465
86610
  return context.factory.updateMappedTypeNode(
86466
86611
  node,
86467
- nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
86468
- nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
86612
+ tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,
86613
+ Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),
86469
86614
  nodeVisitor(node.nameType, visitor, isTypeNode),
86470
- nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
86615
+ tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,
86471
86616
  nodeVisitor(node.type, visitor, isTypeNode),
86472
86617
  nodesVisitor(node.members, visitor, isTypeElement)
86473
86618
  );
@@ -86475,21 +86620,21 @@ var visitEachChildTable = {
86475
86620
  [198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86476
86621
  return context.factory.updateLiteralTypeNode(
86477
86622
  node,
86478
- nodeVisitor(node.literal, visitor, isExpression)
86623
+ Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))
86479
86624
  );
86480
86625
  },
86481
86626
  [200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86482
86627
  return context.factory.updateTemplateLiteralType(
86483
86628
  node,
86484
- nodeVisitor(node.head, visitor, isTemplateHead),
86629
+ Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
86485
86630
  nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
86486
86631
  );
86487
86632
  },
86488
86633
  [201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86489
86634
  return context.factory.updateTemplateLiteralTypeSpan(
86490
86635
  node,
86491
- nodeVisitor(node.type, visitor, isTypeNode),
86492
- nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
86636
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
86637
+ Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
86493
86638
  );
86494
86639
  },
86495
86640
  // Binding patterns
@@ -86508,9 +86653,9 @@ var visitEachChildTable = {
86508
86653
  [205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86509
86654
  return context.factory.updateBindingElement(
86510
86655
  node,
86511
- nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
86656
+ tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
86512
86657
  nodeVisitor(node.propertyName, visitor, isPropertyName),
86513
- nodeVisitor(node.name, visitor, isBindingName),
86658
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
86514
86659
  nodeVisitor(node.initializer, visitor, isExpression)
86515
86660
  );
86516
86661
  },
@@ -86530,37 +86675,37 @@ var visitEachChildTable = {
86530
86675
  [208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86531
86676
  return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
86532
86677
  node,
86533
- nodeVisitor(node.expression, visitor, isExpression),
86534
- nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
86535
- nodeVisitor(node.name, visitor, isMemberName)
86678
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86679
+ tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
86680
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
86536
86681
  ) : context.factory.updatePropertyAccessExpression(
86537
86682
  node,
86538
- nodeVisitor(node.expression, visitor, isExpression),
86539
- nodeVisitor(node.name, visitor, isMemberName)
86683
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86684
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
86540
86685
  );
86541
86686
  },
86542
86687
  [209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86543
86688
  return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
86544
86689
  node,
86545
- nodeVisitor(node.expression, visitor, isExpression),
86546
- nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
86547
- nodeVisitor(node.argumentExpression, visitor, isExpression)
86690
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86691
+ tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
86692
+ Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
86548
86693
  ) : context.factory.updateElementAccessExpression(
86549
86694
  node,
86550
- nodeVisitor(node.expression, visitor, isExpression),
86551
- nodeVisitor(node.argumentExpression, visitor, isExpression)
86695
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86696
+ Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
86552
86697
  );
86553
86698
  },
86554
86699
  [210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
86555
86700
  return isCallChain(node) ? context.factory.updateCallChain(
86556
86701
  node,
86557
- nodeVisitor(node.expression, visitor, isExpression),
86558
- nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
86702
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86703
+ tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
86559
86704
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
86560
86705
  nodesVisitor(node.arguments, visitor, isExpression)
86561
86706
  ) : context.factory.updateCallExpression(
86562
86707
  node,
86563
- nodeVisitor(node.expression, visitor, isExpression),
86708
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86564
86709
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
86565
86710
  nodesVisitor(node.arguments, visitor, isExpression)
86566
86711
  );
@@ -86568,7 +86713,7 @@ var visitEachChildTable = {
86568
86713
  [211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86569
86714
  return context.factory.updateNewExpression(
86570
86715
  node,
86571
- nodeVisitor(node.expression, visitor, isExpression),
86716
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86572
86717
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
86573
86718
  nodesVisitor(node.arguments, visitor, isExpression)
86574
86719
  );
@@ -86576,29 +86721,29 @@ var visitEachChildTable = {
86576
86721
  [212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86577
86722
  return context.factory.updateTaggedTemplateExpression(
86578
86723
  node,
86579
- nodeVisitor(node.tag, visitor, isExpression),
86724
+ Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),
86580
86725
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
86581
- nodeVisitor(node.template, visitor, isTemplateLiteral)
86726
+ Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))
86582
86727
  );
86583
86728
  },
86584
86729
  [213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86585
86730
  return context.factory.updateTypeAssertion(
86586
86731
  node,
86587
- nodeVisitor(node.type, visitor, isTypeNode),
86588
- nodeVisitor(node.expression, visitor, isExpression)
86732
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
86733
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86589
86734
  );
86590
86735
  },
86591
86736
  [214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86592
86737
  return context.factory.updateParenthesizedExpression(
86593
86738
  node,
86594
- nodeVisitor(node.expression, visitor, isExpression)
86739
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86595
86740
  );
86596
86741
  },
86597
86742
  [215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
86598
86743
  return context.factory.updateFunctionExpression(
86599
86744
  node,
86600
86745
  nodesVisitor(node.modifiers, visitor, isModifier),
86601
- nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
86746
+ tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
86602
86747
  nodeVisitor(node.name, visitor, isIdentifier),
86603
86748
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86604
86749
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
@@ -86613,82 +86758,82 @@ var visitEachChildTable = {
86613
86758
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86614
86759
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
86615
86760
  nodeVisitor(node.type, visitor, isTypeNode),
86616
- nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
86761
+ tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,
86617
86762
  visitFunctionBody(node.body, visitor, context, nodeVisitor)
86618
86763
  );
86619
86764
  },
86620
86765
  [217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86621
86766
  return context.factory.updateDeleteExpression(
86622
86767
  node,
86623
- nodeVisitor(node.expression, visitor, isExpression)
86768
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86624
86769
  );
86625
86770
  },
86626
86771
  [218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86627
86772
  return context.factory.updateTypeOfExpression(
86628
86773
  node,
86629
- nodeVisitor(node.expression, visitor, isExpression)
86774
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86630
86775
  );
86631
86776
  },
86632
86777
  [219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86633
86778
  return context.factory.updateVoidExpression(
86634
86779
  node,
86635
- nodeVisitor(node.expression, visitor, isExpression)
86780
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86636
86781
  );
86637
86782
  },
86638
86783
  [220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86639
86784
  return context.factory.updateAwaitExpression(
86640
86785
  node,
86641
- nodeVisitor(node.expression, visitor, isExpression)
86786
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86642
86787
  );
86643
86788
  },
86644
86789
  [221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86645
86790
  return context.factory.updatePrefixUnaryExpression(
86646
86791
  node,
86647
- nodeVisitor(node.operand, visitor, isExpression)
86792
+ Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
86648
86793
  );
86649
86794
  },
86650
86795
  [222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86651
86796
  return context.factory.updatePostfixUnaryExpression(
86652
86797
  node,
86653
- nodeVisitor(node.operand, visitor, isExpression)
86798
+ Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
86654
86799
  );
86655
86800
  },
86656
86801
  [223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86657
86802
  return context.factory.updateBinaryExpression(
86658
86803
  node,
86659
- nodeVisitor(node.left, visitor, isExpression),
86660
- nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
86661
- nodeVisitor(node.right, visitor, isExpression)
86804
+ Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),
86805
+ tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,
86806
+ Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))
86662
86807
  );
86663
86808
  },
86664
86809
  [224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86665
86810
  return context.factory.updateConditionalExpression(
86666
86811
  node,
86667
- nodeVisitor(node.condition, visitor, isExpression),
86668
- nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
86669
- nodeVisitor(node.whenTrue, visitor, isExpression),
86670
- nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
86671
- nodeVisitor(node.whenFalse, visitor, isExpression)
86812
+ Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),
86813
+ tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,
86814
+ Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),
86815
+ tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,
86816
+ Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))
86672
86817
  );
86673
86818
  },
86674
86819
  [225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86675
86820
  return context.factory.updateTemplateExpression(
86676
86821
  node,
86677
- nodeVisitor(node.head, visitor, isTemplateHead),
86822
+ Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
86678
86823
  nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
86679
86824
  );
86680
86825
  },
86681
86826
  [226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86682
86827
  return context.factory.updateYieldExpression(
86683
86828
  node,
86684
- nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
86829
+ tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
86685
86830
  nodeVisitor(node.expression, visitor, isExpression)
86686
86831
  );
86687
86832
  },
86688
86833
  [227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86689
86834
  return context.factory.updateSpreadElement(
86690
86835
  node,
86691
- nodeVisitor(node.expression, visitor, isExpression)
86836
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86692
86837
  );
86693
86838
  },
86694
86839
  [228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -86704,45 +86849,45 @@ var visitEachChildTable = {
86704
86849
  [230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86705
86850
  return context.factory.updateExpressionWithTypeArguments(
86706
86851
  node,
86707
- nodeVisitor(node.expression, visitor, isExpression),
86852
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86708
86853
  nodesVisitor(node.typeArguments, visitor, isTypeNode)
86709
86854
  );
86710
86855
  },
86711
86856
  [231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86712
86857
  return context.factory.updateAsExpression(
86713
86858
  node,
86714
- nodeVisitor(node.expression, visitor, isExpression),
86715
- nodeVisitor(node.type, visitor, isTypeNode)
86859
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86860
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86716
86861
  );
86717
86862
  },
86718
86863
  [235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86719
86864
  return context.factory.updateSatisfiesExpression(
86720
86865
  node,
86721
- nodeVisitor(node.expression, visitor, isExpression),
86722
- nodeVisitor(node.type, visitor, isTypeNode)
86866
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86867
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86723
86868
  );
86724
86869
  },
86725
86870
  [232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86726
86871
  return isOptionalChain(node) ? context.factory.updateNonNullChain(
86727
86872
  node,
86728
- nodeVisitor(node.expression, visitor, isExpression)
86873
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86729
86874
  ) : context.factory.updateNonNullExpression(
86730
86875
  node,
86731
- nodeVisitor(node.expression, visitor, isExpression)
86876
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86732
86877
  );
86733
86878
  },
86734
86879
  [233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86735
86880
  return context.factory.updateMetaProperty(
86736
86881
  node,
86737
- nodeVisitor(node.name, visitor, isIdentifier)
86882
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
86738
86883
  );
86739
86884
  },
86740
86885
  // Misc
86741
86886
  [236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86742
86887
  return context.factory.updateTemplateSpan(
86743
86888
  node,
86744
- nodeVisitor(node.expression, visitor, isExpression),
86745
- nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
86889
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86890
+ Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
86746
86891
  );
86747
86892
  },
86748
86893
  // Element
@@ -86756,20 +86901,20 @@ var visitEachChildTable = {
86756
86901
  return context.factory.updateVariableStatement(
86757
86902
  node,
86758
86903
  nodesVisitor(node.modifiers, visitor, isModifier),
86759
- nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
86904
+ Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
86760
86905
  );
86761
86906
  },
86762
86907
  [241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86763
86908
  return context.factory.updateExpressionStatement(
86764
86909
  node,
86765
- nodeVisitor(node.expression, visitor, isExpression)
86910
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86766
86911
  );
86767
86912
  },
86768
86913
  [242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86769
86914
  return context.factory.updateIfStatement(
86770
86915
  node,
86771
- nodeVisitor(node.expression, visitor, isExpression),
86772
- nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
86916
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86917
+ Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),
86773
86918
  nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
86774
86919
  );
86775
86920
  },
@@ -86777,13 +86922,13 @@ var visitEachChildTable = {
86777
86922
  return context.factory.updateDoStatement(
86778
86923
  node,
86779
86924
  visitIterationBody(node.statement, visitor, context, nodeVisitor),
86780
- nodeVisitor(node.expression, visitor, isExpression)
86925
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86781
86926
  );
86782
86927
  },
86783
86928
  [244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86784
86929
  return context.factory.updateWhileStatement(
86785
86930
  node,
86786
- nodeVisitor(node.expression, visitor, isExpression),
86931
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86787
86932
  visitIterationBody(node.statement, visitor, context, nodeVisitor)
86788
86933
  );
86789
86934
  },
@@ -86799,17 +86944,17 @@ var visitEachChildTable = {
86799
86944
  [246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86800
86945
  return context.factory.updateForInStatement(
86801
86946
  node,
86802
- nodeVisitor(node.initializer, visitor, isForInitializer),
86803
- nodeVisitor(node.expression, visitor, isExpression),
86947
+ Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
86948
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86804
86949
  visitIterationBody(node.statement, visitor, context, nodeVisitor)
86805
86950
  );
86806
86951
  },
86807
86952
  [247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86808
86953
  return context.factory.updateForOfStatement(
86809
86954
  node,
86810
- nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
86811
- nodeVisitor(node.initializer, visitor, isForInitializer),
86812
- nodeVisitor(node.expression, visitor, isExpression),
86955
+ tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
86956
+ Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
86957
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86813
86958
  visitIterationBody(node.statement, visitor, context, nodeVisitor)
86814
86959
  );
86815
86960
  },
@@ -86834,34 +86979,34 @@ var visitEachChildTable = {
86834
86979
  [251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86835
86980
  return context.factory.updateWithStatement(
86836
86981
  node,
86837
- nodeVisitor(node.expression, visitor, isExpression),
86838
- nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
86982
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86983
+ Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
86839
86984
  );
86840
86985
  },
86841
86986
  [252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86842
86987
  return context.factory.updateSwitchStatement(
86843
86988
  node,
86844
- nodeVisitor(node.expression, visitor, isExpression),
86845
- nodeVisitor(node.caseBlock, visitor, isCaseBlock)
86989
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
86990
+ Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))
86846
86991
  );
86847
86992
  },
86848
86993
  [253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86849
86994
  return context.factory.updateLabeledStatement(
86850
86995
  node,
86851
- nodeVisitor(node.label, visitor, isIdentifier),
86852
- nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
86996
+ Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),
86997
+ Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
86853
86998
  );
86854
86999
  },
86855
87000
  [254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86856
87001
  return context.factory.updateThrowStatement(
86857
87002
  node,
86858
- nodeVisitor(node.expression, visitor, isExpression)
87003
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
86859
87004
  );
86860
87005
  },
86861
87006
  [255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86862
87007
  return context.factory.updateTryStatement(
86863
87008
  node,
86864
- nodeVisitor(node.tryBlock, visitor, isBlock),
87009
+ Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),
86865
87010
  nodeVisitor(node.catchClause, visitor, isCatchClause),
86866
87011
  nodeVisitor(node.finallyBlock, visitor, isBlock)
86867
87012
  );
@@ -86869,8 +87014,8 @@ var visitEachChildTable = {
86869
87014
  [257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
86870
87015
  return context.factory.updateVariableDeclaration(
86871
87016
  node,
86872
- nodeVisitor(node.name, visitor, isBindingName),
86873
- nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
87017
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
87018
+ tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,
86874
87019
  nodeVisitor(node.type, visitor, isTypeNode),
86875
87020
  nodeVisitor(node.initializer, visitor, isExpression)
86876
87021
  );
@@ -86885,7 +87030,7 @@ var visitEachChildTable = {
86885
87030
  return context.factory.updateFunctionDeclaration(
86886
87031
  node,
86887
87032
  nodesVisitor(node.modifiers, visitor, isModifier),
86888
- nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
87033
+ tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
86889
87034
  nodeVisitor(node.name, visitor, isIdentifier),
86890
87035
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86891
87036
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
@@ -86907,7 +87052,7 @@ var visitEachChildTable = {
86907
87052
  return context.factory.updateInterfaceDeclaration(
86908
87053
  node,
86909
87054
  nodesVisitor(node.modifiers, visitor, isModifier),
86910
- nodeVisitor(node.name, visitor, isIdentifier),
87055
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
86911
87056
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86912
87057
  nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
86913
87058
  nodesVisitor(node.members, visitor, isTypeElement)
@@ -86917,16 +87062,16 @@ var visitEachChildTable = {
86917
87062
  return context.factory.updateTypeAliasDeclaration(
86918
87063
  node,
86919
87064
  nodesVisitor(node.modifiers, visitor, isModifier),
86920
- nodeVisitor(node.name, visitor, isIdentifier),
87065
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
86921
87066
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
86922
- nodeVisitor(node.type, visitor, isTypeNode)
87067
+ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
86923
87068
  );
86924
87069
  },
86925
87070
  [263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
86926
87071
  return context.factory.updateEnumDeclaration(
86927
87072
  node,
86928
87073
  nodesVisitor(node.modifiers, visitor, isModifier),
86929
- nodeVisitor(node.name, visitor, isIdentifier),
87074
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
86930
87075
  nodesVisitor(node.members, visitor, isEnumMember)
86931
87076
  );
86932
87077
  },
@@ -86934,7 +87079,7 @@ var visitEachChildTable = {
86934
87079
  return context.factory.updateModuleDeclaration(
86935
87080
  node,
86936
87081
  nodesVisitor(node.modifiers, visitor, isModifier),
86937
- nodeVisitor(node.name, visitor, isModuleName),
87082
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
86938
87083
  nodeVisitor(node.body, visitor, isModuleBody)
86939
87084
  );
86940
87085
  },
@@ -86953,7 +87098,7 @@ var visitEachChildTable = {
86953
87098
  [267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86954
87099
  return context.factory.updateNamespaceExportDeclaration(
86955
87100
  node,
86956
- nodeVisitor(node.name, visitor, isIdentifier)
87101
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
86957
87102
  );
86958
87103
  },
86959
87104
  [268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -86961,8 +87106,8 @@ var visitEachChildTable = {
86961
87106
  node,
86962
87107
  nodesVisitor(node.modifiers, visitor, isModifier),
86963
87108
  node.isTypeOnly,
86964
- nodeVisitor(node.name, visitor, isIdentifier),
86965
- nodeVisitor(node.moduleReference, visitor, isModuleReference)
87109
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
87110
+ Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
86966
87111
  );
86967
87112
  },
86968
87113
  [269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -86970,7 +87115,7 @@ var visitEachChildTable = {
86970
87115
  node,
86971
87116
  nodesVisitor(node.modifiers, visitor, isModifier),
86972
87117
  nodeVisitor(node.importClause, visitor, isImportClause),
86973
- nodeVisitor(node.moduleSpecifier, visitor, isExpression),
87118
+ Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
86974
87119
  nodeVisitor(node.assertClause, visitor, isAssertClause)
86975
87120
  );
86976
87121
  },
@@ -86984,8 +87129,8 @@ var visitEachChildTable = {
86984
87129
  [297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
86985
87130
  return context.factory.updateAssertEntry(
86986
87131
  node,
86987
- nodeVisitor(node.name, visitor, isAssertionKey),
86988
- nodeVisitor(node.value, visitor, isExpression)
87132
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
87133
+ Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
86989
87134
  );
86990
87135
  },
86991
87136
  [270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -86999,13 +87144,13 @@ var visitEachChildTable = {
86999
87144
  [271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87000
87145
  return context.factory.updateNamespaceImport(
87001
87146
  node,
87002
- nodeVisitor(node.name, visitor, isIdentifier)
87147
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
87003
87148
  );
87004
87149
  },
87005
87150
  [277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87006
87151
  return context.factory.updateNamespaceExport(
87007
87152
  node,
87008
- nodeVisitor(node.name, visitor, isIdentifier)
87153
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
87009
87154
  );
87010
87155
  },
87011
87156
  [272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
@@ -87019,14 +87164,14 @@ var visitEachChildTable = {
87019
87164
  node,
87020
87165
  node.isTypeOnly,
87021
87166
  nodeVisitor(node.propertyName, visitor, isIdentifier),
87022
- nodeVisitor(node.name, visitor, isIdentifier)
87167
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
87023
87168
  );
87024
87169
  },
87025
87170
  [274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
87026
87171
  return context.factory.updateExportAssignment(
87027
87172
  node,
87028
87173
  nodesVisitor(node.modifiers, visitor, isModifier),
87029
- nodeVisitor(node.expression, visitor, isExpression)
87174
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
87030
87175
  );
87031
87176
  },
87032
87177
  [275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -87050,59 +87195,59 @@ var visitEachChildTable = {
87050
87195
  node,
87051
87196
  node.isTypeOnly,
87052
87197
  nodeVisitor(node.propertyName, visitor, isIdentifier),
87053
- nodeVisitor(node.name, visitor, isIdentifier)
87198
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
87054
87199
  );
87055
87200
  },
87056
87201
  // Module references
87057
87202
  [280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87058
87203
  return context.factory.updateExternalModuleReference(
87059
87204
  node,
87060
- nodeVisitor(node.expression, visitor, isExpression)
87205
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
87061
87206
  );
87062
87207
  },
87063
87208
  // JSX
87064
87209
  [281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
87065
87210
  return context.factory.updateJsxElement(
87066
87211
  node,
87067
- nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
87212
+ Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),
87068
87213
  nodesVisitor(node.children, visitor, isJsxChild),
87069
- nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
87214
+ Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))
87070
87215
  );
87071
87216
  },
87072
87217
  [282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
87073
87218
  return context.factory.updateJsxSelfClosingElement(
87074
87219
  node,
87075
- nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
87220
+ Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
87076
87221
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
87077
- nodeVisitor(node.attributes, visitor, isJsxAttributes)
87222
+ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
87078
87223
  );
87079
87224
  },
87080
87225
  [283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
87081
87226
  return context.factory.updateJsxOpeningElement(
87082
87227
  node,
87083
- nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
87228
+ Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
87084
87229
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
87085
- nodeVisitor(node.attributes, visitor, isJsxAttributes)
87230
+ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
87086
87231
  );
87087
87232
  },
87088
87233
  [284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87089
87234
  return context.factory.updateJsxClosingElement(
87090
87235
  node,
87091
- nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
87236
+ Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))
87092
87237
  );
87093
87238
  },
87094
87239
  [285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
87095
87240
  return context.factory.updateJsxFragment(
87096
87241
  node,
87097
- nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
87242
+ Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
87098
87243
  nodesVisitor(node.children, visitor, isJsxChild),
87099
- nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
87244
+ Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))
87100
87245
  );
87101
87246
  },
87102
87247
  [288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87103
87248
  return context.factory.updateJsxAttribute(
87104
87249
  node,
87105
- nodeVisitor(node.name, visitor, isIdentifier),
87250
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
87106
87251
  nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
87107
87252
  );
87108
87253
  },
@@ -87115,20 +87260,20 @@ var visitEachChildTable = {
87115
87260
  [290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87116
87261
  return context.factory.updateJsxSpreadAttribute(
87117
87262
  node,
87118
- nodeVisitor(node.expression, visitor, isExpression)
87263
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
87119
87264
  );
87120
87265
  },
87121
87266
  [291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87122
87267
  return context.factory.updateJsxExpression(
87123
87268
  node,
87124
- nodeVisitor(node.expression, visitor, isExpression)
87269
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
87125
87270
  );
87126
87271
  },
87127
87272
  // Clauses
87128
87273
  [292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
87129
87274
  return context.factory.updateCaseClause(
87130
87275
  node,
87131
- nodeVisitor(node.expression, visitor, isExpression),
87276
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
87132
87277
  nodesVisitor(node.statements, visitor, isStatement)
87133
87278
  );
87134
87279
  },
@@ -87148,35 +87293,35 @@ var visitEachChildTable = {
87148
87293
  return context.factory.updateCatchClause(
87149
87294
  node,
87150
87295
  nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
87151
- nodeVisitor(node.block, visitor, isBlock)
87296
+ Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))
87152
87297
  );
87153
87298
  },
87154
87299
  // Property assignments
87155
87300
  [299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87156
87301
  return context.factory.updatePropertyAssignment(
87157
87302
  node,
87158
- nodeVisitor(node.name, visitor, isPropertyName),
87159
- nodeVisitor(node.initializer, visitor, isExpression)
87303
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
87304
+ Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))
87160
87305
  );
87161
87306
  },
87162
87307
  [300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87163
87308
  return context.factory.updateShorthandPropertyAssignment(
87164
87309
  node,
87165
- nodeVisitor(node.name, visitor, isIdentifier),
87310
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
87166
87311
  nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
87167
87312
  );
87168
87313
  },
87169
87314
  [301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87170
87315
  return context.factory.updateSpreadAssignment(
87171
87316
  node,
87172
- nodeVisitor(node.expression, visitor, isExpression)
87317
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
87173
87318
  );
87174
87319
  },
87175
87320
  // Enum
87176
87321
  [302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87177
87322
  return context.factory.updateEnumMember(
87178
87323
  node,
87179
- nodeVisitor(node.name, visitor, isPropertyName),
87324
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
87180
87325
  nodeVisitor(node.initializer, visitor, isExpression)
87181
87326
  );
87182
87327
  },
@@ -87188,13 +87333,13 @@ var visitEachChildTable = {
87188
87333
  );
87189
87334
  },
87190
87335
  // Transformation nodes
87191
- [355 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87336
+ [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87192
87337
  return context.factory.updatePartiallyEmittedExpression(
87193
87338
  node,
87194
- nodeVisitor(node.expression, visitor, isExpression)
87339
+ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
87195
87340
  );
87196
87341
  },
87197
- [356 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
87342
+ [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
87198
87343
  return context.factory.updateCommaListExpression(
87199
87344
  node,
87200
87345
  nodesVisitor(node.elements, visitor, isExpression)
@@ -88143,7 +88288,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
88143
88288
  location = node = value;
88144
88289
  value = node.right;
88145
88290
  } else {
88146
- return visitNode(value, visitor, isExpression);
88291
+ return Debug.checkDefined(visitNode(value, visitor, isExpression));
88147
88292
  }
88148
88293
  }
88149
88294
  }
@@ -88162,6 +88307,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
88162
88307
  };
88163
88308
  if (value) {
88164
88309
  value = visitNode(value, visitor, isExpression);
88310
+ Debug.assert(value);
88165
88311
  if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
88166
88312
  value = ensureIdentifier(
88167
88313
  flattenContext,
@@ -88203,7 +88349,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
88203
88349
  function emitBindingOrAssignment(target, value2, location2, original) {
88204
88350
  Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
88205
88351
  const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
88206
- context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
88352
+ context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),
88207
88353
  location2
88208
88354
  );
88209
88355
  expression.original = original;
@@ -88260,7 +88406,7 @@ function flattenDestructuringBinding(node, visitor, context, level, rval, hoistT
88260
88406
  if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
88261
88407
  initializer = ensureIdentifier(
88262
88408
  flattenContext,
88263
- visitNode(initializer, flattenContext.visitor),
88409
+ Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),
88264
88410
  /*reuseIdentifierExpressions*/
88265
88411
  false,
88266
88412
  initializer
@@ -88381,7 +88527,7 @@ function flattenObjectBindingOrAssignmentPattern(flattenContext, parent2, patter
88381
88527
  if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
88382
88528
  const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
88383
88529
  if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
88384
- bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
88530
+ bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));
88385
88531
  } else {
88386
88532
  if (bindingElements) {
88387
88533
  flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
@@ -88519,7 +88665,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName)
88519
88665
  if (isComputedPropertyName(propertyName)) {
88520
88666
  const argumentExpression = ensureIdentifier(
88521
88667
  flattenContext,
88522
- visitNode(propertyName.expression, flattenContext.visitor),
88668
+ Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),
88523
88669
  /*reuseIdentifierExpressions*/
88524
88670
  false,
88525
88671
  /*location*/
@@ -88562,6 +88708,7 @@ function makeArrayBindingPattern(factory2, elements) {
88562
88708
  return factory2.createArrayBindingPattern(elements);
88563
88709
  }
88564
88710
  function makeArrayAssignmentPattern(factory2, elements) {
88711
+ Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
88565
88712
  return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
88566
88713
  }
88567
88714
  function makeObjectBindingPattern(factory2, elements) {
@@ -88569,6 +88716,7 @@ function makeObjectBindingPattern(factory2, elements) {
88569
88716
  return factory2.createObjectBindingPattern(elements);
88570
88717
  }
88571
88718
  function makeObjectAssignmentPattern(factory2, elements) {
88719
+ Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
88572
88720
  return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
88573
88721
  }
88574
88722
  function makeBindingElement(factory2, name) {
@@ -88592,6 +88740,7 @@ var ProcessLevel = /* @__PURE__ */ ((ProcessLevel2) => {
88592
88740
  })(ProcessLevel || {});
88593
88741
  function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
88594
88742
  const tag = visitNode(node.tag, visitor, isExpression);
88743
+ Debug.assert(tag);
88595
88744
  const templateArguments = [void 0];
88596
88745
  const cookedStrings = [];
88597
88746
  const rawStrings = [];
@@ -88608,7 +88757,7 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
88608
88757
  for (const templateSpan of template.templateSpans) {
88609
88758
  cookedStrings.push(createTemplateCooked(templateSpan.literal));
88610
88759
  rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
88611
- templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
88760
+ templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
88612
88761
  }
88613
88762
  }
88614
88763
  const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
@@ -88981,7 +89130,7 @@ function transformTypeScript(context) {
88981
89130
  function visitObjectLiteralExpression(node) {
88982
89131
  return factory2.updateObjectLiteralExpression(
88983
89132
  node,
88984
- visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElement)
89133
+ visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)
88985
89134
  );
88986
89135
  }
88987
89136
  function getClassFacts(node, staticProperties) {
@@ -89179,6 +89328,7 @@ function transformTypeScript(context) {
89179
89328
  const decorators = [];
89180
89329
  for (const parameterDecorator of parameterDecorators) {
89181
89330
  const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
89331
+ Debug.assert(expression);
89182
89332
  const helper = emitHelpers().createParamHelper(expression, parameterOffset);
89183
89333
  setTextRange(helper, parameterDecorator.expression);
89184
89334
  setEmitFlags(helper, 3072 /* NoComments */);
@@ -89302,6 +89452,7 @@ function transformTypeScript(context) {
89302
89452
  const name = member.name;
89303
89453
  if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
89304
89454
  const expression = visitNode(name.expression, visitor, isExpression);
89455
+ Debug.assert(expression);
89305
89456
  const innerExpression = skipPartiallyEmittedExpressions(expression);
89306
89457
  if (!isSimpleInlineableExpression(innerExpression)) {
89307
89458
  const generatedName = factory2.getGeneratedNameForNode(name);
@@ -89309,7 +89460,7 @@ function transformTypeScript(context) {
89309
89460
  return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
89310
89461
  }
89311
89462
  }
89312
- return visitNode(name, visitor, isPropertyName);
89463
+ return Debug.checkDefined(visitNode(name, visitor, isPropertyName));
89313
89464
  }
89314
89465
  function visitHeritageClause(node) {
89315
89466
  if (node.token === 117 /* ImplementsKeyword */) {
@@ -89320,7 +89471,7 @@ function transformTypeScript(context) {
89320
89471
  function visitExpressionWithTypeArguments(node) {
89321
89472
  return factory2.updateExpressionWithTypeArguments(
89322
89473
  node,
89323
- visitNode(node.expression, visitor, isLeftHandSideExpression),
89474
+ Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),
89324
89475
  /*typeArguments*/
89325
89476
  void 0
89326
89477
  );
@@ -89339,7 +89490,7 @@ function transformTypeScript(context) {
89339
89490
  return factory2.updatePropertyDeclaration(
89340
89491
  node,
89341
89492
  concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
89342
- visitNode(node.name, visitor, isPropertyName),
89493
+ Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
89343
89494
  /*questionOrExclamationToken*/
89344
89495
  void 0,
89345
89496
  /*type*/
@@ -89356,7 +89507,7 @@ function transformTypeScript(context) {
89356
89507
  void 0,
89357
89508
  /*type*/
89358
89509
  void 0,
89359
- visitNode(node.initializer, visitor)
89510
+ visitNode(node.initializer, visitor, isExpression)
89360
89511
  );
89361
89512
  }
89362
89513
  function visitConstructor(node) {
@@ -89575,7 +89726,7 @@ function transformTypeScript(context) {
89575
89726
  elideNodes(factory2, node.modifiers),
89576
89727
  // preserve positions, if available
89577
89728
  node.dotDotDotToken,
89578
- visitNode(node.name, visitor, isBindingName),
89729
+ Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
89579
89730
  /*questionToken*/
89580
89731
  void 0,
89581
89732
  /*type*/
@@ -89624,7 +89775,7 @@ function transformTypeScript(context) {
89624
89775
  return setTextRange(
89625
89776
  factory2.createAssignment(
89626
89777
  getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
89627
- visitNode(node.initializer, visitor, isExpression)
89778
+ Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
89628
89779
  ),
89629
89780
  /*location*/
89630
89781
  node
@@ -89634,7 +89785,7 @@ function transformTypeScript(context) {
89634
89785
  function visitVariableDeclaration(node) {
89635
89786
  const updated = factory2.updateVariableDeclaration(
89636
89787
  node,
89637
- visitNode(node.name, visitor, isBindingName),
89788
+ Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
89638
89789
  /*exclamationToken*/
89639
89790
  void 0,
89640
89791
  /*type*/
@@ -89650,26 +89801,30 @@ function transformTypeScript(context) {
89650
89801
  const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
89651
89802
  if (isAssertionExpression(innerExpression)) {
89652
89803
  const expression = visitNode(node.expression, visitor, isExpression);
89804
+ Debug.assert(expression);
89653
89805
  return factory2.createPartiallyEmittedExpression(expression, node);
89654
89806
  }
89655
89807
  return visitEachChild(node, visitor, context);
89656
89808
  }
89657
89809
  function visitAssertionExpression(node) {
89658
89810
  const expression = visitNode(node.expression, visitor, isExpression);
89811
+ Debug.assert(expression);
89659
89812
  return factory2.createPartiallyEmittedExpression(expression, node);
89660
89813
  }
89661
89814
  function visitNonNullExpression(node) {
89662
89815
  const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
89816
+ Debug.assert(expression);
89663
89817
  return factory2.createPartiallyEmittedExpression(expression, node);
89664
89818
  }
89665
89819
  function visitSatisfiesExpression(node) {
89666
89820
  const expression = visitNode(node.expression, visitor, isExpression);
89821
+ Debug.assert(expression);
89667
89822
  return factory2.createPartiallyEmittedExpression(expression, node);
89668
89823
  }
89669
89824
  function visitCallExpression(node) {
89670
89825
  return factory2.updateCallExpression(
89671
89826
  node,
89672
- visitNode(node.expression, visitor, isExpression),
89827
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
89673
89828
  /*typeArguments*/
89674
89829
  void 0,
89675
89830
  visitNodes2(node.arguments, visitor, isExpression)
@@ -89678,7 +89833,7 @@ function transformTypeScript(context) {
89678
89833
  function visitNewExpression(node) {
89679
89834
  return factory2.updateNewExpression(
89680
89835
  node,
89681
- visitNode(node.expression, visitor, isExpression),
89836
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
89682
89837
  /*typeArguments*/
89683
89838
  void 0,
89684
89839
  visitNodes2(node.arguments, visitor, isExpression)
@@ -89687,28 +89842,28 @@ function transformTypeScript(context) {
89687
89842
  function visitTaggedTemplateExpression(node) {
89688
89843
  return factory2.updateTaggedTemplateExpression(
89689
89844
  node,
89690
- visitNode(node.tag, visitor, isExpression),
89845
+ Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
89691
89846
  /*typeArguments*/
89692
89847
  void 0,
89693
- visitNode(node.template, visitor, isExpression)
89848
+ Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
89694
89849
  );
89695
89850
  }
89696
89851
  function visitJsxSelfClosingElement(node) {
89697
89852
  return factory2.updateJsxSelfClosingElement(
89698
89853
  node,
89699
- visitNode(node.tagName, visitor, isJsxTagNameExpression),
89854
+ Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
89700
89855
  /*typeArguments*/
89701
89856
  void 0,
89702
- visitNode(node.attributes, visitor, isJsxAttributes)
89857
+ Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
89703
89858
  );
89704
89859
  }
89705
89860
  function visitJsxJsxOpeningElement(node) {
89706
89861
  return factory2.updateJsxOpeningElement(
89707
89862
  node,
89708
- visitNode(node.tagName, visitor, isJsxTagNameExpression),
89863
+ Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
89709
89864
  /*typeArguments*/
89710
89865
  void 0,
89711
- visitNode(node.attributes, visitor, isJsxAttributes)
89866
+ Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
89712
89867
  );
89713
89868
  }
89714
89869
  function shouldEmitEnumDeclaration(node) {
@@ -89854,7 +90009,7 @@ function transformTypeScript(context) {
89854
90009
  } else {
89855
90010
  enableSubstitutionForNonQualifiedEnumMembers();
89856
90011
  if (member.initializer) {
89857
- return visitNode(member.initializer, visitor, isExpression);
90012
+ return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));
89858
90013
  } else {
89859
90014
  return factory2.createVoidZero();
89860
90015
  }
@@ -90135,7 +90290,7 @@ function transformTypeScript(context) {
90135
90290
  return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
90136
90291
  }
90137
90292
  function visitNamespaceExports(node) {
90138
- return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
90293
+ return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));
90139
90294
  }
90140
90295
  function visitNamedExportBindings(node, allowEmpty) {
90141
90296
  return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
@@ -90613,6 +90768,7 @@ function transformClassFields(context) {
90613
90768
  const info = accessPrivateIdentifier(node.left);
90614
90769
  if (info) {
90615
90770
  const receiver = visitNode(node.right, visitor, isExpression);
90771
+ Debug.assert(receiver);
90616
90772
  return setOriginalNode(
90617
90773
  context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
90618
90774
  node
@@ -90630,6 +90786,7 @@ function transformClassFields(context) {
90630
90786
  }
90631
90787
  function visitComputedPropertyName(node) {
90632
90788
  let expression = visitNode(node.expression, visitor, isExpression);
90789
+ Debug.assert(expression);
90633
90790
  if (some(pendingExpressions)) {
90634
90791
  if (isParenthesizedExpression(expression)) {
90635
90792
  expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
@@ -90711,6 +90868,7 @@ function transformClassFields(context) {
90711
90868
  const temp = factory2.createTempVariable(hoistVariableDeclaration);
90712
90869
  setSourceMapRange(temp, name.expression);
90713
90870
  const expression = visitNode(name.expression, visitor, isExpression);
90871
+ Debug.assert(expression);
90714
90872
  const assignment = factory2.createAssignment(temp, expression);
90715
90873
  setSourceMapRange(assignment, name.expression);
90716
90874
  getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
@@ -90793,7 +90951,7 @@ function transformClassFields(context) {
90793
90951
  return transformFieldInitializer(node);
90794
90952
  }
90795
90953
  function createPrivateIdentifierAccess(info, receiver) {
90796
- return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
90954
+ return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
90797
90955
  }
90798
90956
  function createPrivateIdentifierAccessHelper(info, receiver) {
90799
90957
  setCommentRange(receiver, moveRangePos(receiver, -1));
@@ -90863,7 +91021,7 @@ function transformClassFields(context) {
90863
91021
  if (classConstructor && superClassReference) {
90864
91022
  const superProperty = factory2.createReflectGetCall(
90865
91023
  superClassReference,
90866
- visitNode(node.argumentExpression, visitor, isExpression),
91024
+ Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
90867
91025
  classConstructor
90868
91026
  );
90869
91027
  setOriginalNode(superProperty, node.expression);
@@ -90880,6 +91038,7 @@ function transformClassFields(context) {
90880
91038
  let info;
90881
91039
  if (info = accessPrivateIdentifier(operand.name)) {
90882
91040
  const receiver = visitNode(operand.expression, visitor, isExpression);
91041
+ Debug.assert(receiver);
90883
91042
  const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
90884
91043
  let expression = createPrivateIdentifierAccess(info, readExpression);
90885
91044
  const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
@@ -90916,7 +91075,7 @@ function transformClassFields(context) {
90916
91075
  getterName = setterName = operand.argumentExpression;
90917
91076
  } else {
90918
91077
  getterName = factory2.createTempVariable(hoistVariableDeclaration);
90919
- setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
91078
+ setterName = factory2.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
90920
91079
  }
90921
91080
  }
90922
91081
  if (setterName && getterName) {
@@ -90950,7 +91109,7 @@ function transformClassFields(context) {
90950
91109
  function visitExpressionStatement(node) {
90951
91110
  return factory2.updateExpressionStatement(
90952
91111
  node,
90953
- visitNode(node.expression, discardedValueVisitor, isExpression)
91112
+ Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
90954
91113
  );
90955
91114
  }
90956
91115
  function createCopiableReceiverExpr(receiver) {
@@ -90968,25 +91127,25 @@ function transformClassFields(context) {
90968
91127
  if (isCallChain(node)) {
90969
91128
  return factory2.updateCallChain(
90970
91129
  node,
90971
- factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
91130
+ factory2.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
90972
91131
  /*questionDotToken*/
90973
91132
  void 0,
90974
91133
  /*typeArguments*/
90975
91134
  void 0,
90976
- [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
91135
+ [Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
90977
91136
  );
90978
91137
  }
90979
91138
  return factory2.updateCallExpression(
90980
91139
  node,
90981
- factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
91140
+ factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
90982
91141
  /*typeArguments*/
90983
91142
  void 0,
90984
- [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
91143
+ [Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
90985
91144
  );
90986
91145
  }
90987
91146
  if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
90988
91147
  const invocation = factory2.createFunctionCallCall(
90989
- visitNode(node.expression, visitor, isExpression),
91148
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
90990
91149
  currentClassLexicalEnvironment.classConstructor,
90991
91150
  visitNodes2(node.arguments, visitor, isExpression)
90992
91151
  );
@@ -91002,19 +91161,19 @@ function transformClassFields(context) {
91002
91161
  return factory2.updateTaggedTemplateExpression(
91003
91162
  node,
91004
91163
  factory2.createCallExpression(
91005
- factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
91164
+ factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
91006
91165
  /*typeArguments*/
91007
91166
  void 0,
91008
- [visitNode(thisArg, visitor, isExpression)]
91167
+ [Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
91009
91168
  ),
91010
91169
  /*typeArguments*/
91011
91170
  void 0,
91012
- visitNode(node.template, visitor, isTemplateLiteral)
91171
+ Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
91013
91172
  );
91014
91173
  }
91015
91174
  if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
91016
91175
  const invocation = factory2.createFunctionBindCall(
91017
- visitNode(node.tag, visitor, isExpression),
91176
+ Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
91018
91177
  currentClassLexicalEnvironment.classConstructor,
91019
91178
  []
91020
91179
  );
@@ -91025,7 +91184,7 @@ function transformClassFields(context) {
91025
91184
  invocation,
91026
91185
  /*typeArguments*/
91027
91186
  void 0,
91028
- visitNode(node.template, visitor, isTemplateLiteral)
91187
+ Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
91029
91188
  );
91030
91189
  }
91031
91190
  return visitEachChild(node, visitor, context);
@@ -91055,9 +91214,9 @@ function transformClassFields(context) {
91055
91214
  pendingExpressions = void 0;
91056
91215
  node = factory2.updateBinaryExpression(
91057
91216
  node,
91058
- visitNode(node.left, assignmentTargetVisitor),
91217
+ Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
91059
91218
  node.operatorToken,
91060
- visitNode(node.right, visitor)
91219
+ Debug.checkDefined(visitNode(node.right, visitor, isExpression))
91061
91220
  );
91062
91221
  const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
91063
91222
  pendingExpressions = savedPendingExpressions;
@@ -91082,7 +91241,7 @@ function transformClassFields(context) {
91082
91241
  node,
91083
91242
  visitInvalidSuperProperty(node.left),
91084
91243
  node.operatorToken,
91085
- visitNode(node.right, visitor, isExpression)
91244
+ Debug.checkDefined(visitNode(node.right, visitor, isExpression))
91086
91245
  );
91087
91246
  }
91088
91247
  if (classConstructor && superClassReference) {
@@ -91102,6 +91261,7 @@ function transformClassFields(context) {
91102
91261
  );
91103
91262
  setOriginalNode(superPropertyGet, node.left);
91104
91263
  setTextRange(superPropertyGet, node.left);
91264
+ Debug.assert(expression);
91105
91265
  expression = factory2.createBinaryExpression(
91106
91266
  superPropertyGet,
91107
91267
  getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
@@ -91111,9 +91271,11 @@ function transformClassFields(context) {
91111
91271
  }
91112
91272
  const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
91113
91273
  if (temp) {
91274
+ Debug.assert(expression);
91114
91275
  expression = factory2.createAssignment(temp, expression);
91115
91276
  setTextRange(temp, node);
91116
91277
  }
91278
+ Debug.assert(expression);
91117
91279
  expression = factory2.createReflectSetCall(
91118
91280
  superClassReference,
91119
91281
  setterName,
@@ -91137,8 +91299,8 @@ function transformClassFields(context) {
91137
91299
  return visitEachChild(node, visitor, context);
91138
91300
  }
91139
91301
  function createPrivateIdentifierAssignment(info, receiver, right, operator) {
91140
- receiver = visitNode(receiver, visitor, isExpression);
91141
- right = visitNode(right, visitor, isExpression);
91302
+ receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
91303
+ right = Debug.checkDefined(visitNode(right, visitor, isExpression));
91142
91304
  if (isCompoundAssignment(operator)) {
91143
91305
  const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
91144
91306
  receiver = initializeExpression || readExpression;
@@ -91241,7 +91403,7 @@ function transformClassFields(context) {
91241
91403
  node,
91242
91404
  factory2.createAssignment(
91243
91405
  temp,
91244
- visitNode(node.expression, visitor, isExpression)
91406
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
91245
91407
  ),
91246
91408
  /*typeArguments*/
91247
91409
  void 0
@@ -91803,7 +91965,7 @@ function transformClassFields(context) {
91803
91965
  ) : factory2.updateElementAccessExpression(
91804
91966
  node,
91805
91967
  factory2.createVoidZero(),
91806
- visitNode(node.argumentExpression, visitor, isExpression)
91968
+ Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
91807
91969
  );
91808
91970
  }
91809
91971
  function onEmitNode(hint, node, emitCallback) {
@@ -91920,6 +92082,7 @@ function transformClassFields(context) {
91920
92082
  function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
91921
92083
  if (isComputedPropertyName(name)) {
91922
92084
  const expression = visitNode(name.expression, visitor, isExpression);
92085
+ Debug.assert(expression);
91923
92086
  const innerExpression = skipPartiallyEmittedExpressions(expression);
91924
92087
  const inlinable = isSimpleInlineableExpression(innerExpression);
91925
92088
  const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
@@ -92141,7 +92304,7 @@ function transformClassFields(context) {
92141
92304
  /*reservedInNestedScopes*/
92142
92305
  true
92143
92306
  );
92144
- getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
92307
+ getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
92145
92308
  }
92146
92309
  return factory2.createAssignmentTargetWrapper(
92147
92310
  parameter,
@@ -92154,6 +92317,7 @@ function transformClassFields(context) {
92154
92317
  );
92155
92318
  }
92156
92319
  function visitArrayAssignmentTarget(node) {
92320
+ Debug.assertNode(node, isBindingOrAssignmentElement);
92157
92321
  const target = getTargetOfBindingOrAssignmentElement(node);
92158
92322
  if (target) {
92159
92323
  let wrapped;
@@ -92188,7 +92352,7 @@ function transformClassFields(context) {
92188
92352
  node,
92189
92353
  wrapped,
92190
92354
  node.operatorToken,
92191
- visitNode(node.right, visitor, isExpression)
92355
+ Debug.checkDefined(visitNode(node.right, visitor, isExpression))
92192
92356
  );
92193
92357
  } else if (isSpreadElement(node)) {
92194
92358
  return factory2.updateSpreadElement(node, wrapped);
@@ -92234,14 +92398,14 @@ function transformClassFields(context) {
92234
92398
  const initializer = getInitializerOfBindingOrAssignmentElement(node);
92235
92399
  return factory2.updatePropertyAssignment(
92236
92400
  node,
92237
- visitNode(node.name, visitor, isPropertyName),
92238
- wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
92401
+ Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
92402
+ wrapped ? initializer ? factory2.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped : Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
92239
92403
  );
92240
92404
  }
92241
92405
  if (isSpreadAssignment(node)) {
92242
92406
  return factory2.updateSpreadAssignment(
92243
92407
  node,
92244
- wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
92408
+ wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
92245
92409
  );
92246
92410
  }
92247
92411
  Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
@@ -92855,7 +93019,7 @@ function transformLegacyDecorators(context) {
92855
93019
  return factory2.updateConstructorDeclaration(
92856
93020
  node,
92857
93021
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
92858
- visitNodes2(node.parameters, visitor, isParameterDeclaration),
93022
+ visitNodes2(node.parameters, visitor, isParameter),
92859
93023
  visitNode(node.body, visitor, isBlock)
92860
93024
  );
92861
93025
  }
@@ -92871,12 +93035,12 @@ function transformLegacyDecorators(context) {
92871
93035
  node,
92872
93036
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
92873
93037
  node.asteriskToken,
92874
- visitNode(node.name, visitor, isPropertyName),
93038
+ Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
92875
93039
  /*questionToken*/
92876
93040
  void 0,
92877
93041
  /*typeParameters*/
92878
93042
  void 0,
92879
- visitNodes2(node.parameters, visitor, isParameterDeclaration),
93043
+ visitNodes2(node.parameters, visitor, isParameter),
92880
93044
  /*type*/
92881
93045
  void 0,
92882
93046
  visitNode(node.body, visitor, isBlock)
@@ -92886,8 +93050,8 @@ function transformLegacyDecorators(context) {
92886
93050
  return finishClassElement(factory2.updateGetAccessorDeclaration(
92887
93051
  node,
92888
93052
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
92889
- visitNode(node.name, visitor, isPropertyName),
92890
- visitNodes2(node.parameters, visitor, isParameterDeclaration),
93053
+ Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
93054
+ visitNodes2(node.parameters, visitor, isParameter),
92891
93055
  /*type*/
92892
93056
  void 0,
92893
93057
  visitNode(node.body, visitor, isBlock)
@@ -92897,8 +93061,8 @@ function transformLegacyDecorators(context) {
92897
93061
  return finishClassElement(factory2.updateSetAccessorDeclaration(
92898
93062
  node,
92899
93063
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
92900
- visitNode(node.name, visitor, isPropertyName),
92901
- visitNodes2(node.parameters, visitor, isParameterDeclaration),
93064
+ Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
93065
+ visitNodes2(node.parameters, visitor, isParameter),
92902
93066
  visitNode(node.body, visitor, isBlock)
92903
93067
  ), node);
92904
93068
  }
@@ -92909,7 +93073,7 @@ function transformLegacyDecorators(context) {
92909
93073
  return finishClassElement(factory2.updatePropertyDeclaration(
92910
93074
  node,
92911
93075
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
92912
- visitNode(node.name, visitor, isPropertyName),
93076
+ Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
92913
93077
  /*questionOrExclamationToken*/
92914
93078
  void 0,
92915
93079
  /*type*/
@@ -92922,7 +93086,7 @@ function transformLegacyDecorators(context) {
92922
93086
  node,
92923
93087
  elideNodes(factory2, node.modifiers),
92924
93088
  node.dotDotDotToken,
92925
- visitNode(node.name, visitor, isBindingName),
93089
+ Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
92926
93090
  /*questionToken*/
92927
93091
  void 0,
92928
93092
  /*type*/
@@ -93019,7 +93183,7 @@ function transformLegacyDecorators(context) {
93019
93183
  return expression;
93020
93184
  }
93021
93185
  function transformDecorator(decorator) {
93022
- return visitNode(decorator.expression, visitor, isExpression);
93186
+ return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));
93023
93187
  }
93024
93188
  function transformDecoratorsOfParameter(decorators, parameterOffset) {
93025
93189
  let expressions;
@@ -93285,21 +93449,21 @@ function transformES2017(context) {
93285
93449
  node.initializer,
93286
93450
  /*hasReceiver*/
93287
93451
  true
93288
- ) : visitNode(node.initializer, visitor, isForInitializer),
93289
- visitNode(node.expression, visitor, isExpression),
93452
+ ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
93453
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
93290
93454
  visitIterationBody(node.statement, asyncBodyVisitor, context)
93291
93455
  );
93292
93456
  }
93293
93457
  function visitForOfStatementInAsyncBody(node) {
93294
93458
  return factory2.updateForOfStatement(
93295
93459
  node,
93296
- visitNode(node.awaitModifier, visitor, isToken),
93460
+ visitNode(node.awaitModifier, visitor, isAwaitKeyword),
93297
93461
  isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
93298
93462
  node.initializer,
93299
93463
  /*hasReceiver*/
93300
93464
  true
93301
- ) : visitNode(node.initializer, visitor, isForInitializer),
93302
- visitNode(node.expression, visitor, isExpression),
93465
+ ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
93466
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
93303
93467
  visitIterationBody(node.statement, asyncBodyVisitor, context)
93304
93468
  );
93305
93469
  }
@@ -93336,7 +93500,7 @@ function transformES2017(context) {
93336
93500
  function visitConstructorDeclaration(node) {
93337
93501
  return factory2.updateConstructorDeclaration(
93338
93502
  node,
93339
- visitNodes2(node.modifiers, visitor, isModifierLike),
93503
+ visitNodes2(node.modifiers, visitor, isModifier),
93340
93504
  visitParameterList(node.parameters, visitor, context),
93341
93505
  transformMethodBody(node)
93342
93506
  );
@@ -93394,7 +93558,7 @@ function transformES2017(context) {
93394
93558
  function visitFunctionExpression(node) {
93395
93559
  return factory2.updateFunctionExpression(
93396
93560
  node,
93397
- visitNodes2(node.modifiers, visitor, isModifierLike),
93561
+ visitNodes2(node.modifiers, visitor, isModifier),
93398
93562
  node.asteriskToken,
93399
93563
  node.name,
93400
93564
  /*typeParameters*/
@@ -93408,7 +93572,7 @@ function transformES2017(context) {
93408
93572
  function visitArrowFunction(node) {
93409
93573
  return factory2.updateArrowFunction(
93410
93574
  node,
93411
- visitNodes2(node.modifiers, visitor, isModifierLike),
93575
+ visitNodes2(node.modifiers, visitor, isModifier),
93412
93576
  /*typeParameters*/
93413
93577
  void 0,
93414
93578
  visitParameterList(node.parameters, visitor, context),
@@ -93465,7 +93629,7 @@ function transformES2017(context) {
93465
93629
  ),
93466
93630
  node
93467
93631
  );
93468
- return visitNode(converted, visitor, isExpression);
93632
+ return Debug.checkDefined(visitNode(converted, visitor, isExpression));
93469
93633
  }
93470
93634
  function collidesWithParameterName({ name }) {
93471
93635
  if (isIdentifier(name)) {
@@ -93597,7 +93761,7 @@ function transformES2017(context) {
93597
93761
  if (isBlock(body)) {
93598
93762
  return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start2));
93599
93763
  } else {
93600
- return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
93764
+ return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));
93601
93765
  }
93602
93766
  }
93603
93767
  function getPromiseConstructor(type) {
@@ -93952,7 +94116,7 @@ function transformES2018(context) {
93952
94116
  return visitObjectLiteralExpression(node);
93953
94117
  case 223 /* BinaryExpression */:
93954
94118
  return visitBinaryExpression(node, expressionResultIsUnused2);
93955
- case 356 /* CommaListExpression */:
94119
+ case 357 /* CommaListExpression */:
93956
94120
  return visitCommaListExpression(node, expressionResultIsUnused2);
93957
94121
  case 295 /* CatchClause */:
93958
94122
  return visitCatchClause(node);
@@ -94710,7 +94874,7 @@ function transformES2018(context) {
94710
94874
  /*questionToken*/
94711
94875
  void 0,
94712
94876
  visitor,
94713
- isToken
94877
+ isQuestionToken
94714
94878
  ),
94715
94879
  /*typeParameters*/
94716
94880
  void 0,
@@ -95384,15 +95548,10 @@ function transformES2021(context) {
95384
95548
  if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {
95385
95549
  return node;
95386
95550
  }
95387
- switch (node.kind) {
95388
- case 223 /* BinaryExpression */:
95389
- const binaryExpression = node;
95390
- if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
95391
- return transformLogicalAssignment(binaryExpression);
95392
- }
95393
- default:
95394
- return visitEachChild(node, visitor, context);
95551
+ if (isLogicalOrCoalescingAssignmentExpression(node)) {
95552
+ return transformLogicalAssignment(node);
95395
95553
  }
95554
+ return visitEachChild(node, visitor, context);
95396
95555
  }
95397
95556
  function transformLogicalAssignment(binaryExpression) {
95398
95557
  const operator = binaryExpression.operatorToken;
@@ -95838,7 +95997,7 @@ function transformJsx(context) {
95838
95997
  return element;
95839
95998
  }
95840
95999
  function transformJsxSpreadAttributeToSpreadAssignment(node) {
95841
- return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
96000
+ return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
95842
96001
  }
95843
96002
  function transformJsxAttributesToObjectProps(attrs, children) {
95844
96003
  const target = getEmitScriptTarget(compilerOptions);
@@ -95868,7 +96027,7 @@ function transformJsx(context) {
95868
96027
  return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
95869
96028
  }
95870
96029
  function transformJsxSpreadAttributeToExpression(node) {
95871
- return visitNode(node.expression, visitor, isExpression);
96030
+ return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
95872
96031
  }
95873
96032
  function transformJsxAttributeToObjectLiteralElement(node) {
95874
96033
  const name = getAttributeName(node);
@@ -95888,7 +96047,7 @@ function transformJsx(context) {
95888
96047
  if (node.expression === void 0) {
95889
96048
  return factory2.createTrue();
95890
96049
  }
95891
- return visitNode(node.expression, visitor, isExpression);
96050
+ return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
95892
96051
  }
95893
96052
  if (isJsxElement(node)) {
95894
96053
  return visitJsxElement(
@@ -96530,7 +96689,7 @@ function transformES2015(context) {
96530
96689
  return visitParenthesizedExpression(node, expressionResultIsUnused2);
96531
96690
  case 223 /* BinaryExpression */:
96532
96691
  return visitBinaryExpression(node, expressionResultIsUnused2);
96533
- case 356 /* CommaListExpression */:
96692
+ case 357 /* CommaListExpression */:
96534
96693
  return visitCommaListExpression(node, expressionResultIsUnused2);
96535
96694
  case 14 /* NoSubstitutionTemplateLiteral */:
96536
96695
  case 15 /* TemplateHead */:
@@ -96633,7 +96792,7 @@ function transformES2015(context) {
96633
96792
  [
96634
96793
  factory2.createPropertyAssignment(
96635
96794
  factory2.createIdentifier("value"),
96636
- node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
96795
+ node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()
96637
96796
  )
96638
96797
  ]
96639
96798
  )
@@ -96804,7 +96963,7 @@ function transformES2015(context) {
96804
96963
  outer,
96805
96964
  /*typeArguments*/
96806
96965
  void 0,
96807
- extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
96966
+ extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []
96808
96967
  )
96809
96968
  );
96810
96969
  addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
@@ -97146,7 +97305,7 @@ function transformES2015(context) {
97146
97305
  factory2.createExpressionStatement(
97147
97306
  factory2.createAssignment(
97148
97307
  factory2.getGeneratedNameForNode(parameter),
97149
- visitNode(initializer, visitor, isExpression)
97308
+ Debug.checkDefined(visitNode(initializer, visitor, isExpression))
97150
97309
  )
97151
97310
  ),
97152
97311
  2097152 /* CustomPrologue */
@@ -97157,7 +97316,7 @@ function transformES2015(context) {
97157
97316
  return false;
97158
97317
  }
97159
97318
  function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
97160
- initializer = visitNode(initializer, visitor, isExpression);
97319
+ initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
97161
97320
  const statement = factory2.createIfStatement(
97162
97321
  factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
97163
97322
  setEmitFlags(
@@ -97433,6 +97592,7 @@ function transformES2015(context) {
97433
97592
  container
97434
97593
  );
97435
97594
  const propertyName = visitNode(member.name, visitor, isPropertyName);
97595
+ Debug.assert(propertyName);
97436
97596
  let e;
97437
97597
  if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
97438
97598
  const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
@@ -97476,6 +97636,7 @@ function transformES2015(context) {
97476
97636
  setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
97477
97637
  setSourceMapRange(target, firstAccessor.name);
97478
97638
  const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
97639
+ Debug.assert(visitedAccessorName);
97479
97640
  if (isPrivateIdentifier(visitedAccessorName)) {
97480
97641
  return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
97481
97642
  }
@@ -97748,9 +97909,9 @@ function transformES2015(context) {
97748
97909
  if (node.operatorToken.kind === 27 /* CommaToken */) {
97749
97910
  return factory2.updateBinaryExpression(
97750
97911
  node,
97751
- visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
97912
+ Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),
97752
97913
  node.operatorToken,
97753
- visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
97914
+ Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))
97754
97915
  );
97755
97916
  }
97756
97917
  return visitEachChild(node, visitor, context);
@@ -97765,6 +97926,7 @@ function transformES2015(context) {
97765
97926
  const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
97766
97927
  if (result || visited !== element) {
97767
97928
  result || (result = node.elements.slice(0, i));
97929
+ Debug.assert(visited);
97768
97930
  result.push(visited);
97769
97931
  }
97770
97932
  }
@@ -97791,7 +97953,7 @@ function transformES2015(context) {
97791
97953
  0 /* All */
97792
97954
  );
97793
97955
  } else {
97794
- assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
97956
+ assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));
97795
97957
  setTextRange(assignment, decl);
97796
97958
  }
97797
97959
  assignments = append(assignments, assignment);
@@ -97813,7 +97975,7 @@ function transformES2015(context) {
97813
97975
  if (node.flags & 3 /* BlockScoped */) {
97814
97976
  enableSubstitutionsForBlockScopedBindings();
97815
97977
  }
97816
- const declarations = flatMap(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration);
97978
+ const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration);
97817
97979
  const declarationList = factory2.createVariableDeclarationList(declarations);
97818
97980
  setOriginalNode(declarationList, node);
97819
97981
  setTextRange(declarationList, node);
@@ -97897,7 +98059,7 @@ function transformES2015(context) {
97897
98059
  statement,
97898
98060
  /*outermostLabeledStatement*/
97899
98061
  node
97900
- ) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
98062
+ ) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel);
97901
98063
  }
97902
98064
  function visitIterationStatement(node, outermostLabeledStatement) {
97903
98065
  switch (node.kind) {
@@ -97940,7 +98102,7 @@ function transformES2015(context) {
97940
98102
  visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
97941
98103
  visitNode(node.condition, visitor, isExpression),
97942
98104
  visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
97943
- visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
98105
+ Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
97944
98106
  );
97945
98107
  }
97946
98108
  function visitForInStatement(node, outermostLabeledStatement) {
@@ -98026,13 +98188,14 @@ function transformES2015(context) {
98026
98188
  )));
98027
98189
  } else {
98028
98190
  setTextRangeEnd(assignment, initializer.end);
98029
- statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
98191
+ statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));
98030
98192
  }
98031
98193
  }
98032
98194
  if (convertedLoopBodyStatements) {
98033
98195
  return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
98034
98196
  } else {
98035
98197
  const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
98198
+ Debug.assert(statement);
98036
98199
  if (isBlock(statement)) {
98037
98200
  return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
98038
98201
  } else {
@@ -98053,6 +98216,7 @@ function transformES2015(context) {
98053
98216
  }
98054
98217
  function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
98055
98218
  const expression = visitNode(node.expression, visitor, isExpression);
98219
+ Debug.assert(expression);
98056
98220
  const counter = factory2.createLoopVariable();
98057
98221
  const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
98058
98222
  /*recordTempVariable*/
@@ -98112,6 +98276,7 @@ function transformES2015(context) {
98112
98276
  }
98113
98277
  function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
98114
98278
  const expression = visitNode(node.expression, visitor, isExpression);
98279
+ Debug.assert(expression);
98115
98280
  const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
98116
98281
  /*recordTempVariable*/
98117
98282
  void 0
@@ -98369,7 +98534,7 @@ function transformES2015(context) {
98369
98534
  loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
98370
98535
  }
98371
98536
  } else {
98372
- const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
98537
+ const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));
98373
98538
  loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
98374
98539
  }
98375
98540
  statements.push(loop);
@@ -98407,16 +98572,16 @@ function transformES2015(context) {
98407
98572
  node,
98408
98573
  /*awaitModifier*/
98409
98574
  void 0,
98410
- visitNode(node.initializer, visitor, isForInitializer),
98411
- visitNode(node.expression, visitor, isExpression),
98575
+ Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
98576
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
98412
98577
  convertedLoopBody
98413
98578
  );
98414
98579
  }
98415
98580
  function convertForInStatement(node, convertedLoopBody) {
98416
98581
  return factory2.updateForInStatement(
98417
98582
  node,
98418
- visitNode(node.initializer, visitor, isForInitializer),
98419
- visitNode(node.expression, visitor, isExpression),
98583
+ Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
98584
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
98420
98585
  convertedLoopBody
98421
98586
  );
98422
98587
  }
@@ -98424,13 +98589,13 @@ function transformES2015(context) {
98424
98589
  return factory2.updateDoStatement(
98425
98590
  node,
98426
98591
  convertedLoopBody,
98427
- visitNode(node.expression, visitor, isExpression)
98592
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
98428
98593
  );
98429
98594
  }
98430
98595
  function convertWhileStatement(node, convertedLoopBody) {
98431
98596
  return factory2.updateWhileStatement(
98432
98597
  node,
98433
- visitNode(node.expression, visitor, isExpression),
98598
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
98434
98599
  convertedLoopBody
98435
98600
  );
98436
98601
  }
@@ -98592,7 +98757,7 @@ function transformES2015(context) {
98592
98757
  void 0,
98593
98758
  /*type*/
98594
98759
  void 0,
98595
- visitNode(
98760
+ Debug.checkDefined(visitNode(
98596
98761
  factory2.createBlock(
98597
98762
  statements,
98598
98763
  /*multiLine*/
@@ -98600,7 +98765,7 @@ function transformES2015(context) {
98600
98765
  ),
98601
98766
  visitor,
98602
98767
  isBlock
98603
- )
98768
+ ))
98604
98769
  ),
98605
98770
  emitFlags
98606
98771
  )
@@ -98623,7 +98788,7 @@ function transformES2015(context) {
98623
98788
  if (node.incrementor) {
98624
98789
  statements.push(factory2.createIfStatement(
98625
98790
  currentState.conditionVariable,
98626
- factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
98791
+ factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),
98627
98792
  factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
98628
98793
  ));
98629
98794
  } else {
@@ -98634,11 +98799,12 @@ function transformES2015(context) {
98634
98799
  }
98635
98800
  if (shouldConvertConditionOfForStatement(node)) {
98636
98801
  statements.push(factory2.createIfStatement(
98637
- factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
98638
- visitNode(factory2.createBreakStatement(), visitor, isStatement)
98802
+ factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),
98803
+ Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))
98639
98804
  ));
98640
98805
  }
98641
98806
  }
98807
+ Debug.assert(statement);
98642
98808
  if (isBlock(statement)) {
98643
98809
  addRange(statements, statement.statements);
98644
98810
  } else {
@@ -98906,9 +99072,9 @@ function transformES2015(context) {
98906
99072
  createMemberAccessForPropertyName(
98907
99073
  factory2,
98908
99074
  receiver,
98909
- visitNode(property.name, visitor, isPropertyName)
99075
+ Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
98910
99076
  ),
98911
- visitNode(property.initializer, visitor, isExpression)
99077
+ Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))
98912
99078
  );
98913
99079
  setTextRange(expression, property);
98914
99080
  if (startsOnNewLine) {
@@ -98921,7 +99087,7 @@ function transformES2015(context) {
98921
99087
  createMemberAccessForPropertyName(
98922
99088
  factory2,
98923
99089
  receiver,
98924
- visitNode(property.name, visitor, isPropertyName)
99090
+ Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
98925
99091
  ),
98926
99092
  factory2.cloneNode(property.name)
98927
99093
  );
@@ -98936,7 +99102,7 @@ function transformES2015(context) {
98936
99102
  createMemberAccessForPropertyName(
98937
99103
  factory2,
98938
99104
  receiver,
98939
- visitNode(method.name, visitor, isPropertyName)
99105
+ Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))
98940
99106
  ),
98941
99107
  transformFunctionLikeToExpression(
98942
99108
  method,
@@ -99070,7 +99236,7 @@ function transformES2015(context) {
99070
99236
  }
99071
99237
  return factory2.updateCallExpression(
99072
99238
  node,
99073
- visitNode(node.expression, callExpressionVisitor, isExpression),
99239
+ Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),
99074
99240
  /*typeArguments*/
99075
99241
  void 0,
99076
99242
  visitNodes2(node.arguments, visitor, isExpression)
@@ -99182,8 +99348,8 @@ function transformES2015(context) {
99182
99348
  let resultingCall;
99183
99349
  if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
99184
99350
  resultingCall = factory2.createFunctionApplyCall(
99185
- visitNode(target, callExpressionVisitor, isExpression),
99186
- node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
99351
+ Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
99352
+ node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
99187
99353
  transformAndSpreadElements(
99188
99354
  node.arguments,
99189
99355
  /*isArgumentList*/
@@ -99197,8 +99363,8 @@ function transformES2015(context) {
99197
99363
  } else {
99198
99364
  resultingCall = setTextRange(
99199
99365
  factory2.createFunctionCallCall(
99200
- visitNode(target, callExpressionVisitor, isExpression),
99201
- node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
99366
+ Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
99367
+ node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
99202
99368
  visitNodes2(node.arguments, visitor, isExpression)
99203
99369
  ),
99204
99370
  node
@@ -99220,7 +99386,7 @@ function transformES2015(context) {
99220
99386
  const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
99221
99387
  return factory2.createNewExpression(
99222
99388
  factory2.createFunctionApplyCall(
99223
- visitNode(target, visitor, isExpression),
99389
+ Debug.checkDefined(visitNode(target, visitor, isExpression)),
99224
99390
  thisArg,
99225
99391
  transformAndSpreadElements(
99226
99392
  factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
@@ -99277,7 +99443,9 @@ function transformES2015(context) {
99277
99443
  return map(chunk, visitExpressionOfSpread);
99278
99444
  }
99279
99445
  function visitExpressionOfSpread(node) {
99446
+ Debug.assertNode(node, isSpreadElement);
99280
99447
  let expression = visitNode(node.expression, visitor, isExpression);
99448
+ Debug.assert(expression);
99281
99449
  const isCallToReadHelper = isCallToHelper(expression, "___read");
99282
99450
  let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
99283
99451
  if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
@@ -99328,7 +99496,7 @@ function transformES2015(context) {
99328
99496
  function visitTemplateExpression(node) {
99329
99497
  let expression = factory2.createStringLiteral(node.head.text);
99330
99498
  for (const span of node.templateSpans) {
99331
- const args = [visitNode(span.expression, visitor, isExpression)];
99499
+ const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];
99332
99500
  if (span.literal.text.length > 0) {
99333
99501
  args.push(factory2.createStringLiteral(span.literal.text));
99334
99502
  }
@@ -99682,7 +99850,7 @@ function transformGenerators(context) {
99682
99850
  switch (node.kind) {
99683
99851
  case 223 /* BinaryExpression */:
99684
99852
  return visitBinaryExpression(node);
99685
- case 356 /* CommaListExpression */:
99853
+ case 357 /* CommaListExpression */:
99686
99854
  return visitCommaListExpression(node);
99687
99855
  case 224 /* ConditionalExpression */:
99688
99856
  return visitConditionalExpression(node);
@@ -99894,19 +100062,19 @@ function transformGenerators(context) {
99894
100062
  case 208 /* PropertyAccessExpression */:
99895
100063
  target = factory2.updatePropertyAccessExpression(
99896
100064
  left,
99897
- cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
100065
+ cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
99898
100066
  left.name
99899
100067
  );
99900
100068
  break;
99901
100069
  case 209 /* ElementAccessExpression */:
99902
100070
  target = factory2.updateElementAccessExpression(
99903
100071
  left,
99904
- cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
99905
- cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
100072
+ cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
100073
+ cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))
99906
100074
  );
99907
100075
  break;
99908
100076
  default:
99909
- target = visitNode(left, visitor, isExpression);
100077
+ target = Debug.checkDefined(visitNode(left, visitor, isExpression));
99910
100078
  break;
99911
100079
  }
99912
100080
  const operator = node.operatorToken.kind;
@@ -99918,7 +100086,7 @@ function transformGenerators(context) {
99918
100086
  factory2.createBinaryExpression(
99919
100087
  cacheExpression(target),
99920
100088
  getNonAssignmentOperatorForCompoundAssignment(operator),
99921
- visitNode(right, visitor, isExpression)
100089
+ Debug.checkDefined(visitNode(right, visitor, isExpression))
99922
100090
  ),
99923
100091
  node
99924
100092
  )
@@ -99926,7 +100094,7 @@ function transformGenerators(context) {
99926
100094
  node
99927
100095
  );
99928
100096
  } else {
99929
- return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
100097
+ return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));
99930
100098
  }
99931
100099
  }
99932
100100
  return visitEachChild(node, visitor, context);
@@ -99940,9 +100108,9 @@ function transformGenerators(context) {
99940
100108
  }
99941
100109
  return factory2.updateBinaryExpression(
99942
100110
  node,
99943
- cacheExpression(visitNode(node.left, visitor, isExpression)),
100111
+ cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))),
99944
100112
  node.operatorToken,
99945
- visitNode(node.right, visitor, isExpression)
100113
+ Debug.checkDefined(visitNode(node.right, visitor, isExpression))
99946
100114
  );
99947
100115
  }
99948
100116
  return visitEachChild(node, visitor, context);
@@ -99961,7 +100129,7 @@ function transformGenerators(context) {
99961
100129
  emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
99962
100130
  pendingExpressions = [];
99963
100131
  }
99964
- pendingExpressions.push(visitNode(node2, visitor, isExpression));
100132
+ pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));
99965
100133
  }
99966
100134
  }
99967
100135
  }
@@ -99975,7 +100143,7 @@ function transformGenerators(context) {
99975
100143
  emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
99976
100144
  pendingExpressions = [];
99977
100145
  }
99978
- pendingExpressions.push(visitNode(elem, visitor, isExpression));
100146
+ pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));
99979
100147
  }
99980
100148
  }
99981
100149
  return factory2.inlineExpressions(pendingExpressions);
@@ -99985,7 +100153,7 @@ function transformGenerators(context) {
99985
100153
  const resultLocal = declareLocal();
99986
100154
  emitAssignment(
99987
100155
  resultLocal,
99988
- visitNode(node.left, visitor, isExpression),
100156
+ Debug.checkDefined(visitNode(node.left, visitor, isExpression)),
99989
100157
  /*location*/
99990
100158
  node.left
99991
100159
  );
@@ -100006,7 +100174,7 @@ function transformGenerators(context) {
100006
100174
  }
100007
100175
  emitAssignment(
100008
100176
  resultLocal,
100009
- visitNode(node.right, visitor, isExpression),
100177
+ Debug.checkDefined(visitNode(node.right, visitor, isExpression)),
100010
100178
  /*location*/
100011
100179
  node.right
100012
100180
  );
@@ -100020,13 +100188,13 @@ function transformGenerators(context) {
100020
100188
  const resultLocal = declareLocal();
100021
100189
  emitBreakWhenFalse(
100022
100190
  whenFalseLabel,
100023
- visitNode(node.condition, visitor, isExpression),
100191
+ Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),
100024
100192
  /*location*/
100025
100193
  node.condition
100026
100194
  );
100027
100195
  emitAssignment(
100028
100196
  resultLocal,
100029
- visitNode(node.whenTrue, visitor, isExpression),
100197
+ Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),
100030
100198
  /*location*/
100031
100199
  node.whenTrue
100032
100200
  );
@@ -100034,7 +100202,7 @@ function transformGenerators(context) {
100034
100202
  markLabel(whenFalseLabel);
100035
100203
  emitAssignment(
100036
100204
  resultLocal,
100037
- visitNode(node.whenFalse, visitor, isExpression),
100205
+ Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),
100038
100206
  /*location*/
100039
100207
  node.whenFalse
100040
100208
  );
@@ -100114,7 +100282,7 @@ function transformGenerators(context) {
100114
100282
  leadingElement = void 0;
100115
100283
  expressions2 = [];
100116
100284
  }
100117
- expressions2.push(visitNode(element, visitor, isExpression));
100285
+ expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));
100118
100286
  return expressions2;
100119
100287
  }
100120
100288
  }
@@ -100153,8 +100321,8 @@ function transformGenerators(context) {
100153
100321
  if (containsYield(node.argumentExpression)) {
100154
100322
  return factory2.updateElementAccessExpression(
100155
100323
  node,
100156
- cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
100157
- visitNode(node.argumentExpression, visitor, isExpression)
100324
+ cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))),
100325
+ Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
100158
100326
  );
100159
100327
  }
100160
100328
  return visitEachChild(node, visitor, context);
@@ -100171,7 +100339,7 @@ function transformGenerators(context) {
100171
100339
  return setOriginalNode(
100172
100340
  setTextRange(
100173
100341
  factory2.createFunctionApplyCall(
100174
- cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
100342
+ cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),
100175
100343
  thisArg,
100176
100344
  visitElements(node.arguments)
100177
100345
  ),
@@ -100189,7 +100357,7 @@ function transformGenerators(context) {
100189
100357
  setTextRange(
100190
100358
  factory2.createNewExpression(
100191
100359
  factory2.createFunctionApplyCall(
100192
- cacheExpression(visitNode(target, visitor, isExpression)),
100360
+ cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),
100193
100361
  thisArg,
100194
100362
  visitElements(
100195
100363
  node.arguments,
@@ -100305,7 +100473,7 @@ function transformGenerators(context) {
100305
100473
  return setSourceMapRange(
100306
100474
  factory2.createAssignment(
100307
100475
  setSourceMapRange(factory2.cloneNode(node.name), node.name),
100308
- visitNode(node.initializer, visitor, isExpression)
100476
+ Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
100309
100477
  ),
100310
100478
  node
100311
100479
  );
@@ -100317,7 +100485,7 @@ function transformGenerators(context) {
100317
100485
  const elseLabel = node.elseStatement ? defineLabel() : void 0;
100318
100486
  emitBreakWhenFalse(
100319
100487
  node.elseStatement ? elseLabel : endLabel,
100320
- visitNode(node.expression, visitor, isExpression),
100488
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
100321
100489
  /*location*/
100322
100490
  node.expression
100323
100491
  );
@@ -100346,7 +100514,7 @@ function transformGenerators(context) {
100346
100514
  markLabel(loopLabel);
100347
100515
  transformAndEmitEmbeddedStatement(node.statement);
100348
100516
  markLabel(conditionLabel);
100349
- emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
100517
+ emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
100350
100518
  endLoopBlock();
100351
100519
  } else {
100352
100520
  emitStatement(visitNode(node, visitor, isStatement));
@@ -100367,7 +100535,7 @@ function transformGenerators(context) {
100367
100535
  const loopLabel = defineLabel();
100368
100536
  const endLabel = beginLoopBlock(loopLabel);
100369
100537
  markLabel(loopLabel);
100370
- emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
100538
+ emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
100371
100539
  transformAndEmitEmbeddedStatement(node.statement);
100372
100540
  emitBreak(loopLabel);
100373
100541
  endLoopBlock();
@@ -100398,7 +100566,7 @@ function transformGenerators(context) {
100398
100566
  emitStatement(
100399
100567
  setTextRange(
100400
100568
  factory2.createExpressionStatement(
100401
- visitNode(initializer, visitor, isExpression)
100569
+ Debug.checkDefined(visitNode(initializer, visitor, isExpression))
100402
100570
  ),
100403
100571
  initializer
100404
100572
  )
@@ -100407,7 +100575,7 @@ function transformGenerators(context) {
100407
100575
  }
100408
100576
  markLabel(conditionLabel);
100409
100577
  if (node.condition) {
100410
- emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
100578
+ emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));
100411
100579
  }
100412
100580
  transformAndEmitEmbeddedStatement(node.statement);
100413
100581
  markLabel(incrementLabel);
@@ -100415,7 +100583,7 @@ function transformGenerators(context) {
100415
100583
  emitStatement(
100416
100584
  setTextRange(
100417
100585
  factory2.createExpressionStatement(
100418
- visitNode(node.incrementor, visitor, isExpression)
100586
+ Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))
100419
100587
  ),
100420
100588
  node.incrementor
100421
100589
  )
@@ -100460,7 +100628,7 @@ function transformGenerators(context) {
100460
100628
  const keysIndex = factory2.createLoopVariable();
100461
100629
  const initializer = node.initializer;
100462
100630
  hoistVariableDeclaration(keysIndex);
100463
- emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
100631
+ emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
100464
100632
  emitAssignment(keysArray, factory2.createArrayLiteralExpression());
100465
100633
  emitStatement(
100466
100634
  factory2.createForInStatement(
@@ -100491,7 +100659,7 @@ function transformGenerators(context) {
100491
100659
  }
100492
100660
  variable = factory2.cloneNode(initializer.declarations[0].name);
100493
100661
  } else {
100494
- variable = visitNode(initializer, visitor, isExpression);
100662
+ variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
100495
100663
  Debug.assert(isLeftHandSideExpression(variable));
100496
100664
  }
100497
100665
  emitAssignment(variable, key);
@@ -100516,8 +100684,8 @@ function transformGenerators(context) {
100516
100684
  node = factory2.updateForInStatement(
100517
100685
  node,
100518
100686
  initializer.declarations[0].name,
100519
- visitNode(node.expression, visitor, isExpression),
100520
- visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
100687
+ Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
100688
+ Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
100521
100689
  );
100522
100690
  } else {
100523
100691
  node = visitEachChild(node, visitor, context);
@@ -100593,7 +100761,7 @@ function transformGenerators(context) {
100593
100761
  }
100594
100762
  function transformAndEmitWithStatement(node) {
100595
100763
  if (containsYield(node)) {
100596
- beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
100764
+ beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
100597
100765
  transformAndEmitEmbeddedStatement(node.statement);
100598
100766
  endWithBlock();
100599
100767
  } else {
@@ -100605,7 +100773,7 @@ function transformGenerators(context) {
100605
100773
  const caseBlock = node.caseBlock;
100606
100774
  const numClauses = caseBlock.clauses.length;
100607
100775
  const endLabel = beginSwitchBlock();
100608
- const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
100776
+ const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
100609
100777
  const clauseLabels = [];
100610
100778
  let defaultClauseIndex = -1;
100611
100779
  for (let i = 0; i < numClauses; i++) {
@@ -100627,7 +100795,7 @@ function transformGenerators(context) {
100627
100795
  }
100628
100796
  pendingClauses.push(
100629
100797
  factory2.createCaseClause(
100630
- visitNode(clause.expression, visitor, isExpression),
100798
+ Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),
100631
100799
  [
100632
100800
  createInlineBreak(
100633
100801
  clauseLabels[i],
@@ -100697,7 +100865,7 @@ function transformGenerators(context) {
100697
100865
  function transformAndEmitThrowStatement(node) {
100698
100866
  var _a2;
100699
100867
  emitThrow(
100700
- visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
100868
+ Debug.checkDefined(visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression)),
100701
100869
  /*location*/
100702
100870
  node
100703
100871
  );
@@ -101981,7 +102149,7 @@ function transformModule(context) {
101981
102149
  }
101982
102150
  function addExportEqualsIfNeeded(statements, emitAsReturn) {
101983
102151
  if (currentModuleInfo.exportEquals) {
101984
- const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
102152
+ const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);
101985
102153
  if (expressionResult) {
101986
102154
  if (emitAsReturn) {
101987
102155
  const statement = factory2.createReturnStatement(expressionResult);
@@ -102021,9 +102189,9 @@ function transformModule(context) {
102021
102189
  return visitFunctionDeclaration(node);
102022
102190
  case 260 /* ClassDeclaration */:
102023
102191
  return visitClassDeclaration(node);
102024
- case 357 /* MergeDeclarationMarker */:
102192
+ case 358 /* MergeDeclarationMarker */:
102025
102193
  return visitMergeDeclarationMarker(node);
102026
- case 358 /* EndOfDeclarationMarker */:
102194
+ case 359 /* EndOfDeclarationMarker */:
102027
102195
  return visitEndOfDeclarationMarker(node);
102028
102196
  default:
102029
102197
  return visitor(node);
@@ -102040,7 +102208,7 @@ function transformModule(context) {
102040
102208
  return visitExpressionStatement(node);
102041
102209
  case 214 /* ParenthesizedExpression */:
102042
102210
  return visitParenthesizedExpression(node, valueIsDiscarded);
102043
- case 355 /* PartiallyEmittedExpression */:
102211
+ case 356 /* PartiallyEmittedExpression */:
102044
102212
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
102045
102213
  case 210 /* CallExpression */:
102046
102214
  if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
@@ -102176,7 +102344,7 @@ function transformModule(context) {
102176
102344
  }
102177
102345
  function visitImportCallExpression(node) {
102178
102346
  const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
102179
- const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
102347
+ const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
102180
102348
  const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
102181
102349
  const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
102182
102350
  switch (compilerOptions.module) {
@@ -102705,7 +102873,7 @@ function transformModule(context) {
102705
102873
  deferredExports[id] = appendExportStatement(
102706
102874
  deferredExports[id],
102707
102875
  factory2.createIdentifier("default"),
102708
- visitNode(node.expression, visitor),
102876
+ visitNode(node.expression, visitor, isExpression),
102709
102877
  /*location*/
102710
102878
  node,
102711
102879
  /*allowComments*/
@@ -102715,7 +102883,7 @@ function transformModule(context) {
102715
102883
  statements = appendExportStatement(
102716
102884
  statements,
102717
102885
  factory2.createIdentifier("default"),
102718
- visitNode(node.expression, visitor),
102886
+ visitNode(node.expression, visitor, isExpression),
102719
102887
  /*location*/
102720
102888
  node,
102721
102889
  /*allowComments*/
@@ -102743,7 +102911,7 @@ function transformModule(context) {
102743
102911
  ),
102744
102912
  /*typeParameters*/
102745
102913
  void 0,
102746
- visitNodes2(node.parameters, visitor),
102914
+ visitNodes2(node.parameters, visitor, isParameter),
102747
102915
  /*type*/
102748
102916
  void 0,
102749
102917
  visitEachChild(node.body, visitor, context)
@@ -102784,8 +102952,8 @@ function transformModule(context) {
102784
102952
  ),
102785
102953
  /*typeParameters*/
102786
102954
  void 0,
102787
- visitNodes2(node.heritageClauses, visitor),
102788
- visitNodes2(node.members, visitor)
102955
+ visitNodes2(node.heritageClauses, visitor, isHeritageClause),
102956
+ visitNodes2(node.members, visitor, isClassElement)
102789
102957
  ),
102790
102958
  node
102791
102959
  ),
@@ -102833,7 +103001,7 @@ function transformModule(context) {
102833
103001
  variable.name,
102834
103002
  variable.exclamationToken,
102835
103003
  variable.type,
102836
- visitNode(variable.initializer, visitor)
103004
+ visitNode(variable.initializer, visitor, isExpression)
102837
103005
  );
102838
103006
  variables = append(variables, updatedVariable);
102839
103007
  expressions = append(expressions, expression);
@@ -102884,9 +103052,8 @@ function transformModule(context) {
102884
103052
  function transformInitializedVariable(node) {
102885
103053
  if (isBindingPattern(node.name)) {
102886
103054
  return flattenDestructuringAssignment(
102887
- visitNode(node, visitor),
102888
- /*visitor*/
102889
- void 0,
103055
+ visitNode(node, visitor, isInitializedVariable),
103056
+ visitor,
102890
103057
  context,
102891
103058
  0 /* All */,
102892
103059
  /*needsValue*/
@@ -102903,7 +103070,7 @@ function transformModule(context) {
102903
103070
  /*location*/
102904
103071
  node.name
102905
103072
  ),
102906
- node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
103073
+ node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()
102907
103074
  );
102908
103075
  }
102909
103076
  }
@@ -103846,7 +104013,7 @@ function transformSystemModule(context) {
103846
104013
  ),
103847
104014
  /*typeParameters*/
103848
104015
  void 0,
103849
- visitNodes2(node.parameters, visitor, isParameterDeclaration),
104016
+ visitNodes2(node.parameters, visitor, isParameter),
103850
104017
  /*type*/
103851
104018
  void 0,
103852
104019
  visitNode(node.body, visitor, isBlock)
@@ -104156,9 +104323,9 @@ function transformSystemModule(context) {
104156
104323
  return visitCatchClause(node);
104157
104324
  case 238 /* Block */:
104158
104325
  return visitBlock(node);
104159
- case 357 /* MergeDeclarationMarker */:
104326
+ case 358 /* MergeDeclarationMarker */:
104160
104327
  return visitMergeDeclarationMarker(node);
104161
- case 358 /* EndOfDeclarationMarker */:
104328
+ case 359 /* EndOfDeclarationMarker */:
104162
104329
  return visitEndOfDeclarationMarker(node);
104163
104330
  default:
104164
104331
  return visitor(node);
@@ -104220,7 +104387,7 @@ function transformSystemModule(context) {
104220
104387
  }
104221
104388
  return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
104222
104389
  } else {
104223
- return visitNode(node, discardedValueVisitor, isExpression);
104390
+ return visitNode(node, discardedValueVisitor, isForInitializer);
104224
104391
  }
104225
104392
  }
104226
104393
  function visitDoStatement(node) {
@@ -104241,21 +104408,21 @@ function transformSystemModule(context) {
104241
104408
  return factory2.updateLabeledStatement(
104242
104409
  node,
104243
104410
  node.label,
104244
- visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
104411
+ Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
104245
104412
  );
104246
104413
  }
104247
104414
  function visitWithStatement(node) {
104248
104415
  return factory2.updateWithStatement(
104249
104416
  node,
104250
104417
  visitNode(node.expression, visitor, isExpression),
104251
- visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
104418
+ Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
104252
104419
  );
104253
104420
  }
104254
104421
  function visitSwitchStatement(node) {
104255
104422
  return factory2.updateSwitchStatement(
104256
104423
  node,
104257
104424
  visitNode(node.expression, visitor, isExpression),
104258
- visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
104425
+ Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
104259
104426
  );
104260
104427
  }
104261
104428
  function visitCaseBlock(node) {
@@ -104287,7 +104454,7 @@ function transformSystemModule(context) {
104287
104454
  node = factory2.updateCatchClause(
104288
104455
  node,
104289
104456
  node.variableDeclaration,
104290
- visitNode(node.block, topLevelNestedVisitor, isBlock)
104457
+ Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
104291
104458
  );
104292
104459
  enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
104293
104460
  return node;
@@ -104314,7 +104481,7 @@ function transformSystemModule(context) {
104314
104481
  return visitExpressionStatement(node);
104315
104482
  case 214 /* ParenthesizedExpression */:
104316
104483
  return visitParenthesizedExpression(node, valueIsDiscarded);
104317
- case 355 /* PartiallyEmittedExpression */:
104484
+ case 356 /* PartiallyEmittedExpression */:
104318
104485
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
104319
104486
  case 223 /* BinaryExpression */:
104320
104487
  if (isDestructuringAssignment(node)) {
@@ -104357,7 +104524,7 @@ function transformSystemModule(context) {
104357
104524
  }
104358
104525
  function visitImportCallExpression(node) {
104359
104526
  const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
104360
- const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
104527
+ const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
104361
104528
  const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
104362
104529
  return factory2.createCallExpression(
104363
104530
  factory2.createPropertyAccessExpression(
@@ -105478,7 +105645,7 @@ function transformDeclarations(context) {
105478
105645
  sourceFile,
105479
105646
  /*bundled*/
105480
105647
  true
105481
- )) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
105648
+ )) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
105482
105649
  const newFile = factory2.updateSourceFile(
105483
105650
  sourceFile,
105484
105651
  [factory2.createModuleDeclaration(
@@ -105500,7 +105667,7 @@ function transformDeclarations(context) {
105500
105667
  return newFile;
105501
105668
  }
105502
105669
  needsDeclare = true;
105503
- const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
105670
+ const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
105504
105671
  return factory2.updateSourceFile(
105505
105672
  sourceFile,
105506
105673
  transformAndReplaceLatePaintedStatements(updated2),
@@ -105569,7 +105736,7 @@ function transformDeclarations(context) {
105569
105736
  refs.forEach(referenceVisitor);
105570
105737
  emittedImports = filter(combinedStatements, isAnyImportSyntax);
105571
105738
  } else {
105572
- const statements = visitNodes2(node.statements, visitDeclarationStatements);
105739
+ const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);
105573
105740
  combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
105574
105741
  refs.forEach(referenceVisitor);
105575
105742
  emittedImports = filter(combinedStatements, isAnyImportSyntax);
@@ -105686,9 +105853,9 @@ function transformDeclarations(context) {
105686
105853
  return name;
105687
105854
  } else {
105688
105855
  if (name.kind === 204 /* ArrayBindingPattern */) {
105689
- return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
105856
+ return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
105690
105857
  } else {
105691
- return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
105858
+ return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
105692
105859
  }
105693
105860
  }
105694
105861
  function visitBindingElement(elem) {
@@ -105758,10 +105925,10 @@ function transformDeclarations(context) {
105758
105925
  }
105759
105926
  const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
105760
105927
  if (type && !shouldUseResolverType) {
105761
- return visitNode(type, visitDeclarationSubtree);
105928
+ return visitNode(type, visitDeclarationSubtree, isTypeNode);
105762
105929
  }
105763
105930
  if (!getParseTreeNode(node)) {
105764
- return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
105931
+ return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
105765
105932
  }
105766
105933
  if (node.kind === 175 /* SetAccessor */) {
105767
105934
  return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
@@ -105875,7 +106042,7 @@ function transformDeclarations(context) {
105875
106042
  return factory2.createNodeArray(newParams || emptyArray);
105876
106043
  }
105877
106044
  function ensureTypeParams(node, params) {
105878
- return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
106045
+ return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
105879
106046
  }
105880
106047
  function isEnclosingDeclaration(node) {
105881
106048
  return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
@@ -106010,7 +106177,7 @@ function transformDeclarations(context) {
106010
106177
  needsDeclare = priorNeedsDeclare;
106011
106178
  lateStatementReplacementMap.set(getOriginalNodeId(i), result);
106012
106179
  }
106013
- return visitNodes2(statements, visitLateVisibilityMarkedStatements);
106180
+ return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
106014
106181
  function visitLateVisibilityMarkedStatements(statement) {
106015
106182
  if (isLateVisibilityPaintedStatement(statement)) {
106016
106183
  const key = getOriginalNodeId(statement);
@@ -106224,7 +106391,7 @@ function transformDeclarations(context) {
106224
106391
  input,
106225
106392
  ensureModifiers(input),
106226
106393
  updateParamsList(input, input.parameters),
106227
- visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
106394
+ visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
106228
106395
  ));
106229
106396
  }
106230
106397
  case 257 /* VariableDeclaration */: {
@@ -106257,20 +106424,24 @@ function transformDeclarations(context) {
106257
106424
  return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
106258
106425
  }
106259
106426
  case 191 /* ConditionalType */: {
106260
- const checkType = visitNode(input.checkType, visitDeclarationSubtree);
106261
- const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
106427
+ const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);
106428
+ const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);
106262
106429
  const oldEnclosingDecl = enclosingDeclaration;
106263
106430
  enclosingDeclaration = input.trueType;
106264
- const trueType = visitNode(input.trueType, visitDeclarationSubtree);
106431
+ const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);
106265
106432
  enclosingDeclaration = oldEnclosingDecl;
106266
- const falseType = visitNode(input.falseType, visitDeclarationSubtree);
106433
+ const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);
106434
+ Debug.assert(checkType);
106435
+ Debug.assert(extendsType);
106436
+ Debug.assert(trueType);
106437
+ Debug.assert(falseType);
106267
106438
  return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
106268
106439
  }
106269
106440
  case 181 /* FunctionType */: {
106270
- return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
106441
+ return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
106271
106442
  }
106272
106443
  case 182 /* ConstructorType */: {
106273
- return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
106444
+ return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
106274
106445
  }
106275
106446
  case 202 /* ImportType */: {
106276
106447
  if (!isLiteralImportTypeNode(input))
@@ -106414,7 +106585,7 @@ function transformDeclarations(context) {
106414
106585
  ensureModifiers(input),
106415
106586
  input.name,
106416
106587
  visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
106417
- visitNode(input.type, visitDeclarationSubtree, isTypeNode)
106588
+ Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
106418
106589
  ));
106419
106590
  needsDeclare = previousNeedsDeclare;
106420
106591
  return clean2;
@@ -106426,7 +106597,7 @@ function transformDeclarations(context) {
106426
106597
  input.name,
106427
106598
  ensureTypeParams(input, input.typeParameters),
106428
106599
  transformHeritageClauses(input.heritageClauses),
106429
- visitNodes2(input.members, visitDeclarationSubtree)
106600
+ visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)
106430
106601
  ));
106431
106602
  }
106432
106603
  case 259 /* FunctionDeclaration */: {
@@ -106543,7 +106714,7 @@ function transformDeclarations(context) {
106543
106714
  const oldHasScopeFix = resultHasScopeMarker;
106544
106715
  resultHasScopeMarker = false;
106545
106716
  needsScopeFixMarker = false;
106546
- const statements = visitNodes2(inner.statements, visitDeclarationStatements);
106717
+ const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);
106547
106718
  let lateStatements = transformAndReplaceLatePaintedStatements(statements);
106548
106719
  if (input.flags & 16777216 /* Ambient */) {
106549
106720
  needsScopeFixMarker = false;
@@ -106552,7 +106723,7 @@ function transformDeclarations(context) {
106552
106723
  if (needsScopeFixMarker) {
106553
106724
  lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
106554
106725
  } else {
106555
- lateStatements = visitNodes2(lateStatements, stripExportModifiers);
106726
+ lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);
106556
106727
  }
106557
106728
  }
106558
106729
  const body = factory2.updateModuleBlock(inner, lateStatements);
@@ -106648,7 +106819,7 @@ function transformDeclarations(context) {
106648
106819
  void 0
106649
106820
  )
106650
106821
  ] : void 0;
106651
- const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
106822
+ const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
106652
106823
  const members = factory2.createNodeArray(memberNodes);
106653
106824
  const extendsClause = getEffectiveBaseTypeNode(input);
106654
106825
  if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
@@ -106672,11 +106843,11 @@ function transformDeclarations(context) {
106672
106843
  if (clause.token === 94 /* ExtendsKeyword */) {
106673
106844
  const oldDiag2 = getSymbolAccessibilityDiagnostic;
106674
106845
  getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
106675
- const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
106846
+ const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
106676
106847
  getSymbolAccessibilityDiagnostic = oldDiag2;
106677
106848
  return newClause;
106678
106849
  }
106679
- return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
106850
+ return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));
106680
106851
  }));
106681
106852
  return [statement, cleanup(factory2.updateClassDeclaration(
106682
106853
  input,
@@ -106732,7 +106903,7 @@ function transformDeclarations(context) {
106732
106903
  function transformVariableStatement(input) {
106733
106904
  if (!forEach(input.declarationList.declarations, getBindingNameVisible))
106734
106905
  return;
106735
- const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
106906
+ const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);
106736
106907
  if (!length(nodes))
106737
106908
  return;
106738
106909
  return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
@@ -106823,7 +106994,7 @@ function transformDeclarations(context) {
106823
106994
  function transformHeritageClauses(nodes) {
106824
106995
  return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
106825
106996
  return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
106826
- })), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
106997
+ })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length));
106827
106998
  }
106828
106999
  }
106829
107000
  function isAlwaysType(node) {
@@ -107001,7 +107172,7 @@ function noEmitNotification(hint, node, callback) {
107001
107172
  }
107002
107173
  function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
107003
107174
  var _a2, _b;
107004
- const enabledSyntaxKindFeatures = new Array(360 /* Count */);
107175
+ const enabledSyntaxKindFeatures = new Array(361 /* Count */);
107005
107176
  let lexicalEnvironmentVariableDeclarations;
107006
107177
  let lexicalEnvironmentFunctionDeclarations;
107007
107178
  let lexicalEnvironmentStatements;
@@ -108886,6 +109057,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
108886
109057
  case 346 /* JSDocThisTag */:
108887
109058
  case 347 /* JSDocTypeTag */:
108888
109059
  case 352 /* JSDocThrowsTag */:
109060
+ case 353 /* JSDocSatisfiesTag */:
108889
109061
  return emitJSDocSimpleTypedTag(node);
108890
109062
  case 348 /* JSDocTemplateTag */:
108891
109063
  return emitJSDocTemplateTag(node);
@@ -108893,9 +109065,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
108893
109065
  return emitJSDocTypedefTag(node);
108894
109066
  case 350 /* JSDocSeeTag */:
108895
109067
  return emitJSDocSeeTag(node);
108896
- case 354 /* NotEmittedStatement */:
108897
- case 358 /* EndOfDeclarationMarker */:
108898
- case 357 /* MergeDeclarationMarker */:
109068
+ case 355 /* NotEmittedStatement */:
109069
+ case 359 /* EndOfDeclarationMarker */:
109070
+ case 358 /* MergeDeclarationMarker */:
108899
109071
  return;
108900
109072
  }
108901
109073
  if (isExpression(node)) {
@@ -108994,18 +109166,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
108994
109166
  return emitJsxSelfClosingElement(node);
108995
109167
  case 285 /* JsxFragment */:
108996
109168
  return emitJsxFragment(node);
108997
- case 353 /* SyntaxList */:
109169
+ case 354 /* SyntaxList */:
108998
109170
  return Debug.fail("SyntaxList should not be printed");
108999
- case 354 /* NotEmittedStatement */:
109171
+ case 355 /* NotEmittedStatement */:
109000
109172
  return;
109001
- case 355 /* PartiallyEmittedExpression */:
109173
+ case 356 /* PartiallyEmittedExpression */:
109002
109174
  return emitPartiallyEmittedExpression(node);
109003
- case 356 /* CommaListExpression */:
109175
+ case 357 /* CommaListExpression */:
109004
109176
  return emitCommaList(node);
109005
- case 357 /* MergeDeclarationMarker */:
109006
- case 358 /* EndOfDeclarationMarker */:
109177
+ case 358 /* MergeDeclarationMarker */:
109178
+ case 359 /* EndOfDeclarationMarker */:
109007
109179
  return;
109008
- case 359 /* SyntheticReferenceExpression */:
109180
+ case 360 /* SyntheticReferenceExpression */:
109009
109181
  return Debug.fail("SyntheticReferenceExpression should not be printed");
109010
109182
  }
109011
109183
  }
@@ -112253,7 +112425,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112253
112425
  emitLeadingComments(
112254
112426
  pos,
112255
112427
  /*isEmittedNode*/
112256
- node.kind !== 354 /* NotEmittedStatement */
112428
+ node.kind !== 355 /* NotEmittedStatement */
112257
112429
  );
112258
112430
  }
112259
112431
  if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
@@ -112277,7 +112449,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112277
112449
  containerPos = savedContainerPos;
112278
112450
  containerEnd = savedContainerEnd;
112279
112451
  declarationListContainerEnd = savedDeclarationListContainerEnd;
112280
- if (!skipTrailingComments && node.kind !== 354 /* NotEmittedStatement */) {
112452
+ if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) {
112281
112453
  emitTrailingComments(end);
112282
112454
  }
112283
112455
  }
@@ -112549,7 +112721,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112549
112721
  }
112550
112722
  } else {
112551
112723
  const source = sourceMapRange.source || sourceMapSource;
112552
- if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
112724
+ if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
112553
112725
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
112554
112726
  }
112555
112727
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
@@ -112564,7 +112736,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112564
112736
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
112565
112737
  sourceMapsDisabled = false;
112566
112738
  }
112567
- if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
112739
+ if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
112568
112740
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
112569
112741
  }
112570
112742
  }
@@ -116305,7 +116477,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
116305
116477
  createOptionValueDiagnostic("importsNotUsedAsValues", Diagnostics.Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later);
116306
116478
  }
116307
116479
  if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly)) {
116308
- createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_moduleResolution_is_set_to_bundler_and_either_noEmit_or_emitDeclarationOnly_is_set);
116480
+ createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);
116309
116481
  }
116310
116482
  const moduleResolution = getEmitModuleResolutionKind(options);
116311
116483
  if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
@@ -119566,6 +119738,9 @@ function getFilesInErrorForSummary(diagnostics) {
119566
119738
  }
119567
119739
  );
119568
119740
  return filesInError.map((fileName) => {
119741
+ if (fileName === void 0) {
119742
+ return void 0;
119743
+ }
119569
119744
  const diagnosticForFileName = find(
119570
119745
  diagnostics,
119571
119746
  (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
@@ -120239,6 +120414,8 @@ function createWatchProgram(host) {
120239
120414
  parseConfigFile2();
120240
120415
  newLine = updateNewLine();
120241
120416
  }
120417
+ Debug.assert(compilerOptions);
120418
+ Debug.assert(rootFileNames);
120242
120419
  const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
120243
120420
  const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
120244
120421
  writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
@@ -120341,6 +120518,8 @@ function createWatchProgram(host) {
120341
120518
  }
120342
120519
  function synchronizeProgram() {
120343
120520
  writeLog(`Synchronizing program`);
120521
+ Debug.assert(compilerOptions);
120522
+ Debug.assert(rootFileNames);
120344
120523
  clearInvalidateResolutionsOfFailedLookupLocations();
120345
120524
  const program = getCurrentBuilderProgram();
120346
120525
  if (hasChangedCompilerOptions) {
@@ -120580,6 +120759,8 @@ function createWatchProgram(host) {
120580
120759
  }
120581
120760
  function reloadFileNamesFromConfigFile() {
120582
120761
  writeLog("Reloading new file names and options");
120762
+ Debug.assert(compilerOptions);
120763
+ Debug.assert(configFileName);
120583
120764
  reloadLevel = 0 /* None */;
120584
120765
  rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
120585
120766
  if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
@@ -120588,6 +120769,7 @@ function createWatchProgram(host) {
120588
120769
  synchronizeProgram();
120589
120770
  }
120590
120771
  function reloadConfigFile() {
120772
+ Debug.assert(configFileName);
120591
120773
  writeLog(`Reloading config file: ${configFileName}`);
120592
120774
  reloadLevel = 0 /* None */;
120593
120775
  if (cachedDirectoryStructureHost) {
@@ -120600,6 +120782,7 @@ function createWatchProgram(host) {
120600
120782
  updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
120601
120783
  }
120602
120784
  function parseConfigFile2() {
120785
+ Debug.assert(configFileName);
120603
120786
  setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
120604
120787
  configFileName,
120605
120788
  optionsToExtendForConfigFile,
@@ -120627,6 +120810,7 @@ function createWatchProgram(host) {
120627
120810
  return config.parsedCommandLine;
120628
120811
  if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
120629
120812
  writeLog("Reloading new file names and options");
120813
+ Debug.assert(compilerOptions);
120630
120814
  const fileNames = getFileNamesFromConfigSpecs(
120631
120815
  config.parsedCommandLine.options.configFile.configFileSpecs,
120632
120816
  getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
@@ -120718,7 +120902,8 @@ function createWatchProgram(host) {
120718
120902
  return watchDirectory(
120719
120903
  directory,
120720
120904
  (fileOrDirectory) => {
120721
- Debug.assert(!!configFileName);
120905
+ Debug.assert(configFileName);
120906
+ Debug.assert(compilerOptions);
120722
120907
  const fileOrDirectoryPath = toPath3(fileOrDirectory);
120723
120908
  if (cachedDirectoryStructureHost) {
120724
120909
  cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
@@ -120749,6 +120934,7 @@ function createWatchProgram(host) {
120749
120934
  );
120750
120935
  }
120751
120936
  function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
120937
+ Debug.assert(configFileName);
120752
120938
  updateSharedExtendedConfigFileWatcher(
120753
120939
  forProjectPath,
120754
120940
  options,
@@ -124250,6 +124436,8 @@ __export(ts_exports3, {
124250
124436
  getJSDocReturnTag: () => getJSDocReturnTag,
124251
124437
  getJSDocReturnType: () => getJSDocReturnType,
124252
124438
  getJSDocRoot: () => getJSDocRoot,
124439
+ getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
124440
+ getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
124253
124441
  getJSDocTags: () => getJSDocTags,
124254
124442
  getJSDocTagsNoCache: () => getJSDocTagsNoCache,
124255
124443
  getJSDocTemplateTag: () => getJSDocTemplateTag,
@@ -124589,6 +124777,7 @@ __export(ts_exports3, {
124589
124777
  isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
124590
124778
  isArray: () => isArray,
124591
124779
  isArrayBindingElement: () => isArrayBindingElement,
124780
+ isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
124592
124781
  isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
124593
124782
  isArrayBindingPattern: () => isArrayBindingPattern,
124594
124783
  isArrayLiteralExpression: () => isArrayLiteralExpression,
@@ -124621,6 +124810,7 @@ __export(ts_exports3, {
124621
124810
  isBindableStaticNameExpression: () => isBindableStaticNameExpression,
124622
124811
  isBindingElement: () => isBindingElement,
124623
124812
  isBindingName: () => isBindingName,
124813
+ isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
124624
124814
  isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
124625
124815
  isBindingPattern: () => isBindingPattern,
124626
124816
  isBlock: () => isBlock,
@@ -124827,6 +125017,7 @@ __export(ts_exports3, {
124827
125017
  isInferTypeNode: () => isInferTypeNode,
124828
125018
  isInfinityOrNaNString: () => isInfinityOrNaNString,
124829
125019
  isInitializedProperty: () => isInitializedProperty,
125020
+ isInitializedVariable: () => isInitializedVariable,
124830
125021
  isInsideJsxElement: () => isInsideJsxElement,
124831
125022
  isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
124832
125023
  isInsideNodeModules: () => isInsideNodeModules,
@@ -124876,6 +125067,8 @@ __export(ts_exports3, {
124876
125067
  isJSDocPublicTag: () => isJSDocPublicTag,
124877
125068
  isJSDocReadonlyTag: () => isJSDocReadonlyTag,
124878
125069
  isJSDocReturnTag: () => isJSDocReturnTag,
125070
+ isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
125071
+ isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
124879
125072
  isJSDocSeeTag: () => isJSDocSeeTag,
124880
125073
  isJSDocSignature: () => isJSDocSignature,
124881
125074
  isJSDocTag: () => isJSDocTag,
@@ -124931,11 +125124,14 @@ __export(ts_exports3, {
124931
125124
  isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
124932
125125
  isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
124933
125126
  isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
125127
+ isLiteralTypeLiteral: () => isLiteralTypeLiteral,
124934
125128
  isLiteralTypeNode: () => isLiteralTypeNode,
124935
125129
  isLocalName: () => isLocalName,
124936
125130
  isLogicalOperator: () => isLogicalOperator,
124937
125131
  isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
124938
125132
  isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
125133
+ isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
125134
+ isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
124939
125135
  isMappedTypeNode: () => isMappedTypeNode,
124940
125136
  isMemberName: () => isMemberName,
124941
125137
  isMergeDeclarationMarker: () => isMergeDeclarationMarker,
@@ -125621,6 +125817,7 @@ __export(ts_exports3, {
125621
125817
  tryGetDirectories: () => tryGetDirectories,
125622
125818
  tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
125623
125819
  tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
125820
+ tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
125624
125821
  tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
125625
125822
  tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
125626
125823
  tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
@@ -128746,7 +128943,7 @@ function isNonGlobalDeclaration(declaration) {
128746
128943
  if (!sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) {
128747
128944
  return false;
128748
128945
  }
128749
- return isInJSFile(declaration) || !findAncestor(declaration, isGlobalScopeAugmentation);
128946
+ return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d));
128750
128947
  }
128751
128948
  function isDeprecatedDeclaration(decl) {
128752
128949
  return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */);
@@ -132971,7 +133168,7 @@ var NodeObject = class {
132971
133168
  if (!children.length) {
132972
133169
  return void 0;
132973
133170
  }
132974
- const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 352 /* LastJSDocNode */);
133171
+ const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */);
132975
133172
  return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
132976
133173
  }
132977
133174
  getLastToken(sourceFile) {
@@ -133038,7 +133235,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) {
133038
133235
  }
133039
133236
  }
133040
133237
  function createSyntaxList(nodes, parent2) {
133041
- const list = createNode(353 /* SyntaxList */, nodes.pos, nodes.end, parent2);
133238
+ const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2);
133042
133239
  list._children = [];
133043
133240
  let pos = nodes.pos;
133044
133241
  for (const node of nodes) {
@@ -137945,7 +138142,7 @@ function doChange(changes, sourceFile, decl) {
137945
138142
  if (!param.type) {
137946
138143
  const paramType = getJSDocType(param);
137947
138144
  if (paramType)
137948
- changes.tryInsertTypeAnnotation(sourceFile, param, transformJSDocType(paramType));
138145
+ changes.tryInsertTypeAnnotation(sourceFile, param, visitNode(paramType, transformJSDocType, isTypeNode));
137949
138146
  }
137950
138147
  }
137951
138148
  if (needParens)
@@ -137953,12 +138150,12 @@ function doChange(changes, sourceFile, decl) {
137953
138150
  if (!decl.type) {
137954
138151
  const returnType = getJSDocReturnType(decl);
137955
138152
  if (returnType)
137956
- changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(returnType));
138153
+ changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(returnType, transformJSDocType, isTypeNode));
137957
138154
  }
137958
138155
  } else {
137959
138156
  const jsdocType = Debug.checkDefined(getJSDocType(decl), "A JSDocType for this declaration should exist");
137960
138157
  Debug.assert(!decl.type, "The JSDocType decl should have a type");
137961
- changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType));
138158
+ changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(jsdocType, transformJSDocType, isTypeNode));
137962
138159
  }
137963
138160
  }
137964
138161
  function isDeclarationWithType(node) {
@@ -137995,19 +138192,19 @@ function transformJSDocTypeLiteral(node) {
137995
138192
  void 0,
137996
138193
  isIdentifier(tag.name) ? tag.name : tag.name.right,
137997
138194
  isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0,
137998
- tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
138195
+ tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
137999
138196
  )));
138000
138197
  setEmitFlags(typeNode, 1 /* SingleLine */);
138001
138198
  return typeNode;
138002
138199
  }
138003
138200
  function transformJSDocOptionalType(node) {
138004
- return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("undefined", emptyArray)]);
138201
+ return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("undefined", emptyArray)]);
138005
138202
  }
138006
138203
  function transformJSDocNullableType(node) {
138007
- return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("null", emptyArray)]);
138204
+ return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("null", emptyArray)]);
138008
138205
  }
138009
138206
  function transformJSDocVariadicType(node) {
138010
- return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType));
138207
+ return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType, isTypeNode));
138011
138208
  }
138012
138209
  function transformJSDocFunctionType(node) {
138013
138210
  var _a2;
@@ -138018,7 +138215,7 @@ function transformJSDocParameter(node) {
138018
138215
  const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1;
138019
138216
  const name = node.name || (isRest ? "rest" : "arg" + index);
138020
138217
  const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken;
138021
- return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType), node.initializer);
138218
+ return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer);
138022
138219
  }
138023
138220
  function transformJSDocTypeReference(node) {
138024
138221
  let name = node.typeName;
@@ -138045,7 +138242,7 @@ function transformJSDocTypeReference(node) {
138045
138242
  if ((text === "Array" || text === "Promise") && !node.typeArguments) {
138046
138243
  args = factory.createNodeArray([factory.createTypeReferenceNode("any", emptyArray)]);
138047
138244
  } else {
138048
- args = visitNodes2(node.typeArguments, transformJSDocType);
138245
+ args = visitNodes2(node.typeArguments, transformJSDocType, isTypeNode);
138049
138246
  }
138050
138247
  }
138051
138248
  return factory.createTypeReferenceNode(name, args);
@@ -140603,13 +140800,19 @@ function getUmdSymbol(token, checker) {
140603
140800
  if (isUMDExportSymbol(umdSymbol))
140604
140801
  return umdSymbol;
140605
140802
  const { parent: parent2 } = token;
140606
- return isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2) ? tryCast(checker.resolveName(
140607
- checker.getJsxNamespace(parent2),
140608
- isJsxOpeningLikeElement(parent2) ? token : parent2,
140609
- 111551 /* Value */,
140610
- /*excludeGlobals*/
140611
- false
140612
- ), isUMDExportSymbol) : void 0;
140803
+ if (isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2)) {
140804
+ const parentSymbol = checker.resolveName(
140805
+ checker.getJsxNamespace(parent2),
140806
+ isJsxOpeningLikeElement(parent2) ? token : parent2,
140807
+ 111551 /* Value */,
140808
+ /*excludeGlobals*/
140809
+ false
140810
+ );
140811
+ if (isUMDExportSymbol(parentSymbol)) {
140812
+ return parentSymbol;
140813
+ }
140814
+ }
140815
+ return void 0;
140613
140816
  }
140614
140817
  function getImportKind(importingFile, exportKind, compilerOptions, forceImportKeyword) {
140615
140818
  switch (exportKind) {
@@ -145721,18 +145924,17 @@ function findJsonProperty(obj, name) {
145721
145924
  }
145722
145925
  function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {
145723
145926
  let symbols;
145724
- const typeNode = visitNode(importTypeNode, visit);
145927
+ const typeNode = visitNode(importTypeNode, visit, isTypeNode);
145725
145928
  if (symbols && typeNode) {
145726
145929
  return { typeNode, symbols };
145727
145930
  }
145728
145931
  function visit(node) {
145729
- var _a2;
145730
145932
  if (isLiteralImportTypeNode(node) && node.qualifier) {
145731
145933
  const firstIdentifier = getFirstIdentifier(node.qualifier);
145732
145934
  const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
145733
145935
  const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
145734
145936
  symbols = append(symbols, firstIdentifier.symbol);
145735
- const typeArguments = (_a2 = node.typeArguments) == null ? void 0 : _a2.map(visit);
145937
+ const typeArguments = visitNodes2(node.typeArguments, visit, isTypeNode);
145736
145938
  return factory.createTypeReferenceNode(qualifier, typeArguments);
145737
145939
  }
145738
145940
  return visitEachChild(node, visit, nullTransformationContext);
@@ -147175,6 +147377,7 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
147175
147377
  void 0,
147176
147378
  contextToken,
147177
147379
  location,
147380
+ position,
147178
147381
  sourceFile,
147179
147382
  host,
147180
147383
  program,
@@ -147288,10 +147491,10 @@ function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options,
147288
147491
  } else if (!tracker.hasValue(type.value)) {
147289
147492
  switch (typeof type.value) {
147290
147493
  case "object":
147291
- elements.push(factory.createBigIntLiteral(type.value));
147494
+ elements.push(type.value.negative ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createBigIntLiteral({ negative: false, base10Value: type.value.base10Value })) : factory.createBigIntLiteral(type.value));
147292
147495
  break;
147293
147496
  case "number":
147294
- elements.push(factory.createNumericLiteral(type.value));
147497
+ elements.push(type.value < 0 ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createNumericLiteral(-type.value)) : factory.createNumericLiteral(type.value));
147295
147498
  break;
147296
147499
  case "string":
147297
147500
  elements.push(factory.createStringLiteral(type.value, quotePreference === 0 /* Single */));
@@ -147500,7 +147703,7 @@ function completionNameForLiteral(sourceFile, preferences, literal) {
147500
147703
  function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
147501
147704
  return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
147502
147705
  }
147503
- function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
147706
+ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
147504
147707
  let insertText;
147505
147708
  let replacementSpan = getReplacementSpanForContextToken(replacementToken);
147506
147709
  let data;
@@ -147558,7 +147761,7 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken,
147558
147761
  }
147559
147762
  if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
147560
147763
  let importAdder;
147561
- ({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext));
147764
+ ({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
147562
147765
  sortText = SortText.ClassMemberSnippets;
147563
147766
  if (importAdder == null ? void 0 : importAdder.hasFixes()) {
147564
147767
  hasAction = true;
@@ -147622,7 +147825,7 @@ function isClassLikeMemberCompletion(symbol, location, sourceFile) {
147622
147825
  const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;
147623
147826
  return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));
147624
147827
  }
147625
- function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) {
147828
+ function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {
147626
147829
  const classLikeDeclaration = findAncestor(location, isClassLike);
147627
147830
  if (!classLikeDeclaration) {
147628
147831
  return { insertText: name };
@@ -147658,7 +147861,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
147658
147861
  );
147659
147862
  }
147660
147863
  let modifiers = 0 /* None */;
147661
- const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken);
147864
+ const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position);
147662
147865
  const isAbstract = !!(presentModifiers & 256 /* Abstract */);
147663
147866
  const completionNodes = [];
147664
147867
  ts_codefix_exports.addNewNodeForMemberSymbol(
@@ -147713,8 +147916,8 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
147713
147916
  }
147714
147917
  return { insertText, isSnippet, importAdder, replacementSpan };
147715
147918
  }
147716
- function getPresentModifiers(contextToken) {
147717
- if (!contextToken) {
147919
+ function getPresentModifiers(contextToken, sourceFile, position) {
147920
+ if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
147718
147921
  return { modifiers: 0 /* None */ };
147719
147922
  }
147720
147923
  let modifiers = 0 /* None */;
@@ -148080,7 +148283,7 @@ function getSourceFromOrigin(origin) {
148080
148283
  return "TypeOnlyAlias/" /* TypeOnlyAlias */;
148081
148284
  }
148082
148285
  }
148083
- function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
148286
+ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
148084
148287
  var _a2;
148085
148288
  const start2 = timestamp();
148086
148289
  const variableDeclaration = getVariableDeclaration(location);
@@ -148103,6 +148306,7 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
148103
148306
  replacementToken,
148104
148307
  contextToken,
148105
148308
  location,
148309
+ position,
148106
148310
  sourceFile,
148107
148311
  host,
148108
148312
  program,
@@ -148346,6 +148550,7 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo
148346
148550
  name,
148347
148551
  symbol,
148348
148552
  location,
148553
+ position,
148349
148554
  contextToken,
148350
148555
  formatContext
148351
148556
  );
@@ -148726,6 +148931,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
148726
148931
  case 347 /* JSDocTypeTag */:
148727
148932
  case 349 /* JSDocTypedefTag */:
148728
148933
  case 352 /* JSDocThrowsTag */:
148934
+ case 353 /* JSDocSatisfiesTag */:
148729
148935
  return true;
148730
148936
  case 348 /* JSDocTemplateTag */:
148731
148937
  return !!tag.constraint;
@@ -149986,7 +150192,7 @@ function getPropertiesForCompletion(type, checker) {
149986
150192
  function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
149987
150193
  var _a2;
149988
150194
  switch (location.kind) {
149989
- case 353 /* SyntaxList */:
150195
+ case 354 /* SyntaxList */:
149990
150196
  return tryCast(location.parent, isObjectTypeDeclaration);
149991
150197
  case 1 /* EndOfFileToken */:
149992
150198
  const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
@@ -150332,10 +150538,10 @@ function getStringLiteralCompletions(sourceFile, position, contextToken, options
150332
150538
  if (!contextToken || !isStringLiteralLike(contextToken))
150333
150539
  return void 0;
150334
150540
  const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
150335
- return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences);
150541
+ return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
150336
150542
  }
150337
150543
  }
150338
- function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences) {
150544
+ function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
150339
150545
  if (completion === void 0) {
150340
150546
  return void 0;
150341
150547
  }
@@ -150351,6 +150557,7 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h
150351
150557
  contextToken,
150352
150558
  contextToken,
150353
150559
  sourceFile,
150560
+ position,
150354
150561
  sourceFile,
150355
150562
  host,
150356
150563
  program,
@@ -150991,7 +151198,7 @@ function removeLeadingDirectorySeparator(path) {
150991
151198
  }
150992
151199
  function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
150993
151200
  const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
150994
- const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment));
151201
+ const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0);
150995
151202
  if (fragmentDirectory !== void 0) {
150996
151203
  const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
150997
151204
  return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
@@ -154404,6 +154611,7 @@ var jsDocTagNames = [
154404
154611
  "readonly",
154405
154612
  "requires",
154406
154613
  "returns",
154614
+ "satisfies",
154407
154615
  "see",
154408
154616
  "since",
154409
154617
  "static",
@@ -154513,6 +154721,7 @@ function getCommentDisplayParts(tag, checker) {
154513
154721
  }
154514
154722
  return displayParts;
154515
154723
  case 347 /* JSDocTypeTag */:
154724
+ case 353 /* JSDocSatisfiesTag */:
154516
154725
  return withNode(tag.typeExpression);
154517
154726
  case 349 /* JSDocTypedefTag */:
154518
154727
  case 341 /* JSDocCallbackTag */:
@@ -159950,7 +160159,7 @@ function transformFunctionBody(body, exposedVariableDeclarations, writes, substi
159950
160159
  let ignoreReturns = false;
159951
160160
  const statements = factory.createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]);
159952
160161
  if (hasWritesOrVariableDeclarations || substitutions.size) {
159953
- const rewrittenStatements = visitNodes2(statements, visitor).slice();
160162
+ const rewrittenStatements = visitNodes2(statements, visitor, isStatement).slice();
159954
160163
  if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) {
159955
160164
  const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);
159956
160165
  if (assignments.length === 1) {
@@ -159978,7 +160187,7 @@ function transformFunctionBody(body, exposedVariableDeclarations, writes, substi
159978
160187
  if (!returnValueProperty) {
159979
160188
  returnValueProperty = "__return";
159980
160189
  }
159981
- assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor)));
160190
+ assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor, isExpression)));
159982
160191
  }
159983
160192
  if (assignments.length === 1) {
159984
160193
  return factory.createReturnStatement(assignments[0].name);
@@ -162996,6 +163205,7 @@ function assignPositionsToNodeArray(nodes, visitor, test, start2, count) {
162996
163205
  if (!visited) {
162997
163206
  return visited;
162998
163207
  }
163208
+ Debug.assert(nodes);
162999
163209
  const nodeArray = visited === nodes ? factory.createNodeArray(visited.slice(0)) : visited;
163000
163210
  setTextRangePosEnd(nodeArray, getPos2(nodes), getEnd(nodes));
163001
163211
  return nodeArray;
@@ -174663,6 +174873,7 @@ var Session3 = class {
174663
174873
  constructor(opts) {
174664
174874
  this.changeSeq = 0;
174665
174875
  this.handlers = new Map(Object.entries({
174876
+ // TODO(jakebailey): correctly type the handlers
174666
174877
  [CommandNames.Status]: () => {
174667
174878
  const response = { version };
174668
174879
  return this.requiredResponse(response);
@@ -179887,6 +180098,8 @@ start(initializeNodeSystem(), require("os").platform());
179887
180098
  getJSDocReturnTag,
179888
180099
  getJSDocReturnType,
179889
180100
  getJSDocRoot,
180101
+ getJSDocSatisfiesExpressionType,
180102
+ getJSDocSatisfiesTag,
179890
180103
  getJSDocTags,
179891
180104
  getJSDocTagsNoCache,
179892
180105
  getJSDocTemplateTag,
@@ -180226,6 +180439,7 @@ start(initializeNodeSystem(), require("os").platform());
180226
180439
  isArgumentExpressionOfElementAccess,
180227
180440
  isArray,
180228
180441
  isArrayBindingElement,
180442
+ isArrayBindingOrAssignmentElement,
180229
180443
  isArrayBindingOrAssignmentPattern,
180230
180444
  isArrayBindingPattern,
180231
180445
  isArrayLiteralExpression,
@@ -180258,6 +180472,7 @@ start(initializeNodeSystem(), require("os").platform());
180258
180472
  isBindableStaticNameExpression,
180259
180473
  isBindingElement,
180260
180474
  isBindingName,
180475
+ isBindingOrAssignmentElement,
180261
180476
  isBindingOrAssignmentPattern,
180262
180477
  isBindingPattern,
180263
180478
  isBlock,
@@ -180464,6 +180679,7 @@ start(initializeNodeSystem(), require("os").platform());
180464
180679
  isInferTypeNode,
180465
180680
  isInfinityOrNaNString,
180466
180681
  isInitializedProperty,
180682
+ isInitializedVariable,
180467
180683
  isInsideJsxElement,
180468
180684
  isInsideJsxElementOrAttribute,
180469
180685
  isInsideNodeModules,
@@ -180513,6 +180729,8 @@ start(initializeNodeSystem(), require("os").platform());
180513
180729
  isJSDocPublicTag,
180514
180730
  isJSDocReadonlyTag,
180515
180731
  isJSDocReturnTag,
180732
+ isJSDocSatisfiesExpression,
180733
+ isJSDocSatisfiesTag,
180516
180734
  isJSDocSeeTag,
180517
180735
  isJSDocSignature,
180518
180736
  isJSDocTag,
@@ -180568,11 +180786,14 @@ start(initializeNodeSystem(), require("os").platform());
180568
180786
  isLiteralLikeElementAccess,
180569
180787
  isLiteralNameOfPropertyDeclarationOrIndexAccess,
180570
180788
  isLiteralTypeLikeExpression,
180789
+ isLiteralTypeLiteral,
180571
180790
  isLiteralTypeNode,
180572
180791
  isLocalName,
180573
180792
  isLogicalOperator,
180574
180793
  isLogicalOrCoalescingAssignmentExpression,
180575
180794
  isLogicalOrCoalescingAssignmentOperator,
180795
+ isLogicalOrCoalescingBinaryExpression,
180796
+ isLogicalOrCoalescingBinaryOperator,
180576
180797
  isMappedTypeNode,
180577
180798
  isMemberName,
180578
180799
  isMergeDeclarationMarker,
@@ -181258,6 +181479,7 @@ start(initializeNodeSystem(), require("os").platform());
181258
181479
  tryGetDirectories,
181259
181480
  tryGetExtensionFromPath,
181260
181481
  tryGetImportFromModuleSpecifier,
181482
+ tryGetJSDocSatisfiesTypeNode,
181261
181483
  tryGetModuleNameFromFile,
181262
181484
  tryGetModuleSpecifierFromDeclaration,
181263
181485
  tryGetNativePerformanceHooks,