@typescript-deploys/pr-build 5.0.0-pr-49929-73 → 5.0.0-pr-52280-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -23,7 +23,7 @@ var __export = (target, all) => {
23
23
 
24
24
  // src/compiler/corePublic.ts
25
25
  var versionMajorMinor = "5.0";
26
- var version = `${versionMajorMinor}.0-insiders.20230116`;
26
+ var version = `${versionMajorMinor}.0-insiders.20230117`;
27
27
 
28
28
  // src/compiler/core.ts
29
29
  var emptyArray = [];
@@ -3445,14 +3445,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
3445
3445
  SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 350] = "JSDocSeeTag";
3446
3446
  SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 351] = "JSDocPropertyTag";
3447
3447
  SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 352] = "JSDocThrowsTag";
3448
- SyntaxKind4[SyntaxKind4["SyntaxList"] = 353] = "SyntaxList";
3449
- SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 354] = "NotEmittedStatement";
3450
- SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 355] = "PartiallyEmittedExpression";
3451
- SyntaxKind4[SyntaxKind4["CommaListExpression"] = 356] = "CommaListExpression";
3452
- SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 357] = "MergeDeclarationMarker";
3453
- SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 358] = "EndOfDeclarationMarker";
3454
- SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 359] = "SyntheticReferenceExpression";
3455
- SyntaxKind4[SyntaxKind4["Count"] = 360] = "Count";
3448
+ SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag";
3449
+ SyntaxKind4[SyntaxKind4["SyntaxList"] = 354] = "SyntaxList";
3450
+ SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 355] = "NotEmittedStatement";
3451
+ SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression";
3452
+ SyntaxKind4[SyntaxKind4["CommaListExpression"] = 357] = "CommaListExpression";
3453
+ SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker";
3454
+ SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker";
3455
+ SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression";
3456
+ SyntaxKind4[SyntaxKind4["Count"] = 361] = "Count";
3456
3457
  SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
3457
3458
  SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
3458
3459
  SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -3481,9 +3482,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
3481
3482
  SyntaxKind4[SyntaxKind4["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
3482
3483
  SyntaxKind4[SyntaxKind4["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
3483
3484
  SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
3484
- SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 352 /* JSDocThrowsTag */] = "LastJSDocNode";
3485
+ SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode";
3485
3486
  SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
3486
- SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 352 /* JSDocThrowsTag */] = "LastJSDocTagNode";
3487
+ SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
3487
3488
  SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
3488
3489
  SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
3489
3490
  return SyntaxKind4;
@@ -5911,7 +5912,6 @@ var Diagnostics = {
5911
5912
  An_export_declaration_cannot_have_modifiers: diag(1193, 1 /* Error */, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."),
5912
5913
  Export_declarations_are_not_permitted_in_a_namespace: diag(1194, 1 /* Error */, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."),
5913
5914
  export_Asterisk_does_not_re_export_a_default: diag(1195, 1 /* Error */, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."),
5914
- Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, 1 /* Error */, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."),
5915
5915
  Catch_clause_variable_cannot_have_an_initializer: diag(1197, 1 /* Error */, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."),
5916
5916
  An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, 1 /* Error */, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),
5917
5917
  Unterminated_Unicode_escape_sequence: diag(1199, 1 /* Error */, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."),
@@ -7779,7 +7779,8 @@ var Diagnostics = {
7779
7779
  _0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
7780
7780
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
7781
7781
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
7782
- 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.")
7782
+ 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."),
7783
+ 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.")
7783
7784
  };
7784
7785
 
7785
7786
  // src/compiler/scanner.ts
@@ -8369,7 +8370,10 @@ function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
8369
8370
  initial
8370
8371
  );
8371
8372
  }
8372
- function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
8373
+ function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
8374
+ if (!comments) {
8375
+ comments = [];
8376
+ }
8373
8377
  comments.push({ kind, pos, end, hasTrailingNewLine });
8374
8378
  return comments;
8375
8379
  }
@@ -10070,10 +10074,7 @@ function getOriginalNode(node, nodeTest) {
10070
10074
  node = node.original;
10071
10075
  }
10072
10076
  }
10073
- if (!node || !nodeTest) {
10074
- return node;
10075
- }
10076
- return nodeTest(node) ? node : void 0;
10077
+ return !nodeTest || nodeTest(node) ? node : void 0;
10077
10078
  }
10078
10079
  function findAncestor(node, callback) {
10079
10080
  while (node) {
@@ -10376,6 +10377,9 @@ function getJSDocThisTag(node) {
10376
10377
  function getJSDocReturnTag(node) {
10377
10378
  return getFirstJSDocTag(node, isJSDocReturnTag);
10378
10379
  }
10380
+ function getJSDocSatisfiesTag(node) {
10381
+ return getFirstJSDocTag(node, isJSDocSatisfiesTag);
10382
+ }
10379
10383
  function getJSDocTypeTag(node) {
10380
10384
  const tag = getFirstJSDocTag(node, isJSDocTypeTag);
10381
10385
  if (tag && tag.typeExpression && tag.typeExpression.type) {
@@ -10544,6 +10548,9 @@ function isNodeKind(kind) {
10544
10548
  function isTokenKind(kind) {
10545
10549
  return kind >= 0 /* FirstToken */ && kind <= 162 /* LastToken */;
10546
10550
  }
10551
+ function isToken(n) {
10552
+ return isTokenKind(n.kind);
10553
+ }
10547
10554
  function isNodeArray(array) {
10548
10555
  return hasProperty(array, "pos") && hasProperty(array, "end");
10549
10556
  }
@@ -10757,9 +10764,6 @@ function isDeclarationBindingElement(bindingElement) {
10757
10764
  }
10758
10765
  return false;
10759
10766
  }
10760
- function isBindingOrAssignmentElement(node) {
10761
- return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
10762
- }
10763
10767
  function isBindingOrAssignmentPattern(node) {
10764
10768
  return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
10765
10769
  }
@@ -10789,24 +10793,6 @@ function isArrayBindingOrAssignmentPattern(node) {
10789
10793
  }
10790
10794
  return false;
10791
10795
  }
10792
- function isArrayBindingOrAssignmentElement(node) {
10793
- switch (node.kind) {
10794
- case 205 /* BindingElement */:
10795
- case 229 /* OmittedExpression */:
10796
- case 227 /* SpreadElement */:
10797
- case 206 /* ArrayLiteralExpression */:
10798
- case 207 /* ObjectLiteralExpression */:
10799
- case 79 /* Identifier */:
10800
- case 208 /* PropertyAccessExpression */:
10801
- case 209 /* ElementAccessExpression */:
10802
- return true;
10803
- }
10804
- return isAssignmentExpression(
10805
- node,
10806
- /*excludeCompoundAssignment*/
10807
- true
10808
- );
10809
- }
10810
10796
  function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
10811
10797
  const kind = node.kind;
10812
10798
  return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
@@ -10888,18 +10874,6 @@ function isUnaryExpressionKind(kind) {
10888
10874
  return isLeftHandSideExpressionKind(kind);
10889
10875
  }
10890
10876
  }
10891
- function isLiteralTypeLiteral(node) {
10892
- node = skipPartiallyEmittedExpressions(node);
10893
- switch (skipPartiallyEmittedExpressions(node).kind) {
10894
- case 104 /* NullKeyword */:
10895
- case 110 /* TrueKeyword */:
10896
- case 95 /* FalseKeyword */:
10897
- case 221 /* PrefixUnaryExpression */:
10898
- return true;
10899
- default:
10900
- return isLiteralExpression(node);
10901
- }
10902
- }
10903
10877
  function isExpression(node) {
10904
10878
  return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
10905
10879
  }
@@ -10912,8 +10886,8 @@ function isExpressionKind(kind) {
10912
10886
  case 227 /* SpreadElement */:
10913
10887
  case 231 /* AsExpression */:
10914
10888
  case 229 /* OmittedExpression */:
10915
- case 356 /* CommaListExpression */:
10916
- case 355 /* PartiallyEmittedExpression */:
10889
+ case 357 /* CommaListExpression */:
10890
+ case 356 /* PartiallyEmittedExpression */:
10917
10891
  case 235 /* SatisfiesExpression */:
10918
10892
  return true;
10919
10893
  default:
@@ -11084,7 +11058,7 @@ function isDeclarationStatementKind(kind) {
11084
11058
  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 */;
11085
11059
  }
11086
11060
  function isStatementKindButNotDeclarationKind(kind) {
11087
- 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 */;
11061
+ 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 */;
11088
11062
  }
11089
11063
  function isDeclaration(node) {
11090
11064
  if (node.kind === 165 /* TypeParameter */) {
@@ -11145,10 +11119,10 @@ function isCaseOrDefaultClause(node) {
11145
11119
  return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
11146
11120
  }
11147
11121
  function isJSDocNode(node) {
11148
- return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 352 /* LastJSDocNode */;
11122
+ return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */;
11149
11123
  }
11150
11124
  function isJSDocTag(node) {
11151
- return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 352 /* LastJSDocTagNode */;
11125
+ return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */;
11152
11126
  }
11153
11127
  function isSetAccessor(node) {
11154
11128
  return node.kind === 175 /* SetAccessor */;
@@ -11181,6 +11155,9 @@ function hasOnlyExpressionInitializer(node) {
11181
11155
  return false;
11182
11156
  }
11183
11157
  }
11158
+ function isObjectLiteralElement(node) {
11159
+ return node.kind === 288 /* JsxAttribute */ || node.kind === 290 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node);
11160
+ }
11184
11161
  function isTypeReferenceType(node) {
11185
11162
  return node.kind === 180 /* TypeReference */ || node.kind === 230 /* ExpressionWithTypeArguments */;
11186
11163
  }
@@ -11533,7 +11510,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
11533
11510
  if (includeJsDoc && hasJSDocNodes(node)) {
11534
11511
  return getTokenPosOfNode(node.jsDoc[0], sourceFile);
11535
11512
  }
11536
- if (node.kind === 353 /* SyntaxList */ && node._children.length > 0) {
11513
+ if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) {
11537
11514
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
11538
11515
  }
11539
11516
  return skipTrivia(
@@ -13306,7 +13283,7 @@ function filterOwnedJSDocTags(hostNode, jsDoc) {
13306
13283
  return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0;
13307
13284
  }
13308
13285
  function ownsJSDocTag(hostNode, tag) {
13309
- return !isJSDocTypeTag(tag) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
13286
+ return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
13310
13287
  }
13311
13288
  function getNextJSDocCommentLocation(node) {
13312
13289
  const parent = node.parent;
@@ -13784,7 +13761,7 @@ function getOperator(expression) {
13784
13761
  }
13785
13762
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
13786
13763
  switch (nodeKind) {
13787
- case 356 /* CommaListExpression */:
13764
+ case 357 /* CommaListExpression */:
13788
13765
  return 0 /* Comma */;
13789
13766
  case 227 /* SpreadElement */:
13790
13767
  return 1 /* Spread */;
@@ -14770,14 +14747,23 @@ function modifierToFlag(token) {
14770
14747
  }
14771
14748
  return 0 /* None */;
14772
14749
  }
14750
+ function isBinaryLogicalOperator(token) {
14751
+ return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */;
14752
+ }
14773
14753
  function isLogicalOperator(token) {
14774
- return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */ || token === 53 /* ExclamationToken */;
14754
+ return isBinaryLogicalOperator(token) || token === 53 /* ExclamationToken */;
14775
14755
  }
14776
14756
  function isLogicalOrCoalescingAssignmentOperator(token) {
14777
14757
  return token === 75 /* BarBarEqualsToken */ || token === 76 /* AmpersandAmpersandEqualsToken */ || token === 77 /* QuestionQuestionEqualsToken */;
14778
14758
  }
14779
14759
  function isLogicalOrCoalescingAssignmentExpression(expr) {
14780
- return isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
14760
+ return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
14761
+ }
14762
+ function isLogicalOrCoalescingBinaryOperator(token) {
14763
+ return isBinaryLogicalOperator(token) || token === 60 /* QuestionQuestionToken */;
14764
+ }
14765
+ function isLogicalOrCoalescingBinaryExpression(expr) {
14766
+ return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);
14781
14767
  }
14782
14768
  function isAssignmentOperator(token) {
14783
14769
  return token >= 63 /* FirstAssignment */ && token <= 78 /* LastAssignment */;
@@ -15084,7 +15070,7 @@ function getInitializedVariables(node) {
15084
15070
  return filter(node.declarations, isInitializedVariable);
15085
15071
  }
15086
15072
  function isInitializedVariable(node) {
15087
- return isVariableDeclaration(node) && node.initializer !== void 0;
15073
+ return node.initializer !== void 0;
15088
15074
  }
15089
15075
  function isWatchSet(options) {
15090
15076
  return options.watch && hasProperty(options, "watch");
@@ -15245,7 +15231,7 @@ function getLastChild(node) {
15245
15231
  return lastChild;
15246
15232
  }
15247
15233
  function isTypeNodeKind(kind) {
15248
- 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 */;
15234
+ 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 */;
15249
15235
  }
15250
15236
  function isAccessExpression(node) {
15251
15237
  return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
@@ -15288,7 +15274,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
15288
15274
  case 209 /* ElementAccessExpression */:
15289
15275
  case 208 /* PropertyAccessExpression */:
15290
15276
  case 232 /* NonNullExpression */:
15291
- case 355 /* PartiallyEmittedExpression */:
15277
+ case 356 /* PartiallyEmittedExpression */:
15292
15278
  case 235 /* SatisfiesExpression */:
15293
15279
  node = node.expression;
15294
15280
  continue;
@@ -16523,7 +16509,7 @@ function getContainingNodeArray(node) {
16523
16509
  return parent.types;
16524
16510
  case 186 /* TupleType */:
16525
16511
  case 206 /* ArrayLiteralExpression */:
16526
- case 356 /* CommaListExpression */:
16512
+ case 357 /* CommaListExpression */:
16527
16513
  case 272 /* NamedImports */:
16528
16514
  case 276 /* NamedExports */:
16529
16515
  return parent.elements;
@@ -16697,6 +16683,16 @@ function isNonNullAccess(node) {
16697
16683
  const kind = node.kind;
16698
16684
  return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
16699
16685
  }
16686
+ function isJSDocSatisfiesExpression(node) {
16687
+ return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);
16688
+ }
16689
+ function getJSDocSatisfiesExpressionType(node) {
16690
+ return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));
16691
+ }
16692
+ function tryGetJSDocSatisfiesTypeNode(node) {
16693
+ const tag = getJSDocSatisfiesTag(node);
16694
+ return tag && tag.typeExpression && tag.typeExpression.type;
16695
+ }
16700
16696
 
16701
16697
  // src/compiler/factory/baseNodeFactory.ts
16702
16698
  function createBaseNodeFactory() {
@@ -17710,6 +17706,12 @@ function createNodeFactory(flags, baseFactory2) {
17710
17706
  get updateJSDocThrowsTag() {
17711
17707
  return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */);
17712
17708
  },
17709
+ get createJSDocSatisfiesTag() {
17710
+ return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */);
17711
+ },
17712
+ get updateJSDocSatisfiesTag() {
17713
+ return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */);
17714
+ },
17713
17715
  createJSDocEnumTag,
17714
17716
  updateJSDocEnumTag,
17715
17717
  createJSDocUnknownTag,
@@ -20869,18 +20871,18 @@ function createNodeFactory(flags, baseFactory2) {
20869
20871
  return node;
20870
20872
  }
20871
20873
  function createSyntaxList(children) {
20872
- const node = createBaseNode(353 /* SyntaxList */);
20874
+ const node = createBaseNode(354 /* SyntaxList */);
20873
20875
  node._children = children;
20874
20876
  return node;
20875
20877
  }
20876
20878
  function createNotEmittedStatement(original) {
20877
- const node = createBaseNode(354 /* NotEmittedStatement */);
20879
+ const node = createBaseNode(355 /* NotEmittedStatement */);
20878
20880
  node.original = original;
20879
20881
  setTextRange(node, original);
20880
20882
  return node;
20881
20883
  }
20882
20884
  function createPartiallyEmittedExpression(expression, original) {
20883
- const node = createBaseNode(355 /* PartiallyEmittedExpression */);
20885
+ const node = createBaseNode(356 /* PartiallyEmittedExpression */);
20884
20886
  node.expression = expression;
20885
20887
  node.original = original;
20886
20888
  node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
@@ -20902,7 +20904,7 @@ function createNodeFactory(flags, baseFactory2) {
20902
20904
  return node;
20903
20905
  }
20904
20906
  function createCommaListExpression(elements) {
20905
- const node = createBaseNode(356 /* CommaListExpression */);
20907
+ const node = createBaseNode(357 /* CommaListExpression */);
20906
20908
  node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
20907
20909
  node.transformFlags |= propagateChildrenFlags(node.elements);
20908
20910
  return node;
@@ -20911,19 +20913,19 @@ function createNodeFactory(flags, baseFactory2) {
20911
20913
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
20912
20914
  }
20913
20915
  function createEndOfDeclarationMarker(original) {
20914
- const node = createBaseNode(358 /* EndOfDeclarationMarker */);
20916
+ const node = createBaseNode(359 /* EndOfDeclarationMarker */);
20915
20917
  node.emitNode = {};
20916
20918
  node.original = original;
20917
20919
  return node;
20918
20920
  }
20919
20921
  function createMergeDeclarationMarker(original) {
20920
- const node = createBaseNode(357 /* MergeDeclarationMarker */);
20922
+ const node = createBaseNode(358 /* MergeDeclarationMarker */);
20921
20923
  node.emitNode = {};
20922
20924
  node.original = original;
20923
20925
  return node;
20924
20926
  }
20925
20927
  function createSyntheticReferenceExpression(expression, thisArg) {
20926
- const node = createBaseNode(359 /* SyntheticReferenceExpression */);
20928
+ const node = createBaseNode(360 /* SyntheticReferenceExpression */);
20927
20929
  node.expression = expression;
20928
20930
  node.thisArg = thisArg;
20929
20931
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -21163,7 +21165,7 @@ function createNodeFactory(flags, baseFactory2) {
21163
21165
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
21164
21166
  case 232 /* NonNullExpression */:
21165
21167
  return updateNonNullExpression(outerExpression, expression);
21166
- case 355 /* PartiallyEmittedExpression */:
21168
+ case 356 /* PartiallyEmittedExpression */:
21167
21169
  return updatePartiallyEmittedExpression(outerExpression, expression);
21168
21170
  }
21169
21171
  }
@@ -21699,7 +21701,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
21699
21701
  case 213 /* TypeAssertionExpression */:
21700
21702
  case 235 /* SatisfiesExpression */:
21701
21703
  case 231 /* AsExpression */:
21702
- case 355 /* PartiallyEmittedExpression */:
21704
+ case 356 /* PartiallyEmittedExpression */:
21703
21705
  case 214 /* ParenthesizedExpression */:
21704
21706
  case 106 /* SuperKeyword */:
21705
21707
  return -2147483648 /* OuterExpressionExcludes */;
@@ -23246,10 +23248,10 @@ function isMetaProperty(node) {
23246
23248
  return node.kind === 233 /* MetaProperty */;
23247
23249
  }
23248
23250
  function isPartiallyEmittedExpression(node) {
23249
- return node.kind === 355 /* PartiallyEmittedExpression */;
23251
+ return node.kind === 356 /* PartiallyEmittedExpression */;
23250
23252
  }
23251
23253
  function isCommaListExpression(node) {
23252
- return node.kind === 356 /* CommaListExpression */;
23254
+ return node.kind === 357 /* CommaListExpression */;
23253
23255
  }
23254
23256
  function isTemplateSpan(node) {
23255
23257
  return node.kind === 236 /* TemplateSpan */;
@@ -23372,10 +23374,10 @@ function isExportSpecifier(node) {
23372
23374
  return node.kind === 278 /* ExportSpecifier */;
23373
23375
  }
23374
23376
  function isNotEmittedStatement(node) {
23375
- return node.kind === 354 /* NotEmittedStatement */;
23377
+ return node.kind === 355 /* NotEmittedStatement */;
23376
23378
  }
23377
23379
  function isSyntheticReference(node) {
23378
- return node.kind === 359 /* SyntheticReferenceExpression */;
23380
+ return node.kind === 360 /* SyntheticReferenceExpression */;
23379
23381
  }
23380
23382
  function isExternalModuleReference(node) {
23381
23383
  return node.kind === 280 /* ExternalModuleReference */;
@@ -23542,6 +23544,9 @@ function isJSDocPropertyTag(node) {
23542
23544
  function isJSDocImplementsTag(node) {
23543
23545
  return node.kind === 332 /* JSDocImplementsTag */;
23544
23546
  }
23547
+ function isJSDocSatisfiesTag(node) {
23548
+ return node.kind === 353 /* JSDocSatisfiesTag */;
23549
+ }
23545
23550
 
23546
23551
  // src/compiler/factory/utilities.ts
23547
23552
  function createEmptyExports(factory2) {
@@ -23897,7 +23902,7 @@ function startsWithUseStrict(statements) {
23897
23902
  return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
23898
23903
  }
23899
23904
  function isCommaSequence(node) {
23900
- return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 356 /* CommaListExpression */;
23905
+ return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 357 /* CommaListExpression */;
23901
23906
  }
23902
23907
  function isJSDocTypeAssertion(node) {
23903
23908
  return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
@@ -23920,7 +23925,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
23920
23925
  return (kinds & 2 /* TypeAssertions */) !== 0;
23921
23926
  case 232 /* NonNullExpression */:
23922
23927
  return (kinds & 4 /* NonNullAssertions */) !== 0;
23923
- case 355 /* PartiallyEmittedExpression */:
23928
+ case 356 /* PartiallyEmittedExpression */:
23924
23929
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
23925
23930
  }
23926
23931
  return false;
@@ -24912,7 +24917,7 @@ var forEachChildTable = {
24912
24917
  [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
24913
24918
  return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
24914
24919
  },
24915
- [356 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
24920
+ [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
24916
24921
  return visitNodes(cbNode, cbNodes, node.elements);
24917
24922
  },
24918
24923
  [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
@@ -24984,6 +24989,7 @@ var forEachChildTable = {
24984
24989
  [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
24985
24990
  [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
24986
24991
  [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
24992
+ [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
24987
24993
  [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
24988
24994
  [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
24989
24995
  [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
@@ -25003,7 +25009,7 @@ var forEachChildTable = {
25003
25009
  [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
25004
25010
  [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
25005
25011
  [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
25006
- [355 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
25012
+ [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
25007
25013
  };
25008
25014
  function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
25009
25015
  return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
@@ -31064,6 +31070,9 @@ var Parser;
31064
31070
  case "overload":
31065
31071
  tag = parseOverloadTag(start2, tagName, margin, indentText);
31066
31072
  break;
31073
+ case "satisfies":
31074
+ tag = parseSatisfiesTag(start2, tagName, margin, indentText);
31075
+ break;
31067
31076
  case "see":
31068
31077
  tag = parseSeeTag(start2, tagName, margin, indentText);
31069
31078
  break;
@@ -31372,6 +31381,14 @@ var Parser;
31372
31381
  const className = parseExpressionWithTypeArgumentsForAugments();
31373
31382
  return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
31374
31383
  }
31384
+ function parseSatisfiesTag(start2, tagName, margin, indentText) {
31385
+ const typeExpression = parseJSDocTypeExpression(
31386
+ /*mayOmitBraces*/
31387
+ false
31388
+ );
31389
+ const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
31390
+ return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
31391
+ }
31375
31392
  function parseExpressionWithTypeArgumentsForAugments() {
31376
31393
  const usedBrace = parseOptional(18 /* OpenBraceToken */);
31377
31394
  const pos = getNodePos();
@@ -34973,7 +34990,7 @@ function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) {
34973
34990
  const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
34974
34991
  json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
34975
34992
  let extendedConfigPath;
34976
- if (json.extends) {
34993
+ if (json.extends || json.extends === "") {
34977
34994
  if (!isCompilerOptionsValue(extendsOptionDeclaration, json.extends)) {
34978
34995
  errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", getCompilerOptionValueTypeString(extendsOptionDeclaration)));
34979
34996
  } else {
@@ -35100,7 +35117,11 @@ function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiag
35100
35117
  if (resolved.resolvedModule) {
35101
35118
  return resolved.resolvedModule.resolvedFileName;
35102
35119
  }
35103
- errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
35120
+ if (extendedConfig === "") {
35121
+ errors.push(createDiagnostic(Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
35122
+ } else {
35123
+ errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
35124
+ }
35104
35125
  return void 0;
35105
35126
  }
35106
35127
  function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
@@ -35373,7 +35394,6 @@ function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile,
35373
35394
  }
35374
35395
  }
35375
35396
  function specToDiagnostic(spec, disallowTrailingRecursion) {
35376
- Debug.assert(typeof spec === "string");
35377
35397
  if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
35378
35398
  return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
35379
35399
  } else if (invalidDotDotAfterRecursiveWildcard(spec)) {
@@ -38662,13 +38682,12 @@ function createBinder() {
38662
38682
  } else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) {
38663
38683
  node = node.operand;
38664
38684
  } else {
38665
- return node.kind === 223 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */);
38685
+ return isLogicalOrCoalescingBinaryExpression(node);
38666
38686
  }
38667
38687
  }
38668
38688
  }
38669
38689
  function isLogicalAssignmentExpression(node) {
38670
- node = skipParentheses(node);
38671
- return isBinaryExpression(node) && isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind);
38690
+ return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));
38672
38691
  }
38673
38692
  function isTopLevelLogicalExpression(node) {
38674
38693
  while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 53 /* ExclamationToken */) {
@@ -39051,7 +39070,7 @@ function createBinder() {
39051
39070
  };
39052
39071
  }
39053
39072
  const operator = node.operatorToken.kind;
39054
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */ || isLogicalOrCoalescingAssignmentOperator(operator)) {
39073
+ if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {
39055
39074
  if (isTopLevelLogicalExpression(node)) {
39056
39075
  const postExpressionLabel = createBranchLabel();
39057
39076
  bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
@@ -42517,7 +42536,7 @@ function createTypeChecker(host) {
42517
42536
  if (jsxFragmentPragma) {
42518
42537
  const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
42519
42538
  file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
42520
- visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);
42539
+ visitNode(file.localJsxFragmentFactory, markAsSynthetic);
42521
42540
  if (file.localJsxFragmentFactory) {
42522
42541
  return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
42523
42542
  }
@@ -42560,7 +42579,7 @@ function createTypeChecker(host) {
42560
42579
  if (jsxPragma) {
42561
42580
  const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
42562
42581
  file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
42563
- visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);
42582
+ visitNode(file.localJsxFactory, markAsSynthetic);
42564
42583
  if (file.localJsxFactory) {
42565
42584
  return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
42566
42585
  }
@@ -44071,7 +44090,6 @@ function createTypeChecker(host) {
44071
44090
  return valueSymbol;
44072
44091
  }
44073
44092
  const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
44074
- Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
44075
44093
  result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
44076
44094
  result.parent = valueSymbol.parent || typeSymbol.parent;
44077
44095
  if (valueSymbol.valueDeclaration)
@@ -47711,7 +47729,7 @@ function createTypeChecker(host) {
47711
47729
  }
47712
47730
  let hadError = false;
47713
47731
  const file = getSourceFileOfNode(existing);
47714
- const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
47732
+ const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
47715
47733
  if (hadError) {
47716
47734
  return void 0;
47717
47735
  }
@@ -47724,16 +47742,16 @@ function createTypeChecker(host) {
47724
47742
  return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
47725
47743
  }
47726
47744
  if (isJSDocNullableType(node)) {
47727
- return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
47745
+ return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
47728
47746
  }
47729
47747
  if (isJSDocOptionalType(node)) {
47730
- return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
47748
+ return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
47731
47749
  }
47732
47750
  if (isJSDocNonNullableType(node)) {
47733
47751
  return visitNode(node.type, visitExistingNodeTreeSymbols);
47734
47752
  }
47735
47753
  if (isJSDocVariadicType(node)) {
47736
- return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
47754
+ return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
47737
47755
  }
47738
47756
  if (isJSDocTypeLiteral(node)) {
47739
47757
  return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
@@ -47745,7 +47763,7 @@ function createTypeChecker(host) {
47745
47763
  void 0,
47746
47764
  name,
47747
47765
  t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
47748
- overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
47766
+ overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
47749
47767
  );
47750
47768
  }));
47751
47769
  }
@@ -47764,9 +47782,9 @@ function createTypeChecker(host) {
47764
47782
  "x",
47765
47783
  /*questionToken*/
47766
47784
  void 0,
47767
- visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)
47785
+ visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
47768
47786
  )],
47769
- visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)
47787
+ visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
47770
47788
  )]);
47771
47789
  }
47772
47790
  if (isJSDocFunctionType(node)) {
@@ -47775,33 +47793,33 @@ function createTypeChecker(host) {
47775
47793
  return factory.createConstructorTypeNode(
47776
47794
  /*modifiers*/
47777
47795
  void 0,
47778
- visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
47796
+ visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
47779
47797
  mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
47780
47798
  /*modifiers*/
47781
47799
  void 0,
47782
47800
  getEffectiveDotDotDotForParameter(p),
47783
47801
  getNameForJSDocFunctionParameter(p, i),
47784
47802
  p.questionToken,
47785
- visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
47803
+ visitNode(p.type, visitExistingNodeTreeSymbols),
47786
47804
  /*initializer*/
47787
47805
  void 0
47788
47806
  )),
47789
- visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
47807
+ visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
47790
47808
  );
47791
47809
  } else {
47792
47810
  return factory.createFunctionTypeNode(
47793
- visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
47811
+ visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
47794
47812
  map(node.parameters, (p, i) => factory.createParameterDeclaration(
47795
47813
  /*modifiers*/
47796
47814
  void 0,
47797
47815
  getEffectiveDotDotDotForParameter(p),
47798
47816
  getNameForJSDocFunctionParameter(p, i),
47799
47817
  p.questionToken,
47800
- visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
47818
+ visitNode(p.type, visitExistingNodeTreeSymbols),
47801
47819
  /*initializer*/
47802
47820
  void 0
47803
47821
  )),
47804
- visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
47822
+ visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
47805
47823
  );
47806
47824
  }
47807
47825
  }
@@ -48723,7 +48741,7 @@ function createTypeChecker(host) {
48723
48741
  break;
48724
48742
  }
48725
48743
  case 268 /* ImportEqualsDeclaration */:
48726
- if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {
48744
+ if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
48727
48745
  serializeMaybeAliasAssignment(symbol);
48728
48746
  break;
48729
48747
  }
@@ -49818,6 +49836,9 @@ function createTypeChecker(host) {
49818
49836
  const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration);
49819
49837
  const isOptional = includeOptionality && isOptionalDeclaration(declaration);
49820
49838
  const declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
49839
+ if (!declaredType && isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
49840
+ return useUnknownInCatchVariables ? unknownType : anyType;
49841
+ }
49821
49842
  if (declaredType) {
49822
49843
  return addOptionality(declaredType, isProperty, isOptional);
49823
49844
  }
@@ -50396,14 +50417,6 @@ function createTypeChecker(host) {
50396
50417
  }
50397
50418
  Debug.assertIsDefined(symbol.valueDeclaration);
50398
50419
  const declaration = symbol.valueDeclaration;
50399
- if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
50400
- const typeNode = getEffectiveTypeAnnotationNode(declaration);
50401
- if (typeNode === void 0) {
50402
- return useUnknownInCatchVariables ? unknownType : anyType;
50403
- }
50404
- const type2 = getTypeOfNode(typeNode);
50405
- return isTypeAny(type2) || type2 === unknownType ? type2 : errorType;
50406
- }
50407
50420
  if (isSourceFile(declaration) && isJsonSourceFile(declaration)) {
50408
50421
  if (!declaration.statements.length) {
50409
50422
  return emptyObjectType;
@@ -64992,7 +65005,7 @@ function createTypeChecker(host) {
64992
65005
  }
64993
65006
  }
64994
65007
  function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
64995
- const typeNode = getEffectiveTypeAnnotationNode(declaration);
65008
+ const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);
64996
65009
  if (typeNode) {
64997
65010
  return getTypeFromTypeNode(typeNode);
64998
65011
  }
@@ -65601,8 +65614,16 @@ function createTypeChecker(host) {
65601
65614
  Debug.assert(parent.parent.kind === 225 /* TemplateExpression */);
65602
65615
  return getContextualTypeForSubstitutionExpression(parent.parent, node);
65603
65616
  case 214 /* ParenthesizedExpression */: {
65604
- const tag = isInJSFile(parent) ? getJSDocTypeTag(parent) : void 0;
65605
- return !tag ? getContextualType(parent, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? getContextualType(parent, contextFlags) : getTypeFromTypeNode(tag.typeExpression.type);
65617
+ if (isInJSFile(parent)) {
65618
+ if (isJSDocSatisfiesExpression(parent)) {
65619
+ return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent));
65620
+ }
65621
+ const typeTag = getJSDocTypeTag(parent);
65622
+ if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {
65623
+ return getTypeFromTypeNode(typeTag.typeExpression.type);
65624
+ }
65625
+ }
65626
+ return getContextualType(parent, contextFlags);
65606
65627
  }
65607
65628
  case 232 /* NonNullExpression */:
65608
65629
  return getContextualType(parent, contextFlags);
@@ -69806,12 +69827,15 @@ function createTypeChecker(host) {
69806
69827
  }
69807
69828
  function checkSatisfiesExpression(node) {
69808
69829
  checkSourceElement(node.type);
69809
- const exprType = checkExpression(node.expression);
69810
- const targetType = getTypeFromTypeNode(node.type);
69830
+ return checkSatisfiesExpressionWorker(node.expression, node.type);
69831
+ }
69832
+ function checkSatisfiesExpressionWorker(expression, target, checkMode) {
69833
+ const exprType = checkExpression(expression, checkMode);
69834
+ const targetType = getTypeFromTypeNode(target);
69811
69835
  if (isErrorType(targetType)) {
69812
69836
  return targetType;
69813
69837
  }
69814
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, node.type, node.expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
69838
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
69815
69839
  return exprType;
69816
69840
  }
69817
69841
  function checkMetaProperty(node) {
@@ -71218,12 +71242,12 @@ function createTypeChecker(host) {
71218
71242
  void 0
71219
71243
  );
71220
71244
  const operator = operatorToken.kind;
71221
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
71222
- if (operator === 55 /* AmpersandAmpersandToken */) {
71223
- let parent = node.parent;
71224
- while (parent.kind === 214 /* ParenthesizedExpression */ || isBinaryExpression(parent) && (parent.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent.operatorToken.kind === 56 /* BarBarToken */)) {
71225
- parent = parent.parent;
71226
- }
71245
+ if (isLogicalOrCoalescingBinaryOperator(operator)) {
71246
+ let parent = node.parent;
71247
+ while (parent.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent)) {
71248
+ parent = parent.parent;
71249
+ }
71250
+ if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent)) {
71227
71251
  checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent) ? parent.thenStatement : void 0);
71228
71252
  }
71229
71253
  checkTruthinessOfType(leftType, node.left);
@@ -71300,7 +71324,7 @@ function createTypeChecker(host) {
71300
71324
  return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */);
71301
71325
  }
71302
71326
  let leftType;
71303
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
71327
+ if (isLogicalOrCoalescingBinaryOperator(operator)) {
71304
71328
  leftType = checkTruthinessExpression(left, checkMode);
71305
71329
  } else {
71306
71330
  leftType = checkExpression(left, checkMode);
@@ -71843,6 +71867,12 @@ function createTypeChecker(host) {
71843
71867
  }
71844
71868
  function checkDeclarationInitializer(declaration, checkMode, contextualType) {
71845
71869
  const initializer = getEffectiveInitializer(declaration);
71870
+ if (isInJSFile(declaration)) {
71871
+ const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);
71872
+ if (typeNode) {
71873
+ return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);
71874
+ }
71875
+ }
71846
71876
  const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(
71847
71877
  initializer,
71848
71878
  contextualType,
@@ -72170,9 +72200,14 @@ function createTypeChecker(host) {
72170
72200
  }
72171
72201
  }
72172
72202
  function checkParenthesizedExpression(node, checkMode) {
72173
- if (hasJSDocNodes(node) && isJSDocTypeAssertion(node)) {
72174
- const type = getJSDocTypeAssertionType(node);
72175
- return checkAssertionWorker(type, type, node.expression, checkMode);
72203
+ if (hasJSDocNodes(node)) {
72204
+ if (isJSDocSatisfiesExpression(node)) {
72205
+ return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
72206
+ }
72207
+ if (isJSDocTypeAssertion(node)) {
72208
+ const type = getJSDocTypeAssertionType(node);
72209
+ return checkAssertionWorker(type, type, node.expression, checkMode);
72210
+ }
72176
72211
  }
72177
72212
  return checkExpression(node.expression, checkMode);
72178
72213
  }
@@ -73874,6 +73909,19 @@ function createTypeChecker(host) {
73874
73909
  function checkJSDocTypeTag(node) {
73875
73910
  checkSourceElement(node.typeExpression);
73876
73911
  }
73912
+ function checkJSDocSatisfiesTag(node) {
73913
+ checkSourceElement(node.typeExpression);
73914
+ const host2 = getEffectiveJSDocHost(node);
73915
+ if (host2) {
73916
+ const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);
73917
+ if (length(tags) > 1) {
73918
+ for (let i = 1; i < length(tags); i++) {
73919
+ const tagName = tags[i].tagName;
73920
+ error(tagName, Diagnostics._0_tag_already_specified, idText(tagName));
73921
+ }
73922
+ }
73923
+ }
73924
+ }
73877
73925
  function checkJSDocLinkLikeTag(node) {
73878
73926
  if (node.name) {
73879
73927
  resolveJSDocMemberName(
@@ -74659,15 +74707,24 @@ function createTypeChecker(host) {
74659
74707
  function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) {
74660
74708
  if (!strictNullChecks)
74661
74709
  return;
74662
- helper(condExpr, body);
74663
- while (isBinaryExpression(condExpr) && condExpr.operatorToken.kind === 56 /* BarBarToken */) {
74664
- condExpr = condExpr.left;
74665
- helper(condExpr, body);
74710
+ bothHelper(condExpr, body);
74711
+ function bothHelper(condExpr2, body2) {
74712
+ condExpr2 = skipParentheses(condExpr2);
74713
+ helper(condExpr2, body2);
74714
+ while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 60 /* QuestionQuestionToken */)) {
74715
+ condExpr2 = skipParentheses(condExpr2.left);
74716
+ helper(condExpr2, body2);
74717
+ }
74666
74718
  }
74667
74719
  function helper(condExpr2, body2) {
74668
- const location = isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 55 /* AmpersandAmpersandToken */) ? condExpr2.right : condExpr2;
74669
- if (isModuleExportsAccessExpression(location))
74720
+ const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
74721
+ if (isModuleExportsAccessExpression(location)) {
74670
74722
  return;
74723
+ }
74724
+ if (isLogicalOrCoalescingBinaryExpression(location)) {
74725
+ bothHelper(location, body2);
74726
+ return;
74727
+ }
74671
74728
  const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
74672
74729
  const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
74673
74730
  if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
@@ -74677,7 +74734,7 @@ function createTypeChecker(host) {
74677
74734
  if (callSignatures.length === 0 && !isPromise) {
74678
74735
  return;
74679
74736
  }
74680
- const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : isBinaryExpression(location) && isIdentifier(location.right) ? location.right : void 0;
74737
+ const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;
74681
74738
  const testedSymbol = testedNode && getSymbolAtLocation(testedNode);
74682
74739
  if (!testedSymbol && !isPromise) {
74683
74740
  return;
@@ -75635,18 +75692,8 @@ function createTypeChecker(host) {
75635
75692
  if (catchClause) {
75636
75693
  if (catchClause.variableDeclaration) {
75637
75694
  const declaration = catchClause.variableDeclaration;
75638
- const typeNode = getEffectiveTypeAnnotationNode(getRootDeclaration(declaration));
75639
- if (typeNode) {
75640
- const type = getTypeForVariableLikeDeclaration(
75641
- declaration,
75642
- /*includeOptionality*/
75643
- false,
75644
- 0 /* Normal */
75645
- );
75646
- if (type && !(type.flags & 3 /* AnyOrUnknown */)) {
75647
- grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
75648
- }
75649
- } else if (declaration.initializer) {
75695
+ checkVariableLikeDeclaration(declaration);
75696
+ if (declaration.initializer) {
75650
75697
  grammarErrorOnFirstToken(declaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
75651
75698
  } else {
75652
75699
  const blockLocals = catchClause.block.locals;
@@ -77478,6 +77525,8 @@ function createTypeChecker(host) {
77478
77525
  case 338 /* JSDocProtectedTag */:
77479
77526
  case 337 /* JSDocPrivateTag */:
77480
77527
  return checkJSDocAccessibilityModifiers(node);
77528
+ case 353 /* JSDocSatisfiesTag */:
77529
+ return checkJSDocSatisfiesTag(node);
77481
77530
  case 196 /* IndexedAccessType */:
77482
77531
  return checkIndexedAccessType(node);
77483
77532
  case 197 /* MappedType */:
@@ -81036,10 +81085,13 @@ var SymbolTrackerImpl = class {
81036
81085
 
81037
81086
  // src/compiler/visitorPublic.ts
81038
81087
  function visitNode(node, visitor, test, lift) {
81039
- if (node === void 0) {
81088
+ if (node === void 0 || visitor === void 0) {
81040
81089
  return node;
81041
81090
  }
81042
81091
  const visited = visitor(node);
81092
+ if (visited === node) {
81093
+ return node;
81094
+ }
81043
81095
  let visitedNode;
81044
81096
  if (visited === void 0) {
81045
81097
  return void 0;
@@ -81052,7 +81104,7 @@ function visitNode(node, visitor, test, lift) {
81052
81104
  return visitedNode;
81053
81105
  }
81054
81106
  function visitNodes2(nodes, visitor, test, start, count) {
81055
- if (nodes === void 0) {
81107
+ if (nodes === void 0 || visitor === void 0) {
81056
81108
  return nodes;
81057
81109
  }
81058
81110
  const length2 = nodes.length;
@@ -81101,30 +81153,25 @@ function visitArrayWorker(nodes, visitor, test, start, count) {
81101
81153
  }
81102
81154
  for (let i = 0; i < count; i++) {
81103
81155
  const node = nodes[i + start];
81104
- const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
81156
+ const visited = node !== void 0 ? visitor(node) : void 0;
81105
81157
  if (updated !== void 0 || visited === void 0 || visited !== node) {
81106
81158
  if (updated === void 0) {
81107
81159
  updated = nodes.slice(0, i);
81108
- Debug.assertEachNode(updated, test);
81109
81160
  }
81110
81161
  if (visited) {
81111
81162
  if (isArray(visited)) {
81112
81163
  for (const visitedNode of visited) {
81113
- Debug.assertNode(visitedNode, test);
81164
+ void Debug.assertNode(visitedNode, test);
81114
81165
  updated.push(visitedNode);
81115
81166
  }
81116
81167
  } else {
81117
- Debug.assertNode(visited, test);
81168
+ void Debug.assertNode(visited, test);
81118
81169
  updated.push(visited);
81119
81170
  }
81120
81171
  }
81121
81172
  }
81122
81173
  }
81123
- if (updated) {
81124
- return updated;
81125
- }
81126
- Debug.assertEachNode(nodes, test);
81127
- return nodes;
81174
+ return updated != null ? updated : nodes;
81128
81175
  }
81129
81176
  function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor = visitNodes2) {
81130
81177
  context.startLexicalEnvironment();
@@ -81138,7 +81185,7 @@ function visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2)
81138
81185
  context.startLexicalEnvironment();
81139
81186
  if (nodes) {
81140
81187
  context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
81141
- updated = nodesVisitor(nodes, visitor, isParameter);
81188
+ updated = nodesVisitor(nodes, visitor, isParameterDeclaration);
81142
81189
  if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
81143
81190
  updated = addDefaultValueAssignmentsIfNeeded(updated, context);
81144
81191
  }
@@ -81260,7 +81307,6 @@ function visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) {
81260
81307
  function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
81261
81308
  context.startBlockScope();
81262
81309
  const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
81263
- Debug.assert(updated);
81264
81310
  const declarations = context.endBlockScope();
81265
81311
  if (some(declarations)) {
81266
81312
  if (isBlock(updated)) {
@@ -81283,14 +81329,14 @@ var visitEachChildTable = {
81283
81329
  [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81284
81330
  return context.factory.updateQualifiedName(
81285
81331
  node,
81286
- Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),
81287
- Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))
81332
+ nodeVisitor(node.left, visitor, isEntityName),
81333
+ nodeVisitor(node.right, visitor, isIdentifier)
81288
81334
  );
81289
81335
  },
81290
81336
  [164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81291
81337
  return context.factory.updateComputedPropertyName(
81292
81338
  node,
81293
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81339
+ nodeVisitor(node.expression, visitor, isExpression)
81294
81340
  );
81295
81341
  },
81296
81342
  // Signature elements
@@ -81298,7 +81344,7 @@ var visitEachChildTable = {
81298
81344
  return context.factory.updateTypeParameterDeclaration(
81299
81345
  node,
81300
81346
  nodesVisitor(node.modifiers, visitor, isModifier),
81301
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
81347
+ nodeVisitor(node.name, visitor, isIdentifier),
81302
81348
  nodeVisitor(node.constraint, visitor, isTypeNode),
81303
81349
  nodeVisitor(node.default, visitor, isTypeNode)
81304
81350
  );
@@ -81307,9 +81353,9 @@ var visitEachChildTable = {
81307
81353
  return context.factory.updateParameterDeclaration(
81308
81354
  node,
81309
81355
  nodesVisitor(node.modifiers, visitor, isModifierLike),
81310
- tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
81311
- Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
81312
- tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
81356
+ nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
81357
+ nodeVisitor(node.name, visitor, isBindingName),
81358
+ nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
81313
81359
  nodeVisitor(node.type, visitor, isTypeNode),
81314
81360
  nodeVisitor(node.initializer, visitor, isExpression)
81315
81361
  );
@@ -81317,7 +81363,7 @@ var visitEachChildTable = {
81317
81363
  [167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81318
81364
  return context.factory.updateDecorator(
81319
81365
  node,
81320
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81366
+ nodeVisitor(node.expression, visitor, isExpression)
81321
81367
  );
81322
81368
  },
81323
81369
  // Type elements
@@ -81325,19 +81371,19 @@ var visitEachChildTable = {
81325
81371
  return context.factory.updatePropertySignature(
81326
81372
  node,
81327
81373
  nodesVisitor(node.modifiers, visitor, isModifier),
81328
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
81329
- tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
81374
+ nodeVisitor(node.name, visitor, isPropertyName),
81375
+ nodeVisitor(node.questionToken, tokenVisitor, isToken),
81330
81376
  nodeVisitor(node.type, visitor, isTypeNode)
81331
81377
  );
81332
81378
  },
81333
81379
  [169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
81334
- var _a2, _b;
81380
+ var _a2;
81335
81381
  return context.factory.updatePropertyDeclaration(
81336
81382
  node,
81337
81383
  nodesVisitor(node.modifiers, visitor, isModifierLike),
81338
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
81384
+ nodeVisitor(node.name, visitor, isPropertyName),
81339
81385
  // QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
81340
- tokenVisitor ? nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : (_b = node.questionToken) != null ? _b : node.exclamationToken,
81386
+ nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
81341
81387
  nodeVisitor(node.type, visitor, isTypeNode),
81342
81388
  nodeVisitor(node.initializer, visitor, isExpression)
81343
81389
  );
@@ -81346,10 +81392,10 @@ var visitEachChildTable = {
81346
81392
  return context.factory.updateMethodSignature(
81347
81393
  node,
81348
81394
  nodesVisitor(node.modifiers, visitor, isModifier),
81349
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
81350
- tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
81395
+ nodeVisitor(node.name, visitor, isPropertyName),
81396
+ nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
81351
81397
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81352
- nodesVisitor(node.parameters, visitor, isParameter),
81398
+ nodesVisitor(node.parameters, visitor, isParameterDeclaration),
81353
81399
  nodeVisitor(node.type, visitor, isTypeNode)
81354
81400
  );
81355
81401
  },
@@ -81357,9 +81403,9 @@ var visitEachChildTable = {
81357
81403
  return context.factory.updateMethodDeclaration(
81358
81404
  node,
81359
81405
  nodesVisitor(node.modifiers, visitor, isModifierLike),
81360
- tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
81361
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
81362
- tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
81406
+ nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
81407
+ nodeVisitor(node.name, visitor, isPropertyName),
81408
+ nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
81363
81409
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81364
81410
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
81365
81411
  nodeVisitor(node.type, visitor, isTypeNode),
@@ -81378,7 +81424,7 @@ var visitEachChildTable = {
81378
81424
  return context.factory.updateGetAccessorDeclaration(
81379
81425
  node,
81380
81426
  nodesVisitor(node.modifiers, visitor, isModifierLike),
81381
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
81427
+ nodeVisitor(node.name, visitor, isPropertyName),
81382
81428
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
81383
81429
  nodeVisitor(node.type, visitor, isTypeNode),
81384
81430
  visitFunctionBody(node.body, visitor, context, nodeVisitor)
@@ -81388,7 +81434,7 @@ var visitEachChildTable = {
81388
81434
  return context.factory.updateSetAccessorDeclaration(
81389
81435
  node,
81390
81436
  nodesVisitor(node.modifiers, visitor, isModifierLike),
81391
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
81437
+ nodeVisitor(node.name, visitor, isPropertyName),
81392
81438
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
81393
81439
  visitFunctionBody(node.body, visitor, context, nodeVisitor)
81394
81440
  );
@@ -81405,7 +81451,7 @@ var visitEachChildTable = {
81405
81451
  return context.factory.updateCallSignature(
81406
81452
  node,
81407
81453
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81408
- nodesVisitor(node.parameters, visitor, isParameter),
81454
+ nodesVisitor(node.parameters, visitor, isParameterDeclaration),
81409
81455
  nodeVisitor(node.type, visitor, isTypeNode)
81410
81456
  );
81411
81457
  },
@@ -81413,7 +81459,7 @@ var visitEachChildTable = {
81413
81459
  return context.factory.updateConstructSignature(
81414
81460
  node,
81415
81461
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81416
- nodesVisitor(node.parameters, visitor, isParameter),
81462
+ nodesVisitor(node.parameters, visitor, isParameterDeclaration),
81417
81463
  nodeVisitor(node.type, visitor, isTypeNode)
81418
81464
  );
81419
81465
  },
@@ -81421,8 +81467,8 @@ var visitEachChildTable = {
81421
81467
  return context.factory.updateIndexSignature(
81422
81468
  node,
81423
81469
  nodesVisitor(node.modifiers, visitor, isModifier),
81424
- nodesVisitor(node.parameters, visitor, isParameter),
81425
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81470
+ nodesVisitor(node.parameters, visitor, isParameterDeclaration),
81471
+ nodeVisitor(node.type, visitor, isTypeNode)
81426
81472
  );
81427
81473
  },
81428
81474
  // Types
@@ -81430,14 +81476,14 @@ var visitEachChildTable = {
81430
81476
  return context.factory.updateTypePredicateNode(
81431
81477
  node,
81432
81478
  nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
81433
- Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),
81479
+ nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
81434
81480
  nodeVisitor(node.type, visitor, isTypeNode)
81435
81481
  );
81436
81482
  },
81437
81483
  [180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81438
81484
  return context.factory.updateTypeReferenceNode(
81439
81485
  node,
81440
- Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
81486
+ nodeVisitor(node.typeName, visitor, isEntityName),
81441
81487
  nodesVisitor(node.typeArguments, visitor, isTypeNode)
81442
81488
  );
81443
81489
  },
@@ -81445,8 +81491,8 @@ var visitEachChildTable = {
81445
81491
  return context.factory.updateFunctionTypeNode(
81446
81492
  node,
81447
81493
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81448
- nodesVisitor(node.parameters, visitor, isParameter),
81449
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81494
+ nodesVisitor(node.parameters, visitor, isParameterDeclaration),
81495
+ nodeVisitor(node.type, visitor, isTypeNode)
81450
81496
  );
81451
81497
  },
81452
81498
  [182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -81454,14 +81500,14 @@ var visitEachChildTable = {
81454
81500
  node,
81455
81501
  nodesVisitor(node.modifiers, visitor, isModifier),
81456
81502
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81457
- nodesVisitor(node.parameters, visitor, isParameter),
81458
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81503
+ nodesVisitor(node.parameters, visitor, isParameterDeclaration),
81504
+ nodeVisitor(node.type, visitor, isTypeNode)
81459
81505
  );
81460
81506
  },
81461
81507
  [183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81462
81508
  return context.factory.updateTypeQueryNode(
81463
81509
  node,
81464
- Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),
81510
+ nodeVisitor(node.exprName, visitor, isEntityName),
81465
81511
  nodesVisitor(node.typeArguments, visitor, isTypeNode)
81466
81512
  );
81467
81513
  },
@@ -81474,7 +81520,7 @@ var visitEachChildTable = {
81474
81520
  [185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81475
81521
  return context.factory.updateArrayTypeNode(
81476
81522
  node,
81477
- Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))
81523
+ nodeVisitor(node.elementType, visitor, isTypeNode)
81478
81524
  );
81479
81525
  },
81480
81526
  [186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
@@ -81486,13 +81532,13 @@ var visitEachChildTable = {
81486
81532
  [187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81487
81533
  return context.factory.updateOptionalTypeNode(
81488
81534
  node,
81489
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81535
+ nodeVisitor(node.type, visitor, isTypeNode)
81490
81536
  );
81491
81537
  },
81492
81538
  [188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81493
81539
  return context.factory.updateRestTypeNode(
81494
81540
  node,
81495
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81541
+ nodeVisitor(node.type, visitor, isTypeNode)
81496
81542
  );
81497
81543
  },
81498
81544
  [189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
@@ -81510,22 +81556,22 @@ var visitEachChildTable = {
81510
81556
  [191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81511
81557
  return context.factory.updateConditionalTypeNode(
81512
81558
  node,
81513
- Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),
81514
- Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),
81515
- Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),
81516
- Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))
81559
+ nodeVisitor(node.checkType, visitor, isTypeNode),
81560
+ nodeVisitor(node.extendsType, visitor, isTypeNode),
81561
+ nodeVisitor(node.trueType, visitor, isTypeNode),
81562
+ nodeVisitor(node.falseType, visitor, isTypeNode)
81517
81563
  );
81518
81564
  },
81519
81565
  [192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81520
81566
  return context.factory.updateInferTypeNode(
81521
81567
  node,
81522
- Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))
81568
+ nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
81523
81569
  );
81524
81570
  },
81525
81571
  [202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81526
81572
  return context.factory.updateImportTypeNode(
81527
81573
  node,
81528
- Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
81574
+ nodeVisitor(node.argument, visitor, isTypeNode),
81529
81575
  nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
81530
81576
  nodeVisitor(node.qualifier, visitor, isEntityName),
81531
81577
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
@@ -81535,45 +81581,45 @@ var visitEachChildTable = {
81535
81581
  [298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81536
81582
  return context.factory.updateImportTypeAssertionContainer(
81537
81583
  node,
81538
- Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),
81584
+ nodeVisitor(node.assertClause, visitor, isAssertClause),
81539
81585
  node.multiLine
81540
81586
  );
81541
81587
  },
81542
81588
  [199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81543
81589
  return context.factory.updateNamedTupleMember(
81544
81590
  node,
81545
- tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
81546
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
81547
- tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
81548
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81591
+ nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
81592
+ nodeVisitor(node.name, visitor, isIdentifier),
81593
+ nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
81594
+ nodeVisitor(node.type, visitor, isTypeNode)
81549
81595
  );
81550
81596
  },
81551
81597
  [193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81552
81598
  return context.factory.updateParenthesizedType(
81553
81599
  node,
81554
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81600
+ nodeVisitor(node.type, visitor, isTypeNode)
81555
81601
  );
81556
81602
  },
81557
81603
  [195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81558
81604
  return context.factory.updateTypeOperatorNode(
81559
81605
  node,
81560
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81606
+ nodeVisitor(node.type, visitor, isTypeNode)
81561
81607
  );
81562
81608
  },
81563
81609
  [196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81564
81610
  return context.factory.updateIndexedAccessTypeNode(
81565
81611
  node,
81566
- Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),
81567
- Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))
81612
+ nodeVisitor(node.objectType, visitor, isTypeNode),
81613
+ nodeVisitor(node.indexType, visitor, isTypeNode)
81568
81614
  );
81569
81615
  },
81570
81616
  [197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
81571
81617
  return context.factory.updateMappedTypeNode(
81572
81618
  node,
81573
- tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,
81574
- Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),
81619
+ nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
81620
+ nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
81575
81621
  nodeVisitor(node.nameType, visitor, isTypeNode),
81576
- tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,
81622
+ nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
81577
81623
  nodeVisitor(node.type, visitor, isTypeNode),
81578
81624
  nodesVisitor(node.members, visitor, isTypeElement)
81579
81625
  );
@@ -81581,21 +81627,21 @@ var visitEachChildTable = {
81581
81627
  [198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81582
81628
  return context.factory.updateLiteralTypeNode(
81583
81629
  node,
81584
- Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))
81630
+ nodeVisitor(node.literal, visitor, isExpression)
81585
81631
  );
81586
81632
  },
81587
81633
  [200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81588
81634
  return context.factory.updateTemplateLiteralType(
81589
81635
  node,
81590
- Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
81636
+ nodeVisitor(node.head, visitor, isTemplateHead),
81591
81637
  nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
81592
81638
  );
81593
81639
  },
81594
81640
  [201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81595
81641
  return context.factory.updateTemplateLiteralTypeSpan(
81596
81642
  node,
81597
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
81598
- Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
81643
+ nodeVisitor(node.type, visitor, isTypeNode),
81644
+ nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
81599
81645
  );
81600
81646
  },
81601
81647
  // Binding patterns
@@ -81614,9 +81660,9 @@ var visitEachChildTable = {
81614
81660
  [205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81615
81661
  return context.factory.updateBindingElement(
81616
81662
  node,
81617
- tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
81663
+ nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
81618
81664
  nodeVisitor(node.propertyName, visitor, isPropertyName),
81619
- Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
81665
+ nodeVisitor(node.name, visitor, isBindingName),
81620
81666
  nodeVisitor(node.initializer, visitor, isExpression)
81621
81667
  );
81622
81668
  },
@@ -81636,37 +81682,37 @@ var visitEachChildTable = {
81636
81682
  [208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81637
81683
  return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
81638
81684
  node,
81639
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81640
- tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
81641
- Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
81685
+ nodeVisitor(node.expression, visitor, isExpression),
81686
+ nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
81687
+ nodeVisitor(node.name, visitor, isMemberName)
81642
81688
  ) : context.factory.updatePropertyAccessExpression(
81643
81689
  node,
81644
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81645
- Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
81690
+ nodeVisitor(node.expression, visitor, isExpression),
81691
+ nodeVisitor(node.name, visitor, isMemberName)
81646
81692
  );
81647
81693
  },
81648
81694
  [209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81649
81695
  return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
81650
81696
  node,
81651
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81652
- tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
81653
- Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
81697
+ nodeVisitor(node.expression, visitor, isExpression),
81698
+ nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
81699
+ nodeVisitor(node.argumentExpression, visitor, isExpression)
81654
81700
  ) : context.factory.updateElementAccessExpression(
81655
81701
  node,
81656
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81657
- Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
81702
+ nodeVisitor(node.expression, visitor, isExpression),
81703
+ nodeVisitor(node.argumentExpression, visitor, isExpression)
81658
81704
  );
81659
81705
  },
81660
81706
  [210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
81661
81707
  return isCallChain(node) ? context.factory.updateCallChain(
81662
81708
  node,
81663
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81664
- tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
81709
+ nodeVisitor(node.expression, visitor, isExpression),
81710
+ nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
81665
81711
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
81666
81712
  nodesVisitor(node.arguments, visitor, isExpression)
81667
81713
  ) : context.factory.updateCallExpression(
81668
81714
  node,
81669
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81715
+ nodeVisitor(node.expression, visitor, isExpression),
81670
81716
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
81671
81717
  nodesVisitor(node.arguments, visitor, isExpression)
81672
81718
  );
@@ -81674,7 +81720,7 @@ var visitEachChildTable = {
81674
81720
  [211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81675
81721
  return context.factory.updateNewExpression(
81676
81722
  node,
81677
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81723
+ nodeVisitor(node.expression, visitor, isExpression),
81678
81724
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
81679
81725
  nodesVisitor(node.arguments, visitor, isExpression)
81680
81726
  );
@@ -81682,29 +81728,29 @@ var visitEachChildTable = {
81682
81728
  [212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81683
81729
  return context.factory.updateTaggedTemplateExpression(
81684
81730
  node,
81685
- Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),
81731
+ nodeVisitor(node.tag, visitor, isExpression),
81686
81732
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
81687
- Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))
81733
+ nodeVisitor(node.template, visitor, isTemplateLiteral)
81688
81734
  );
81689
81735
  },
81690
81736
  [213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81691
81737
  return context.factory.updateTypeAssertion(
81692
81738
  node,
81693
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
81694
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81739
+ nodeVisitor(node.type, visitor, isTypeNode),
81740
+ nodeVisitor(node.expression, visitor, isExpression)
81695
81741
  );
81696
81742
  },
81697
81743
  [214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81698
81744
  return context.factory.updateParenthesizedExpression(
81699
81745
  node,
81700
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81746
+ nodeVisitor(node.expression, visitor, isExpression)
81701
81747
  );
81702
81748
  },
81703
81749
  [215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
81704
81750
  return context.factory.updateFunctionExpression(
81705
81751
  node,
81706
81752
  nodesVisitor(node.modifiers, visitor, isModifier),
81707
- tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
81753
+ nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
81708
81754
  nodeVisitor(node.name, visitor, isIdentifier),
81709
81755
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81710
81756
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
@@ -81719,82 +81765,82 @@ var visitEachChildTable = {
81719
81765
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81720
81766
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
81721
81767
  nodeVisitor(node.type, visitor, isTypeNode),
81722
- tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,
81768
+ nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
81723
81769
  visitFunctionBody(node.body, visitor, context, nodeVisitor)
81724
81770
  );
81725
81771
  },
81726
81772
  [217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81727
81773
  return context.factory.updateDeleteExpression(
81728
81774
  node,
81729
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81775
+ nodeVisitor(node.expression, visitor, isExpression)
81730
81776
  );
81731
81777
  },
81732
81778
  [218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81733
81779
  return context.factory.updateTypeOfExpression(
81734
81780
  node,
81735
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81781
+ nodeVisitor(node.expression, visitor, isExpression)
81736
81782
  );
81737
81783
  },
81738
81784
  [219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81739
81785
  return context.factory.updateVoidExpression(
81740
81786
  node,
81741
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81787
+ nodeVisitor(node.expression, visitor, isExpression)
81742
81788
  );
81743
81789
  },
81744
81790
  [220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81745
81791
  return context.factory.updateAwaitExpression(
81746
81792
  node,
81747
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81793
+ nodeVisitor(node.expression, visitor, isExpression)
81748
81794
  );
81749
81795
  },
81750
81796
  [221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81751
81797
  return context.factory.updatePrefixUnaryExpression(
81752
81798
  node,
81753
- Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
81799
+ nodeVisitor(node.operand, visitor, isExpression)
81754
81800
  );
81755
81801
  },
81756
81802
  [222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81757
81803
  return context.factory.updatePostfixUnaryExpression(
81758
81804
  node,
81759
- Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
81805
+ nodeVisitor(node.operand, visitor, isExpression)
81760
81806
  );
81761
81807
  },
81762
81808
  [223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81763
81809
  return context.factory.updateBinaryExpression(
81764
81810
  node,
81765
- Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),
81766
- tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,
81767
- Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))
81811
+ nodeVisitor(node.left, visitor, isExpression),
81812
+ nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
81813
+ nodeVisitor(node.right, visitor, isExpression)
81768
81814
  );
81769
81815
  },
81770
81816
  [224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81771
81817
  return context.factory.updateConditionalExpression(
81772
81818
  node,
81773
- Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),
81774
- tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,
81775
- Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),
81776
- tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,
81777
- Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))
81819
+ nodeVisitor(node.condition, visitor, isExpression),
81820
+ nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
81821
+ nodeVisitor(node.whenTrue, visitor, isExpression),
81822
+ nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
81823
+ nodeVisitor(node.whenFalse, visitor, isExpression)
81778
81824
  );
81779
81825
  },
81780
81826
  [225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81781
81827
  return context.factory.updateTemplateExpression(
81782
81828
  node,
81783
- Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
81829
+ nodeVisitor(node.head, visitor, isTemplateHead),
81784
81830
  nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
81785
81831
  );
81786
81832
  },
81787
81833
  [226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81788
81834
  return context.factory.updateYieldExpression(
81789
81835
  node,
81790
- tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
81836
+ nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
81791
81837
  nodeVisitor(node.expression, visitor, isExpression)
81792
81838
  );
81793
81839
  },
81794
81840
  [227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81795
81841
  return context.factory.updateSpreadElement(
81796
81842
  node,
81797
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81843
+ nodeVisitor(node.expression, visitor, isExpression)
81798
81844
  );
81799
81845
  },
81800
81846
  [228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -81810,45 +81856,45 @@ var visitEachChildTable = {
81810
81856
  [230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
81811
81857
  return context.factory.updateExpressionWithTypeArguments(
81812
81858
  node,
81813
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81859
+ nodeVisitor(node.expression, visitor, isExpression),
81814
81860
  nodesVisitor(node.typeArguments, visitor, isTypeNode)
81815
81861
  );
81816
81862
  },
81817
81863
  [231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81818
81864
  return context.factory.updateAsExpression(
81819
81865
  node,
81820
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81821
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81866
+ nodeVisitor(node.expression, visitor, isExpression),
81867
+ nodeVisitor(node.type, visitor, isTypeNode)
81822
81868
  );
81823
81869
  },
81824
81870
  [235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81825
81871
  return context.factory.updateSatisfiesExpression(
81826
81872
  node,
81827
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81828
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
81873
+ nodeVisitor(node.expression, visitor, isExpression),
81874
+ nodeVisitor(node.type, visitor, isTypeNode)
81829
81875
  );
81830
81876
  },
81831
81877
  [232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81832
81878
  return isOptionalChain(node) ? context.factory.updateNonNullChain(
81833
81879
  node,
81834
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81880
+ nodeVisitor(node.expression, visitor, isExpression)
81835
81881
  ) : context.factory.updateNonNullExpression(
81836
81882
  node,
81837
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81883
+ nodeVisitor(node.expression, visitor, isExpression)
81838
81884
  );
81839
81885
  },
81840
81886
  [233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81841
81887
  return context.factory.updateMetaProperty(
81842
81888
  node,
81843
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
81889
+ nodeVisitor(node.name, visitor, isIdentifier)
81844
81890
  );
81845
81891
  },
81846
81892
  // Misc
81847
81893
  [236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81848
81894
  return context.factory.updateTemplateSpan(
81849
81895
  node,
81850
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81851
- Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
81896
+ nodeVisitor(node.expression, visitor, isExpression),
81897
+ nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
81852
81898
  );
81853
81899
  },
81854
81900
  // Element
@@ -81862,20 +81908,20 @@ var visitEachChildTable = {
81862
81908
  return context.factory.updateVariableStatement(
81863
81909
  node,
81864
81910
  nodesVisitor(node.modifiers, visitor, isModifier),
81865
- Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
81911
+ nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
81866
81912
  );
81867
81913
  },
81868
81914
  [241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81869
81915
  return context.factory.updateExpressionStatement(
81870
81916
  node,
81871
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81917
+ nodeVisitor(node.expression, visitor, isExpression)
81872
81918
  );
81873
81919
  },
81874
81920
  [242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81875
81921
  return context.factory.updateIfStatement(
81876
81922
  node,
81877
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81878
- Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),
81923
+ nodeVisitor(node.expression, visitor, isExpression),
81924
+ nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
81879
81925
  nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
81880
81926
  );
81881
81927
  },
@@ -81883,13 +81929,13 @@ var visitEachChildTable = {
81883
81929
  return context.factory.updateDoStatement(
81884
81930
  node,
81885
81931
  visitIterationBody(node.statement, visitor, context, nodeVisitor),
81886
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
81932
+ nodeVisitor(node.expression, visitor, isExpression)
81887
81933
  );
81888
81934
  },
81889
81935
  [244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81890
81936
  return context.factory.updateWhileStatement(
81891
81937
  node,
81892
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81938
+ nodeVisitor(node.expression, visitor, isExpression),
81893
81939
  visitIterationBody(node.statement, visitor, context, nodeVisitor)
81894
81940
  );
81895
81941
  },
@@ -81905,17 +81951,17 @@ var visitEachChildTable = {
81905
81951
  [246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81906
81952
  return context.factory.updateForInStatement(
81907
81953
  node,
81908
- Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
81909
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81954
+ nodeVisitor(node.initializer, visitor, isForInitializer),
81955
+ nodeVisitor(node.expression, visitor, isExpression),
81910
81956
  visitIterationBody(node.statement, visitor, context, nodeVisitor)
81911
81957
  );
81912
81958
  },
81913
81959
  [247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81914
81960
  return context.factory.updateForOfStatement(
81915
81961
  node,
81916
- tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
81917
- Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
81918
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81962
+ nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
81963
+ nodeVisitor(node.initializer, visitor, isForInitializer),
81964
+ nodeVisitor(node.expression, visitor, isExpression),
81919
81965
  visitIterationBody(node.statement, visitor, context, nodeVisitor)
81920
81966
  );
81921
81967
  },
@@ -81940,34 +81986,34 @@ var visitEachChildTable = {
81940
81986
  [251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81941
81987
  return context.factory.updateWithStatement(
81942
81988
  node,
81943
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81944
- Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
81989
+ nodeVisitor(node.expression, visitor, isExpression),
81990
+ nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
81945
81991
  );
81946
81992
  },
81947
81993
  [252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81948
81994
  return context.factory.updateSwitchStatement(
81949
81995
  node,
81950
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
81951
- Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))
81996
+ nodeVisitor(node.expression, visitor, isExpression),
81997
+ nodeVisitor(node.caseBlock, visitor, isCaseBlock)
81952
81998
  );
81953
81999
  },
81954
82000
  [253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81955
82001
  return context.factory.updateLabeledStatement(
81956
82002
  node,
81957
- Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),
81958
- Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
82003
+ nodeVisitor(node.label, visitor, isIdentifier),
82004
+ nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
81959
82005
  );
81960
82006
  },
81961
82007
  [254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81962
82008
  return context.factory.updateThrowStatement(
81963
82009
  node,
81964
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
82010
+ nodeVisitor(node.expression, visitor, isExpression)
81965
82011
  );
81966
82012
  },
81967
82013
  [255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
81968
82014
  return context.factory.updateTryStatement(
81969
82015
  node,
81970
- Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),
82016
+ nodeVisitor(node.tryBlock, visitor, isBlock),
81971
82017
  nodeVisitor(node.catchClause, visitor, isCatchClause),
81972
82018
  nodeVisitor(node.finallyBlock, visitor, isBlock)
81973
82019
  );
@@ -81975,8 +82021,8 @@ var visitEachChildTable = {
81975
82021
  [257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
81976
82022
  return context.factory.updateVariableDeclaration(
81977
82023
  node,
81978
- Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
81979
- tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,
82024
+ nodeVisitor(node.name, visitor, isBindingName),
82025
+ nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
81980
82026
  nodeVisitor(node.type, visitor, isTypeNode),
81981
82027
  nodeVisitor(node.initializer, visitor, isExpression)
81982
82028
  );
@@ -81991,7 +82037,7 @@ var visitEachChildTable = {
81991
82037
  return context.factory.updateFunctionDeclaration(
81992
82038
  node,
81993
82039
  nodesVisitor(node.modifiers, visitor, isModifier),
81994
- tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
82040
+ nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
81995
82041
  nodeVisitor(node.name, visitor, isIdentifier),
81996
82042
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
81997
82043
  visitParameterList(node.parameters, visitor, context, nodesVisitor),
@@ -82013,7 +82059,7 @@ var visitEachChildTable = {
82013
82059
  return context.factory.updateInterfaceDeclaration(
82014
82060
  node,
82015
82061
  nodesVisitor(node.modifiers, visitor, isModifier),
82016
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
82062
+ nodeVisitor(node.name, visitor, isIdentifier),
82017
82063
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
82018
82064
  nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
82019
82065
  nodesVisitor(node.members, visitor, isTypeElement)
@@ -82023,16 +82069,16 @@ var visitEachChildTable = {
82023
82069
  return context.factory.updateTypeAliasDeclaration(
82024
82070
  node,
82025
82071
  nodesVisitor(node.modifiers, visitor, isModifier),
82026
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
82072
+ nodeVisitor(node.name, visitor, isIdentifier),
82027
82073
  nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
82028
- Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
82074
+ nodeVisitor(node.type, visitor, isTypeNode)
82029
82075
  );
82030
82076
  },
82031
82077
  [263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
82032
82078
  return context.factory.updateEnumDeclaration(
82033
82079
  node,
82034
82080
  nodesVisitor(node.modifiers, visitor, isModifier),
82035
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
82081
+ nodeVisitor(node.name, visitor, isIdentifier),
82036
82082
  nodesVisitor(node.members, visitor, isEnumMember)
82037
82083
  );
82038
82084
  },
@@ -82040,7 +82086,7 @@ var visitEachChildTable = {
82040
82086
  return context.factory.updateModuleDeclaration(
82041
82087
  node,
82042
82088
  nodesVisitor(node.modifiers, visitor, isModifier),
82043
- Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
82089
+ nodeVisitor(node.name, visitor, isModuleName),
82044
82090
  nodeVisitor(node.body, visitor, isModuleBody)
82045
82091
  );
82046
82092
  },
@@ -82059,7 +82105,7 @@ var visitEachChildTable = {
82059
82105
  [267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82060
82106
  return context.factory.updateNamespaceExportDeclaration(
82061
82107
  node,
82062
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
82108
+ nodeVisitor(node.name, visitor, isIdentifier)
82063
82109
  );
82064
82110
  },
82065
82111
  [268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -82067,8 +82113,8 @@ var visitEachChildTable = {
82067
82113
  node,
82068
82114
  nodesVisitor(node.modifiers, visitor, isModifier),
82069
82115
  node.isTypeOnly,
82070
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
82071
- Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
82116
+ nodeVisitor(node.name, visitor, isIdentifier),
82117
+ nodeVisitor(node.moduleReference, visitor, isModuleReference)
82072
82118
  );
82073
82119
  },
82074
82120
  [269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -82076,7 +82122,7 @@ var visitEachChildTable = {
82076
82122
  node,
82077
82123
  nodesVisitor(node.modifiers, visitor, isModifier),
82078
82124
  nodeVisitor(node.importClause, visitor, isImportClause),
82079
- Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
82125
+ nodeVisitor(node.moduleSpecifier, visitor, isExpression),
82080
82126
  nodeVisitor(node.assertClause, visitor, isAssertClause)
82081
82127
  );
82082
82128
  },
@@ -82090,8 +82136,8 @@ var visitEachChildTable = {
82090
82136
  [297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82091
82137
  return context.factory.updateAssertEntry(
82092
82138
  node,
82093
- Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
82094
- Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
82139
+ nodeVisitor(node.name, visitor, isAssertionKey),
82140
+ nodeVisitor(node.value, visitor, isExpression)
82095
82141
  );
82096
82142
  },
82097
82143
  [270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -82105,13 +82151,13 @@ var visitEachChildTable = {
82105
82151
  [271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82106
82152
  return context.factory.updateNamespaceImport(
82107
82153
  node,
82108
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
82154
+ nodeVisitor(node.name, visitor, isIdentifier)
82109
82155
  );
82110
82156
  },
82111
82157
  [277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82112
82158
  return context.factory.updateNamespaceExport(
82113
82159
  node,
82114
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
82160
+ nodeVisitor(node.name, visitor, isIdentifier)
82115
82161
  );
82116
82162
  },
82117
82163
  [272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
@@ -82125,14 +82171,14 @@ var visitEachChildTable = {
82125
82171
  node,
82126
82172
  node.isTypeOnly,
82127
82173
  nodeVisitor(node.propertyName, visitor, isIdentifier),
82128
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
82174
+ nodeVisitor(node.name, visitor, isIdentifier)
82129
82175
  );
82130
82176
  },
82131
82177
  [274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
82132
82178
  return context.factory.updateExportAssignment(
82133
82179
  node,
82134
82180
  nodesVisitor(node.modifiers, visitor, isModifier),
82135
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
82181
+ nodeVisitor(node.expression, visitor, isExpression)
82136
82182
  );
82137
82183
  },
82138
82184
  [275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
@@ -82156,59 +82202,59 @@ var visitEachChildTable = {
82156
82202
  node,
82157
82203
  node.isTypeOnly,
82158
82204
  nodeVisitor(node.propertyName, visitor, isIdentifier),
82159
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
82205
+ nodeVisitor(node.name, visitor, isIdentifier)
82160
82206
  );
82161
82207
  },
82162
82208
  // Module references
82163
82209
  [280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82164
82210
  return context.factory.updateExternalModuleReference(
82165
82211
  node,
82166
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
82212
+ nodeVisitor(node.expression, visitor, isExpression)
82167
82213
  );
82168
82214
  },
82169
82215
  // JSX
82170
82216
  [281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
82171
82217
  return context.factory.updateJsxElement(
82172
82218
  node,
82173
- Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),
82219
+ nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
82174
82220
  nodesVisitor(node.children, visitor, isJsxChild),
82175
- Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))
82221
+ nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
82176
82222
  );
82177
82223
  },
82178
82224
  [282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
82179
82225
  return context.factory.updateJsxSelfClosingElement(
82180
82226
  node,
82181
- Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
82227
+ nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
82182
82228
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
82183
- Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
82229
+ nodeVisitor(node.attributes, visitor, isJsxAttributes)
82184
82230
  );
82185
82231
  },
82186
82232
  [283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
82187
82233
  return context.factory.updateJsxOpeningElement(
82188
82234
  node,
82189
- Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
82235
+ nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
82190
82236
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
82191
- Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
82237
+ nodeVisitor(node.attributes, visitor, isJsxAttributes)
82192
82238
  );
82193
82239
  },
82194
82240
  [284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82195
82241
  return context.factory.updateJsxClosingElement(
82196
82242
  node,
82197
- Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))
82243
+ nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
82198
82244
  );
82199
82245
  },
82200
82246
  [285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
82201
82247
  return context.factory.updateJsxFragment(
82202
82248
  node,
82203
- Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
82249
+ nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
82204
82250
  nodesVisitor(node.children, visitor, isJsxChild),
82205
- Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))
82251
+ nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
82206
82252
  );
82207
82253
  },
82208
82254
  [288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82209
82255
  return context.factory.updateJsxAttribute(
82210
82256
  node,
82211
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
82257
+ nodeVisitor(node.name, visitor, isIdentifier),
82212
82258
  nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
82213
82259
  );
82214
82260
  },
@@ -82221,20 +82267,20 @@ var visitEachChildTable = {
82221
82267
  [290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82222
82268
  return context.factory.updateJsxSpreadAttribute(
82223
82269
  node,
82224
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
82270
+ nodeVisitor(node.expression, visitor, isExpression)
82225
82271
  );
82226
82272
  },
82227
82273
  [291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82228
82274
  return context.factory.updateJsxExpression(
82229
82275
  node,
82230
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
82276
+ nodeVisitor(node.expression, visitor, isExpression)
82231
82277
  );
82232
82278
  },
82233
82279
  // Clauses
82234
82280
  [292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
82235
82281
  return context.factory.updateCaseClause(
82236
82282
  node,
82237
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
82283
+ nodeVisitor(node.expression, visitor, isExpression),
82238
82284
  nodesVisitor(node.statements, visitor, isStatement)
82239
82285
  );
82240
82286
  },
@@ -82254,35 +82300,35 @@ var visitEachChildTable = {
82254
82300
  return context.factory.updateCatchClause(
82255
82301
  node,
82256
82302
  nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
82257
- Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))
82303
+ nodeVisitor(node.block, visitor, isBlock)
82258
82304
  );
82259
82305
  },
82260
82306
  // Property assignments
82261
82307
  [299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82262
82308
  return context.factory.updatePropertyAssignment(
82263
82309
  node,
82264
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
82265
- Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))
82310
+ nodeVisitor(node.name, visitor, isPropertyName),
82311
+ nodeVisitor(node.initializer, visitor, isExpression)
82266
82312
  );
82267
82313
  },
82268
82314
  [300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82269
82315
  return context.factory.updateShorthandPropertyAssignment(
82270
82316
  node,
82271
- Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
82317
+ nodeVisitor(node.name, visitor, isIdentifier),
82272
82318
  nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
82273
82319
  );
82274
82320
  },
82275
82321
  [301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82276
82322
  return context.factory.updateSpreadAssignment(
82277
82323
  node,
82278
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
82324
+ nodeVisitor(node.expression, visitor, isExpression)
82279
82325
  );
82280
82326
  },
82281
82327
  // Enum
82282
82328
  [302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82283
82329
  return context.factory.updateEnumMember(
82284
82330
  node,
82285
- Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
82331
+ nodeVisitor(node.name, visitor, isPropertyName),
82286
82332
  nodeVisitor(node.initializer, visitor, isExpression)
82287
82333
  );
82288
82334
  },
@@ -82294,13 +82340,13 @@ var visitEachChildTable = {
82294
82340
  );
82295
82341
  },
82296
82342
  // Transformation nodes
82297
- [355 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82343
+ [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
82298
82344
  return context.factory.updatePartiallyEmittedExpression(
82299
82345
  node,
82300
- Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
82346
+ nodeVisitor(node.expression, visitor, isExpression)
82301
82347
  );
82302
82348
  },
82303
- [356 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
82349
+ [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
82304
82350
  return context.factory.updateCommaListExpression(
82305
82351
  node,
82306
82352
  nodesVisitor(node.elements, visitor, isExpression)
@@ -83083,7 +83129,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
83083
83129
  location = node = value;
83084
83130
  value = node.right;
83085
83131
  } else {
83086
- return Debug.checkDefined(visitNode(value, visitor, isExpression));
83132
+ return visitNode(value, visitor, isExpression);
83087
83133
  }
83088
83134
  }
83089
83135
  }
@@ -83102,7 +83148,6 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
83102
83148
  };
83103
83149
  if (value) {
83104
83150
  value = visitNode(value, visitor, isExpression);
83105
- Debug.assert(value);
83106
83151
  if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
83107
83152
  value = ensureIdentifier(
83108
83153
  flattenContext,
@@ -83144,7 +83189,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
83144
83189
  function emitBindingOrAssignment(target, value2, location2, original) {
83145
83190
  Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
83146
83191
  const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
83147
- context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),
83192
+ context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
83148
83193
  location2
83149
83194
  );
83150
83195
  expression.original = original;
@@ -83201,7 +83246,7 @@ function flattenDestructuringBinding(node, visitor, context, level, rval, hoistT
83201
83246
  if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
83202
83247
  initializer = ensureIdentifier(
83203
83248
  flattenContext,
83204
- Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),
83249
+ visitNode(initializer, flattenContext.visitor),
83205
83250
  /*reuseIdentifierExpressions*/
83206
83251
  false,
83207
83252
  initializer
@@ -83322,7 +83367,7 @@ function flattenObjectBindingOrAssignmentPattern(flattenContext, parent, pattern
83322
83367
  if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
83323
83368
  const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
83324
83369
  if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
83325
- bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));
83370
+ bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
83326
83371
  } else {
83327
83372
  if (bindingElements) {
83328
83373
  flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
@@ -83460,7 +83505,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName)
83460
83505
  if (isComputedPropertyName(propertyName)) {
83461
83506
  const argumentExpression = ensureIdentifier(
83462
83507
  flattenContext,
83463
- Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),
83508
+ visitNode(propertyName.expression, flattenContext.visitor),
83464
83509
  /*reuseIdentifierExpressions*/
83465
83510
  false,
83466
83511
  /*location*/
@@ -83503,7 +83548,6 @@ function makeArrayBindingPattern(factory2, elements) {
83503
83548
  return factory2.createArrayBindingPattern(elements);
83504
83549
  }
83505
83550
  function makeArrayAssignmentPattern(factory2, elements) {
83506
- Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
83507
83551
  return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
83508
83552
  }
83509
83553
  function makeObjectBindingPattern(factory2, elements) {
@@ -83511,7 +83555,6 @@ function makeObjectBindingPattern(factory2, elements) {
83511
83555
  return factory2.createObjectBindingPattern(elements);
83512
83556
  }
83513
83557
  function makeObjectAssignmentPattern(factory2, elements) {
83514
- Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
83515
83558
  return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
83516
83559
  }
83517
83560
  function makeBindingElement(factory2, name) {
@@ -83530,7 +83573,6 @@ function makeAssignmentElement(name) {
83530
83573
  // src/compiler/transformers/taggedTemplate.ts
83531
83574
  function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
83532
83575
  const tag = visitNode(node.tag, visitor, isExpression);
83533
- Debug.assert(tag);
83534
83576
  const templateArguments = [void 0];
83535
83577
  const cookedStrings = [];
83536
83578
  const rawStrings = [];
@@ -83547,7 +83589,7 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
83547
83589
  for (const templateSpan of template.templateSpans) {
83548
83590
  cookedStrings.push(createTemplateCooked(templateSpan.literal));
83549
83591
  rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
83550
- templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
83592
+ templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
83551
83593
  }
83552
83594
  }
83553
83595
  const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
@@ -83920,7 +83962,7 @@ function transformTypeScript(context) {
83920
83962
  function visitObjectLiteralExpression(node) {
83921
83963
  return factory2.updateObjectLiteralExpression(
83922
83964
  node,
83923
- visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)
83965
+ visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElement)
83924
83966
  );
83925
83967
  }
83926
83968
  function getClassFacts(node, staticProperties) {
@@ -84118,7 +84160,6 @@ function transformTypeScript(context) {
84118
84160
  const decorators = [];
84119
84161
  for (const parameterDecorator of parameterDecorators) {
84120
84162
  const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
84121
- Debug.assert(expression);
84122
84163
  const helper = emitHelpers().createParamHelper(expression, parameterOffset);
84123
84164
  setTextRange(helper, parameterDecorator.expression);
84124
84165
  setEmitFlags(helper, 3072 /* NoComments */);
@@ -84242,7 +84283,6 @@ function transformTypeScript(context) {
84242
84283
  const name = member.name;
84243
84284
  if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
84244
84285
  const expression = visitNode(name.expression, visitor, isExpression);
84245
- Debug.assert(expression);
84246
84286
  const innerExpression = skipPartiallyEmittedExpressions(expression);
84247
84287
  if (!isSimpleInlineableExpression(innerExpression)) {
84248
84288
  const generatedName = factory2.getGeneratedNameForNode(name);
@@ -84250,7 +84290,7 @@ function transformTypeScript(context) {
84250
84290
  return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
84251
84291
  }
84252
84292
  }
84253
- return Debug.checkDefined(visitNode(name, visitor, isPropertyName));
84293
+ return visitNode(name, visitor, isPropertyName);
84254
84294
  }
84255
84295
  function visitHeritageClause(node) {
84256
84296
  if (node.token === 117 /* ImplementsKeyword */) {
@@ -84261,7 +84301,7 @@ function transformTypeScript(context) {
84261
84301
  function visitExpressionWithTypeArguments(node) {
84262
84302
  return factory2.updateExpressionWithTypeArguments(
84263
84303
  node,
84264
- Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),
84304
+ visitNode(node.expression, visitor, isLeftHandSideExpression),
84265
84305
  /*typeArguments*/
84266
84306
  void 0
84267
84307
  );
@@ -84280,7 +84320,7 @@ function transformTypeScript(context) {
84280
84320
  return factory2.updatePropertyDeclaration(
84281
84321
  node,
84282
84322
  concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
84283
- Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
84323
+ visitNode(node.name, visitor, isPropertyName),
84284
84324
  /*questionOrExclamationToken*/
84285
84325
  void 0,
84286
84326
  /*type*/
@@ -84297,7 +84337,7 @@ function transformTypeScript(context) {
84297
84337
  void 0,
84298
84338
  /*type*/
84299
84339
  void 0,
84300
- visitNode(node.initializer, visitor, isExpression)
84340
+ visitNode(node.initializer, visitor)
84301
84341
  );
84302
84342
  }
84303
84343
  function visitConstructor(node) {
@@ -84516,7 +84556,7 @@ function transformTypeScript(context) {
84516
84556
  elideNodes(factory2, node.modifiers),
84517
84557
  // preserve positions, if available
84518
84558
  node.dotDotDotToken,
84519
- Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
84559
+ visitNode(node.name, visitor, isBindingName),
84520
84560
  /*questionToken*/
84521
84561
  void 0,
84522
84562
  /*type*/
@@ -84565,7 +84605,7 @@ function transformTypeScript(context) {
84565
84605
  return setTextRange(
84566
84606
  factory2.createAssignment(
84567
84607
  getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
84568
- Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
84608
+ visitNode(node.initializer, visitor, isExpression)
84569
84609
  ),
84570
84610
  /*location*/
84571
84611
  node
@@ -84575,7 +84615,7 @@ function transformTypeScript(context) {
84575
84615
  function visitVariableDeclaration(node) {
84576
84616
  const updated = factory2.updateVariableDeclaration(
84577
84617
  node,
84578
- Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
84618
+ visitNode(node.name, visitor, isBindingName),
84579
84619
  /*exclamationToken*/
84580
84620
  void 0,
84581
84621
  /*type*/
@@ -84591,30 +84631,26 @@ function transformTypeScript(context) {
84591
84631
  const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
84592
84632
  if (isAssertionExpression(innerExpression)) {
84593
84633
  const expression = visitNode(node.expression, visitor, isExpression);
84594
- Debug.assert(expression);
84595
84634
  return factory2.createPartiallyEmittedExpression(expression, node);
84596
84635
  }
84597
84636
  return visitEachChild(node, visitor, context);
84598
84637
  }
84599
84638
  function visitAssertionExpression(node) {
84600
84639
  const expression = visitNode(node.expression, visitor, isExpression);
84601
- Debug.assert(expression);
84602
84640
  return factory2.createPartiallyEmittedExpression(expression, node);
84603
84641
  }
84604
84642
  function visitNonNullExpression(node) {
84605
84643
  const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
84606
- Debug.assert(expression);
84607
84644
  return factory2.createPartiallyEmittedExpression(expression, node);
84608
84645
  }
84609
84646
  function visitSatisfiesExpression(node) {
84610
84647
  const expression = visitNode(node.expression, visitor, isExpression);
84611
- Debug.assert(expression);
84612
84648
  return factory2.createPartiallyEmittedExpression(expression, node);
84613
84649
  }
84614
84650
  function visitCallExpression(node) {
84615
84651
  return factory2.updateCallExpression(
84616
84652
  node,
84617
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
84653
+ visitNode(node.expression, visitor, isExpression),
84618
84654
  /*typeArguments*/
84619
84655
  void 0,
84620
84656
  visitNodes2(node.arguments, visitor, isExpression)
@@ -84623,7 +84659,7 @@ function transformTypeScript(context) {
84623
84659
  function visitNewExpression(node) {
84624
84660
  return factory2.updateNewExpression(
84625
84661
  node,
84626
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
84662
+ visitNode(node.expression, visitor, isExpression),
84627
84663
  /*typeArguments*/
84628
84664
  void 0,
84629
84665
  visitNodes2(node.arguments, visitor, isExpression)
@@ -84632,28 +84668,28 @@ function transformTypeScript(context) {
84632
84668
  function visitTaggedTemplateExpression(node) {
84633
84669
  return factory2.updateTaggedTemplateExpression(
84634
84670
  node,
84635
- Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
84671
+ visitNode(node.tag, visitor, isExpression),
84636
84672
  /*typeArguments*/
84637
84673
  void 0,
84638
- Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
84674
+ visitNode(node.template, visitor, isExpression)
84639
84675
  );
84640
84676
  }
84641
84677
  function visitJsxSelfClosingElement(node) {
84642
84678
  return factory2.updateJsxSelfClosingElement(
84643
84679
  node,
84644
- Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
84680
+ visitNode(node.tagName, visitor, isJsxTagNameExpression),
84645
84681
  /*typeArguments*/
84646
84682
  void 0,
84647
- Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
84683
+ visitNode(node.attributes, visitor, isJsxAttributes)
84648
84684
  );
84649
84685
  }
84650
84686
  function visitJsxJsxOpeningElement(node) {
84651
84687
  return factory2.updateJsxOpeningElement(
84652
84688
  node,
84653
- Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
84689
+ visitNode(node.tagName, visitor, isJsxTagNameExpression),
84654
84690
  /*typeArguments*/
84655
84691
  void 0,
84656
- Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
84692
+ visitNode(node.attributes, visitor, isJsxAttributes)
84657
84693
  );
84658
84694
  }
84659
84695
  function shouldEmitEnumDeclaration(node) {
@@ -84799,7 +84835,7 @@ function transformTypeScript(context) {
84799
84835
  } else {
84800
84836
  enableSubstitutionForNonQualifiedEnumMembers();
84801
84837
  if (member.initializer) {
84802
- return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));
84838
+ return visitNode(member.initializer, visitor, isExpression);
84803
84839
  } else {
84804
84840
  return factory2.createVoidZero();
84805
84841
  }
@@ -85080,7 +85116,7 @@ function transformTypeScript(context) {
85080
85116
  return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
85081
85117
  }
85082
85118
  function visitNamespaceExports(node) {
85083
- return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));
85119
+ return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
85084
85120
  }
85085
85121
  function visitNamedExportBindings(node, allowEmpty) {
85086
85122
  return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
@@ -85552,7 +85588,6 @@ function transformClassFields(context) {
85552
85588
  const info = accessPrivateIdentifier(node.left);
85553
85589
  if (info) {
85554
85590
  const receiver = visitNode(node.right, visitor, isExpression);
85555
- Debug.assert(receiver);
85556
85591
  return setOriginalNode(
85557
85592
  context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
85558
85593
  node
@@ -85570,7 +85605,6 @@ function transformClassFields(context) {
85570
85605
  }
85571
85606
  function visitComputedPropertyName(node) {
85572
85607
  let expression = visitNode(node.expression, visitor, isExpression);
85573
- Debug.assert(expression);
85574
85608
  if (some(pendingExpressions)) {
85575
85609
  if (isParenthesizedExpression(expression)) {
85576
85610
  expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
@@ -85652,7 +85686,6 @@ function transformClassFields(context) {
85652
85686
  const temp = factory2.createTempVariable(hoistVariableDeclaration);
85653
85687
  setSourceMapRange(temp, name.expression);
85654
85688
  const expression = visitNode(name.expression, visitor, isExpression);
85655
- Debug.assert(expression);
85656
85689
  const assignment = factory2.createAssignment(temp, expression);
85657
85690
  setSourceMapRange(assignment, name.expression);
85658
85691
  getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
@@ -85735,7 +85768,7 @@ function transformClassFields(context) {
85735
85768
  return transformFieldInitializer(node);
85736
85769
  }
85737
85770
  function createPrivateIdentifierAccess(info, receiver) {
85738
- return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
85771
+ return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
85739
85772
  }
85740
85773
  function createPrivateIdentifierAccessHelper(info, receiver) {
85741
85774
  setCommentRange(receiver, moveRangePos(receiver, -1));
@@ -85805,7 +85838,7 @@ function transformClassFields(context) {
85805
85838
  if (classConstructor && superClassReference) {
85806
85839
  const superProperty = factory2.createReflectGetCall(
85807
85840
  superClassReference,
85808
- Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
85841
+ visitNode(node.argumentExpression, visitor, isExpression),
85809
85842
  classConstructor
85810
85843
  );
85811
85844
  setOriginalNode(superProperty, node.expression);
@@ -85822,7 +85855,6 @@ function transformClassFields(context) {
85822
85855
  let info;
85823
85856
  if (info = accessPrivateIdentifier(operand.name)) {
85824
85857
  const receiver = visitNode(operand.expression, visitor, isExpression);
85825
- Debug.assert(receiver);
85826
85858
  const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
85827
85859
  let expression = createPrivateIdentifierAccess(info, readExpression);
85828
85860
  const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
@@ -85859,7 +85891,7 @@ function transformClassFields(context) {
85859
85891
  getterName = setterName = operand.argumentExpression;
85860
85892
  } else {
85861
85893
  getterName = factory2.createTempVariable(hoistVariableDeclaration);
85862
- setterName = factory2.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
85894
+ setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
85863
85895
  }
85864
85896
  }
85865
85897
  if (setterName && getterName) {
@@ -85893,7 +85925,7 @@ function transformClassFields(context) {
85893
85925
  function visitExpressionStatement(node) {
85894
85926
  return factory2.updateExpressionStatement(
85895
85927
  node,
85896
- Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
85928
+ visitNode(node.expression, discardedValueVisitor, isExpression)
85897
85929
  );
85898
85930
  }
85899
85931
  function createCopiableReceiverExpr(receiver) {
@@ -85911,25 +85943,25 @@ function transformClassFields(context) {
85911
85943
  if (isCallChain(node)) {
85912
85944
  return factory2.updateCallChain(
85913
85945
  node,
85914
- factory2.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
85946
+ factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
85915
85947
  /*questionDotToken*/
85916
85948
  void 0,
85917
85949
  /*typeArguments*/
85918
85950
  void 0,
85919
- [Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
85951
+ [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
85920
85952
  );
85921
85953
  }
85922
85954
  return factory2.updateCallExpression(
85923
85955
  node,
85924
- factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
85956
+ factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
85925
85957
  /*typeArguments*/
85926
85958
  void 0,
85927
- [Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
85959
+ [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
85928
85960
  );
85929
85961
  }
85930
85962
  if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
85931
85963
  const invocation = factory2.createFunctionCallCall(
85932
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
85964
+ visitNode(node.expression, visitor, isExpression),
85933
85965
  currentClassLexicalEnvironment.classConstructor,
85934
85966
  visitNodes2(node.arguments, visitor, isExpression)
85935
85967
  );
@@ -85945,19 +85977,19 @@ function transformClassFields(context) {
85945
85977
  return factory2.updateTaggedTemplateExpression(
85946
85978
  node,
85947
85979
  factory2.createCallExpression(
85948
- factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
85980
+ factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
85949
85981
  /*typeArguments*/
85950
85982
  void 0,
85951
- [Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
85983
+ [visitNode(thisArg, visitor, isExpression)]
85952
85984
  ),
85953
85985
  /*typeArguments*/
85954
85986
  void 0,
85955
- Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
85987
+ visitNode(node.template, visitor, isTemplateLiteral)
85956
85988
  );
85957
85989
  }
85958
85990
  if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
85959
85991
  const invocation = factory2.createFunctionBindCall(
85960
- Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
85992
+ visitNode(node.tag, visitor, isExpression),
85961
85993
  currentClassLexicalEnvironment.classConstructor,
85962
85994
  []
85963
85995
  );
@@ -85968,7 +86000,7 @@ function transformClassFields(context) {
85968
86000
  invocation,
85969
86001
  /*typeArguments*/
85970
86002
  void 0,
85971
- Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
86003
+ visitNode(node.template, visitor, isTemplateLiteral)
85972
86004
  );
85973
86005
  }
85974
86006
  return visitEachChild(node, visitor, context);
@@ -85998,9 +86030,9 @@ function transformClassFields(context) {
85998
86030
  pendingExpressions = void 0;
85999
86031
  node = factory2.updateBinaryExpression(
86000
86032
  node,
86001
- Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
86033
+ visitNode(node.left, assignmentTargetVisitor),
86002
86034
  node.operatorToken,
86003
- Debug.checkDefined(visitNode(node.right, visitor, isExpression))
86035
+ visitNode(node.right, visitor)
86004
86036
  );
86005
86037
  const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
86006
86038
  pendingExpressions = savedPendingExpressions;
@@ -86025,7 +86057,7 @@ function transformClassFields(context) {
86025
86057
  node,
86026
86058
  visitInvalidSuperProperty(node.left),
86027
86059
  node.operatorToken,
86028
- Debug.checkDefined(visitNode(node.right, visitor, isExpression))
86060
+ visitNode(node.right, visitor, isExpression)
86029
86061
  );
86030
86062
  }
86031
86063
  if (classConstructor && superClassReference) {
@@ -86045,7 +86077,6 @@ function transformClassFields(context) {
86045
86077
  );
86046
86078
  setOriginalNode(superPropertyGet, node.left);
86047
86079
  setTextRange(superPropertyGet, node.left);
86048
- Debug.assert(expression);
86049
86080
  expression = factory2.createBinaryExpression(
86050
86081
  superPropertyGet,
86051
86082
  getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
@@ -86055,11 +86086,9 @@ function transformClassFields(context) {
86055
86086
  }
86056
86087
  const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
86057
86088
  if (temp) {
86058
- Debug.assert(expression);
86059
86089
  expression = factory2.createAssignment(temp, expression);
86060
86090
  setTextRange(temp, node);
86061
86091
  }
86062
- Debug.assert(expression);
86063
86092
  expression = factory2.createReflectSetCall(
86064
86093
  superClassReference,
86065
86094
  setterName,
@@ -86083,8 +86112,8 @@ function transformClassFields(context) {
86083
86112
  return visitEachChild(node, visitor, context);
86084
86113
  }
86085
86114
  function createPrivateIdentifierAssignment(info, receiver, right, operator) {
86086
- receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
86087
- right = Debug.checkDefined(visitNode(right, visitor, isExpression));
86115
+ receiver = visitNode(receiver, visitor, isExpression);
86116
+ right = visitNode(right, visitor, isExpression);
86088
86117
  if (isCompoundAssignment(operator)) {
86089
86118
  const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
86090
86119
  receiver = initializeExpression || readExpression;
@@ -86187,7 +86216,7 @@ function transformClassFields(context) {
86187
86216
  node,
86188
86217
  factory2.createAssignment(
86189
86218
  temp,
86190
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
86219
+ visitNode(node.expression, visitor, isExpression)
86191
86220
  ),
86192
86221
  /*typeArguments*/
86193
86222
  void 0
@@ -86749,7 +86778,7 @@ function transformClassFields(context) {
86749
86778
  ) : factory2.updateElementAccessExpression(
86750
86779
  node,
86751
86780
  factory2.createVoidZero(),
86752
- Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
86781
+ visitNode(node.argumentExpression, visitor, isExpression)
86753
86782
  );
86754
86783
  }
86755
86784
  function onEmitNode(hint, node, emitCallback) {
@@ -86866,7 +86895,6 @@ function transformClassFields(context) {
86866
86895
  function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
86867
86896
  if (isComputedPropertyName(name)) {
86868
86897
  const expression = visitNode(name.expression, visitor, isExpression);
86869
- Debug.assert(expression);
86870
86898
  const innerExpression = skipPartiallyEmittedExpressions(expression);
86871
86899
  const inlinable = isSimpleInlineableExpression(innerExpression);
86872
86900
  const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
@@ -87088,7 +87116,7 @@ function transformClassFields(context) {
87088
87116
  /*reservedInNestedScopes*/
87089
87117
  true
87090
87118
  );
87091
- getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
87119
+ getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
87092
87120
  }
87093
87121
  return factory2.createAssignmentTargetWrapper(
87094
87122
  parameter,
@@ -87101,7 +87129,6 @@ function transformClassFields(context) {
87101
87129
  );
87102
87130
  }
87103
87131
  function visitArrayAssignmentTarget(node) {
87104
- Debug.assertNode(node, isBindingOrAssignmentElement);
87105
87132
  const target = getTargetOfBindingOrAssignmentElement(node);
87106
87133
  if (target) {
87107
87134
  let wrapped;
@@ -87136,7 +87163,7 @@ function transformClassFields(context) {
87136
87163
  node,
87137
87164
  wrapped,
87138
87165
  node.operatorToken,
87139
- Debug.checkDefined(visitNode(node.right, visitor, isExpression))
87166
+ visitNode(node.right, visitor, isExpression)
87140
87167
  );
87141
87168
  } else if (isSpreadElement(node)) {
87142
87169
  return factory2.updateSpreadElement(node, wrapped);
@@ -87182,14 +87209,14 @@ function transformClassFields(context) {
87182
87209
  const initializer = getInitializerOfBindingOrAssignmentElement(node);
87183
87210
  return factory2.updatePropertyAssignment(
87184
87211
  node,
87185
- Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
87186
- wrapped ? initializer ? factory2.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped : Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
87212
+ visitNode(node.name, visitor, isPropertyName),
87213
+ wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
87187
87214
  );
87188
87215
  }
87189
87216
  if (isSpreadAssignment(node)) {
87190
87217
  return factory2.updateSpreadAssignment(
87191
87218
  node,
87192
- wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
87219
+ wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
87193
87220
  );
87194
87221
  }
87195
87222
  Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
@@ -87803,7 +87830,7 @@ function transformLegacyDecorators(context) {
87803
87830
  return factory2.updateConstructorDeclaration(
87804
87831
  node,
87805
87832
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
87806
- visitNodes2(node.parameters, visitor, isParameter),
87833
+ visitNodes2(node.parameters, visitor, isParameterDeclaration),
87807
87834
  visitNode(node.body, visitor, isBlock)
87808
87835
  );
87809
87836
  }
@@ -87819,12 +87846,12 @@ function transformLegacyDecorators(context) {
87819
87846
  node,
87820
87847
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
87821
87848
  node.asteriskToken,
87822
- Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
87849
+ visitNode(node.name, visitor, isPropertyName),
87823
87850
  /*questionToken*/
87824
87851
  void 0,
87825
87852
  /*typeParameters*/
87826
87853
  void 0,
87827
- visitNodes2(node.parameters, visitor, isParameter),
87854
+ visitNodes2(node.parameters, visitor, isParameterDeclaration),
87828
87855
  /*type*/
87829
87856
  void 0,
87830
87857
  visitNode(node.body, visitor, isBlock)
@@ -87834,8 +87861,8 @@ function transformLegacyDecorators(context) {
87834
87861
  return finishClassElement(factory2.updateGetAccessorDeclaration(
87835
87862
  node,
87836
87863
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
87837
- Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
87838
- visitNodes2(node.parameters, visitor, isParameter),
87864
+ visitNode(node.name, visitor, isPropertyName),
87865
+ visitNodes2(node.parameters, visitor, isParameterDeclaration),
87839
87866
  /*type*/
87840
87867
  void 0,
87841
87868
  visitNode(node.body, visitor, isBlock)
@@ -87845,8 +87872,8 @@ function transformLegacyDecorators(context) {
87845
87872
  return finishClassElement(factory2.updateSetAccessorDeclaration(
87846
87873
  node,
87847
87874
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
87848
- Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
87849
- visitNodes2(node.parameters, visitor, isParameter),
87875
+ visitNode(node.name, visitor, isPropertyName),
87876
+ visitNodes2(node.parameters, visitor, isParameterDeclaration),
87850
87877
  visitNode(node.body, visitor, isBlock)
87851
87878
  ), node);
87852
87879
  }
@@ -87857,7 +87884,7 @@ function transformLegacyDecorators(context) {
87857
87884
  return finishClassElement(factory2.updatePropertyDeclaration(
87858
87885
  node,
87859
87886
  visitNodes2(node.modifiers, modifierVisitor, isModifier),
87860
- Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
87887
+ visitNode(node.name, visitor, isPropertyName),
87861
87888
  /*questionOrExclamationToken*/
87862
87889
  void 0,
87863
87890
  /*type*/
@@ -87870,7 +87897,7 @@ function transformLegacyDecorators(context) {
87870
87897
  node,
87871
87898
  elideNodes(factory2, node.modifiers),
87872
87899
  node.dotDotDotToken,
87873
- Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
87900
+ visitNode(node.name, visitor, isBindingName),
87874
87901
  /*questionToken*/
87875
87902
  void 0,
87876
87903
  /*type*/
@@ -87967,7 +87994,7 @@ function transformLegacyDecorators(context) {
87967
87994
  return expression;
87968
87995
  }
87969
87996
  function transformDecorator(decorator) {
87970
- return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));
87997
+ return visitNode(decorator.expression, visitor, isExpression);
87971
87998
  }
87972
87999
  function transformDecoratorsOfParameter(decorators, parameterOffset) {
87973
88000
  let expressions;
@@ -88233,21 +88260,21 @@ function transformES2017(context) {
88233
88260
  node.initializer,
88234
88261
  /*hasReceiver*/
88235
88262
  true
88236
- ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
88237
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
88263
+ ) : visitNode(node.initializer, visitor, isForInitializer),
88264
+ visitNode(node.expression, visitor, isExpression),
88238
88265
  visitIterationBody(node.statement, asyncBodyVisitor, context)
88239
88266
  );
88240
88267
  }
88241
88268
  function visitForOfStatementInAsyncBody(node) {
88242
88269
  return factory2.updateForOfStatement(
88243
88270
  node,
88244
- visitNode(node.awaitModifier, visitor, isAwaitKeyword),
88271
+ visitNode(node.awaitModifier, visitor, isToken),
88245
88272
  isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
88246
88273
  node.initializer,
88247
88274
  /*hasReceiver*/
88248
88275
  true
88249
- ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
88250
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
88276
+ ) : visitNode(node.initializer, visitor, isForInitializer),
88277
+ visitNode(node.expression, visitor, isExpression),
88251
88278
  visitIterationBody(node.statement, asyncBodyVisitor, context)
88252
88279
  );
88253
88280
  }
@@ -88284,7 +88311,7 @@ function transformES2017(context) {
88284
88311
  function visitConstructorDeclaration(node) {
88285
88312
  return factory2.updateConstructorDeclaration(
88286
88313
  node,
88287
- visitNodes2(node.modifiers, visitor, isModifier),
88314
+ visitNodes2(node.modifiers, visitor, isModifierLike),
88288
88315
  visitParameterList(node.parameters, visitor, context),
88289
88316
  transformMethodBody(node)
88290
88317
  );
@@ -88342,7 +88369,7 @@ function transformES2017(context) {
88342
88369
  function visitFunctionExpression(node) {
88343
88370
  return factory2.updateFunctionExpression(
88344
88371
  node,
88345
- visitNodes2(node.modifiers, visitor, isModifier),
88372
+ visitNodes2(node.modifiers, visitor, isModifierLike),
88346
88373
  node.asteriskToken,
88347
88374
  node.name,
88348
88375
  /*typeParameters*/
@@ -88356,7 +88383,7 @@ function transformES2017(context) {
88356
88383
  function visitArrowFunction(node) {
88357
88384
  return factory2.updateArrowFunction(
88358
88385
  node,
88359
- visitNodes2(node.modifiers, visitor, isModifier),
88386
+ visitNodes2(node.modifiers, visitor, isModifierLike),
88360
88387
  /*typeParameters*/
88361
88388
  void 0,
88362
88389
  visitParameterList(node.parameters, visitor, context),
@@ -88413,7 +88440,7 @@ function transformES2017(context) {
88413
88440
  ),
88414
88441
  node
88415
88442
  );
88416
- return Debug.checkDefined(visitNode(converted, visitor, isExpression));
88443
+ return visitNode(converted, visitor, isExpression);
88417
88444
  }
88418
88445
  function collidesWithParameterName({ name }) {
88419
88446
  if (isIdentifier(name)) {
@@ -88545,7 +88572,7 @@ function transformES2017(context) {
88545
88572
  if (isBlock(body)) {
88546
88573
  return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start));
88547
88574
  } else {
88548
- return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));
88575
+ return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
88549
88576
  }
88550
88577
  }
88551
88578
  function getPromiseConstructor(type) {
@@ -88900,7 +88927,7 @@ function transformES2018(context) {
88900
88927
  return visitObjectLiteralExpression(node);
88901
88928
  case 223 /* BinaryExpression */:
88902
88929
  return visitBinaryExpression(node, expressionResultIsUnused2);
88903
- case 356 /* CommaListExpression */:
88930
+ case 357 /* CommaListExpression */:
88904
88931
  return visitCommaListExpression(node, expressionResultIsUnused2);
88905
88932
  case 295 /* CatchClause */:
88906
88933
  return visitCatchClause(node);
@@ -89658,7 +89685,7 @@ function transformES2018(context) {
89658
89685
  /*questionToken*/
89659
89686
  void 0,
89660
89687
  visitor,
89661
- isQuestionToken
89688
+ isToken
89662
89689
  ),
89663
89690
  /*typeParameters*/
89664
89691
  void 0,
@@ -90332,15 +90359,10 @@ function transformES2021(context) {
90332
90359
  if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {
90333
90360
  return node;
90334
90361
  }
90335
- switch (node.kind) {
90336
- case 223 /* BinaryExpression */:
90337
- const binaryExpression = node;
90338
- if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
90339
- return transformLogicalAssignment(binaryExpression);
90340
- }
90341
- default:
90342
- return visitEachChild(node, visitor, context);
90362
+ if (isLogicalOrCoalescingAssignmentExpression(node)) {
90363
+ return transformLogicalAssignment(node);
90343
90364
  }
90365
+ return visitEachChild(node, visitor, context);
90344
90366
  }
90345
90367
  function transformLogicalAssignment(binaryExpression) {
90346
90368
  const operator = binaryExpression.operatorToken;
@@ -90786,7 +90808,7 @@ function transformJsx(context) {
90786
90808
  return element;
90787
90809
  }
90788
90810
  function transformJsxSpreadAttributeToSpreadAssignment(node) {
90789
- return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
90811
+ return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
90790
90812
  }
90791
90813
  function transformJsxAttributesToObjectProps(attrs, children) {
90792
90814
  const target = getEmitScriptTarget(compilerOptions);
@@ -90816,7 +90838,7 @@ function transformJsx(context) {
90816
90838
  return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
90817
90839
  }
90818
90840
  function transformJsxSpreadAttributeToExpression(node) {
90819
- return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
90841
+ return visitNode(node.expression, visitor, isExpression);
90820
90842
  }
90821
90843
  function transformJsxAttributeToObjectLiteralElement(node) {
90822
90844
  const name = getAttributeName(node);
@@ -90836,7 +90858,7 @@ function transformJsx(context) {
90836
90858
  if (node.expression === void 0) {
90837
90859
  return factory2.createTrue();
90838
90860
  }
90839
- return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
90861
+ return visitNode(node.expression, visitor, isExpression);
90840
90862
  }
90841
90863
  if (isJsxElement(node)) {
90842
90864
  return visitJsxElement(
@@ -91478,7 +91500,7 @@ function transformES2015(context) {
91478
91500
  return visitParenthesizedExpression(node, expressionResultIsUnused2);
91479
91501
  case 223 /* BinaryExpression */:
91480
91502
  return visitBinaryExpression(node, expressionResultIsUnused2);
91481
- case 356 /* CommaListExpression */:
91503
+ case 357 /* CommaListExpression */:
91482
91504
  return visitCommaListExpression(node, expressionResultIsUnused2);
91483
91505
  case 14 /* NoSubstitutionTemplateLiteral */:
91484
91506
  case 15 /* TemplateHead */:
@@ -91581,7 +91603,7 @@ function transformES2015(context) {
91581
91603
  [
91582
91604
  factory2.createPropertyAssignment(
91583
91605
  factory2.createIdentifier("value"),
91584
- node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()
91606
+ node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
91585
91607
  )
91586
91608
  ]
91587
91609
  )
@@ -91752,7 +91774,7 @@ function transformES2015(context) {
91752
91774
  outer,
91753
91775
  /*typeArguments*/
91754
91776
  void 0,
91755
- extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []
91777
+ extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
91756
91778
  )
91757
91779
  );
91758
91780
  addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
@@ -92094,7 +92116,7 @@ function transformES2015(context) {
92094
92116
  factory2.createExpressionStatement(
92095
92117
  factory2.createAssignment(
92096
92118
  factory2.getGeneratedNameForNode(parameter),
92097
- Debug.checkDefined(visitNode(initializer, visitor, isExpression))
92119
+ visitNode(initializer, visitor, isExpression)
92098
92120
  )
92099
92121
  ),
92100
92122
  2097152 /* CustomPrologue */
@@ -92105,7 +92127,7 @@ function transformES2015(context) {
92105
92127
  return false;
92106
92128
  }
92107
92129
  function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
92108
- initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
92130
+ initializer = visitNode(initializer, visitor, isExpression);
92109
92131
  const statement = factory2.createIfStatement(
92110
92132
  factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
92111
92133
  setEmitFlags(
@@ -92381,7 +92403,6 @@ function transformES2015(context) {
92381
92403
  container
92382
92404
  );
92383
92405
  const propertyName = visitNode(member.name, visitor, isPropertyName);
92384
- Debug.assert(propertyName);
92385
92406
  let e;
92386
92407
  if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
92387
92408
  const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
@@ -92425,7 +92446,6 @@ function transformES2015(context) {
92425
92446
  setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
92426
92447
  setSourceMapRange(target, firstAccessor.name);
92427
92448
  const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
92428
- Debug.assert(visitedAccessorName);
92429
92449
  if (isPrivateIdentifier(visitedAccessorName)) {
92430
92450
  return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
92431
92451
  }
@@ -92698,9 +92718,9 @@ function transformES2015(context) {
92698
92718
  if (node.operatorToken.kind === 27 /* CommaToken */) {
92699
92719
  return factory2.updateBinaryExpression(
92700
92720
  node,
92701
- Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),
92721
+ visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
92702
92722
  node.operatorToken,
92703
- Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))
92723
+ visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
92704
92724
  );
92705
92725
  }
92706
92726
  return visitEachChild(node, visitor, context);
@@ -92715,7 +92735,6 @@ function transformES2015(context) {
92715
92735
  const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
92716
92736
  if (result || visited !== element) {
92717
92737
  result || (result = node.elements.slice(0, i));
92718
- Debug.assert(visited);
92719
92738
  result.push(visited);
92720
92739
  }
92721
92740
  }
@@ -92742,7 +92761,7 @@ function transformES2015(context) {
92742
92761
  0 /* All */
92743
92762
  );
92744
92763
  } else {
92745
- assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));
92764
+ assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
92746
92765
  setTextRange(assignment, decl);
92747
92766
  }
92748
92767
  assignments = append(assignments, assignment);
@@ -92764,7 +92783,7 @@ function transformES2015(context) {
92764
92783
  if (node.flags & 3 /* BlockScoped */) {
92765
92784
  enableSubstitutionsForBlockScopedBindings();
92766
92785
  }
92767
- const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration);
92786
+ const declarations = flatMap(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration);
92768
92787
  const declarationList = factory2.createVariableDeclarationList(declarations);
92769
92788
  setOriginalNode(declarationList, node);
92770
92789
  setTextRange(declarationList, node);
@@ -92848,7 +92867,7 @@ function transformES2015(context) {
92848
92867
  statement,
92849
92868
  /*outermostLabeledStatement*/
92850
92869
  node
92851
- ) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel);
92870
+ ) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
92852
92871
  }
92853
92872
  function visitIterationStatement(node, outermostLabeledStatement) {
92854
92873
  switch (node.kind) {
@@ -92891,7 +92910,7 @@ function transformES2015(context) {
92891
92910
  visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
92892
92911
  visitNode(node.condition, visitor, isExpression),
92893
92912
  visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
92894
- Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
92913
+ visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
92895
92914
  );
92896
92915
  }
92897
92916
  function visitForInStatement(node, outermostLabeledStatement) {
@@ -92977,14 +92996,13 @@ function transformES2015(context) {
92977
92996
  )));
92978
92997
  } else {
92979
92998
  setTextRangeEnd(assignment, initializer.end);
92980
- statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));
92999
+ statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
92981
93000
  }
92982
93001
  }
92983
93002
  if (convertedLoopBodyStatements) {
92984
93003
  return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
92985
93004
  } else {
92986
93005
  const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
92987
- Debug.assert(statement);
92988
93006
  if (isBlock(statement)) {
92989
93007
  return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
92990
93008
  } else {
@@ -93005,7 +93023,6 @@ function transformES2015(context) {
93005
93023
  }
93006
93024
  function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
93007
93025
  const expression = visitNode(node.expression, visitor, isExpression);
93008
- Debug.assert(expression);
93009
93026
  const counter = factory2.createLoopVariable();
93010
93027
  const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
93011
93028
  /*recordTempVariable*/
@@ -93065,7 +93082,6 @@ function transformES2015(context) {
93065
93082
  }
93066
93083
  function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
93067
93084
  const expression = visitNode(node.expression, visitor, isExpression);
93068
- Debug.assert(expression);
93069
93085
  const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
93070
93086
  /*recordTempVariable*/
93071
93087
  void 0
@@ -93323,7 +93339,7 @@ function transformES2015(context) {
93323
93339
  loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
93324
93340
  }
93325
93341
  } else {
93326
- const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));
93342
+ const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
93327
93343
  loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
93328
93344
  }
93329
93345
  statements.push(loop);
@@ -93361,16 +93377,16 @@ function transformES2015(context) {
93361
93377
  node,
93362
93378
  /*awaitModifier*/
93363
93379
  void 0,
93364
- Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
93365
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
93380
+ visitNode(node.initializer, visitor, isForInitializer),
93381
+ visitNode(node.expression, visitor, isExpression),
93366
93382
  convertedLoopBody
93367
93383
  );
93368
93384
  }
93369
93385
  function convertForInStatement(node, convertedLoopBody) {
93370
93386
  return factory2.updateForInStatement(
93371
93387
  node,
93372
- Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
93373
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
93388
+ visitNode(node.initializer, visitor, isForInitializer),
93389
+ visitNode(node.expression, visitor, isExpression),
93374
93390
  convertedLoopBody
93375
93391
  );
93376
93392
  }
@@ -93378,13 +93394,13 @@ function transformES2015(context) {
93378
93394
  return factory2.updateDoStatement(
93379
93395
  node,
93380
93396
  convertedLoopBody,
93381
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
93397
+ visitNode(node.expression, visitor, isExpression)
93382
93398
  );
93383
93399
  }
93384
93400
  function convertWhileStatement(node, convertedLoopBody) {
93385
93401
  return factory2.updateWhileStatement(
93386
93402
  node,
93387
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
93403
+ visitNode(node.expression, visitor, isExpression),
93388
93404
  convertedLoopBody
93389
93405
  );
93390
93406
  }
@@ -93546,7 +93562,7 @@ function transformES2015(context) {
93546
93562
  void 0,
93547
93563
  /*type*/
93548
93564
  void 0,
93549
- Debug.checkDefined(visitNode(
93565
+ visitNode(
93550
93566
  factory2.createBlock(
93551
93567
  statements,
93552
93568
  /*multiLine*/
@@ -93554,7 +93570,7 @@ function transformES2015(context) {
93554
93570
  ),
93555
93571
  visitor,
93556
93572
  isBlock
93557
- ))
93573
+ )
93558
93574
  ),
93559
93575
  emitFlags
93560
93576
  )
@@ -93577,7 +93593,7 @@ function transformES2015(context) {
93577
93593
  if (node.incrementor) {
93578
93594
  statements.push(factory2.createIfStatement(
93579
93595
  currentState.conditionVariable,
93580
- factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),
93596
+ factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
93581
93597
  factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
93582
93598
  ));
93583
93599
  } else {
@@ -93588,12 +93604,11 @@ function transformES2015(context) {
93588
93604
  }
93589
93605
  if (shouldConvertConditionOfForStatement(node)) {
93590
93606
  statements.push(factory2.createIfStatement(
93591
- factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),
93592
- Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))
93607
+ factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
93608
+ visitNode(factory2.createBreakStatement(), visitor, isStatement)
93593
93609
  ));
93594
93610
  }
93595
93611
  }
93596
- Debug.assert(statement);
93597
93612
  if (isBlock(statement)) {
93598
93613
  addRange(statements, statement.statements);
93599
93614
  } else {
@@ -93861,9 +93876,9 @@ function transformES2015(context) {
93861
93876
  createMemberAccessForPropertyName(
93862
93877
  factory2,
93863
93878
  receiver,
93864
- Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
93879
+ visitNode(property.name, visitor, isPropertyName)
93865
93880
  ),
93866
- Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))
93881
+ visitNode(property.initializer, visitor, isExpression)
93867
93882
  );
93868
93883
  setTextRange(expression, property);
93869
93884
  if (startsOnNewLine) {
@@ -93876,7 +93891,7 @@ function transformES2015(context) {
93876
93891
  createMemberAccessForPropertyName(
93877
93892
  factory2,
93878
93893
  receiver,
93879
- Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
93894
+ visitNode(property.name, visitor, isPropertyName)
93880
93895
  ),
93881
93896
  factory2.cloneNode(property.name)
93882
93897
  );
@@ -93891,7 +93906,7 @@ function transformES2015(context) {
93891
93906
  createMemberAccessForPropertyName(
93892
93907
  factory2,
93893
93908
  receiver,
93894
- Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))
93909
+ visitNode(method.name, visitor, isPropertyName)
93895
93910
  ),
93896
93911
  transformFunctionLikeToExpression(
93897
93912
  method,
@@ -94025,7 +94040,7 @@ function transformES2015(context) {
94025
94040
  }
94026
94041
  return factory2.updateCallExpression(
94027
94042
  node,
94028
- Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),
94043
+ visitNode(node.expression, callExpressionVisitor, isExpression),
94029
94044
  /*typeArguments*/
94030
94045
  void 0,
94031
94046
  visitNodes2(node.arguments, visitor, isExpression)
@@ -94137,8 +94152,8 @@ function transformES2015(context) {
94137
94152
  let resultingCall;
94138
94153
  if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
94139
94154
  resultingCall = factory2.createFunctionApplyCall(
94140
- Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
94141
- node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
94155
+ visitNode(target, callExpressionVisitor, isExpression),
94156
+ node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
94142
94157
  transformAndSpreadElements(
94143
94158
  node.arguments,
94144
94159
  /*isArgumentList*/
@@ -94152,8 +94167,8 @@ function transformES2015(context) {
94152
94167
  } else {
94153
94168
  resultingCall = setTextRange(
94154
94169
  factory2.createFunctionCallCall(
94155
- Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
94156
- node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
94170
+ visitNode(target, callExpressionVisitor, isExpression),
94171
+ node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
94157
94172
  visitNodes2(node.arguments, visitor, isExpression)
94158
94173
  ),
94159
94174
  node
@@ -94175,7 +94190,7 @@ function transformES2015(context) {
94175
94190
  const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
94176
94191
  return factory2.createNewExpression(
94177
94192
  factory2.createFunctionApplyCall(
94178
- Debug.checkDefined(visitNode(target, visitor, isExpression)),
94193
+ visitNode(target, visitor, isExpression),
94179
94194
  thisArg,
94180
94195
  transformAndSpreadElements(
94181
94196
  factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
@@ -94232,9 +94247,7 @@ function transformES2015(context) {
94232
94247
  return map(chunk, visitExpressionOfSpread);
94233
94248
  }
94234
94249
  function visitExpressionOfSpread(node) {
94235
- Debug.assertNode(node, isSpreadElement);
94236
94250
  let expression = visitNode(node.expression, visitor, isExpression);
94237
- Debug.assert(expression);
94238
94251
  const isCallToReadHelper = isCallToHelper(expression, "___read");
94239
94252
  let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
94240
94253
  if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
@@ -94285,7 +94298,7 @@ function transformES2015(context) {
94285
94298
  function visitTemplateExpression(node) {
94286
94299
  let expression = factory2.createStringLiteral(node.head.text);
94287
94300
  for (const span of node.templateSpans) {
94288
- const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];
94301
+ const args = [visitNode(span.expression, visitor, isExpression)];
94289
94302
  if (span.literal.text.length > 0) {
94290
94303
  args.push(factory2.createStringLiteral(span.literal.text));
94291
94304
  }
@@ -94639,7 +94652,7 @@ function transformGenerators(context) {
94639
94652
  switch (node.kind) {
94640
94653
  case 223 /* BinaryExpression */:
94641
94654
  return visitBinaryExpression(node);
94642
- case 356 /* CommaListExpression */:
94655
+ case 357 /* CommaListExpression */:
94643
94656
  return visitCommaListExpression(node);
94644
94657
  case 224 /* ConditionalExpression */:
94645
94658
  return visitConditionalExpression(node);
@@ -94851,19 +94864,19 @@ function transformGenerators(context) {
94851
94864
  case 208 /* PropertyAccessExpression */:
94852
94865
  target = factory2.updatePropertyAccessExpression(
94853
94866
  left,
94854
- cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
94867
+ cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
94855
94868
  left.name
94856
94869
  );
94857
94870
  break;
94858
94871
  case 209 /* ElementAccessExpression */:
94859
94872
  target = factory2.updateElementAccessExpression(
94860
94873
  left,
94861
- cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
94862
- cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))
94874
+ cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
94875
+ cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
94863
94876
  );
94864
94877
  break;
94865
94878
  default:
94866
- target = Debug.checkDefined(visitNode(left, visitor, isExpression));
94879
+ target = visitNode(left, visitor, isExpression);
94867
94880
  break;
94868
94881
  }
94869
94882
  const operator = node.operatorToken.kind;
@@ -94875,7 +94888,7 @@ function transformGenerators(context) {
94875
94888
  factory2.createBinaryExpression(
94876
94889
  cacheExpression(target),
94877
94890
  getNonAssignmentOperatorForCompoundAssignment(operator),
94878
- Debug.checkDefined(visitNode(right, visitor, isExpression))
94891
+ visitNode(right, visitor, isExpression)
94879
94892
  ),
94880
94893
  node
94881
94894
  )
@@ -94883,7 +94896,7 @@ function transformGenerators(context) {
94883
94896
  node
94884
94897
  );
94885
94898
  } else {
94886
- return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));
94899
+ return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
94887
94900
  }
94888
94901
  }
94889
94902
  return visitEachChild(node, visitor, context);
@@ -94897,9 +94910,9 @@ function transformGenerators(context) {
94897
94910
  }
94898
94911
  return factory2.updateBinaryExpression(
94899
94912
  node,
94900
- cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))),
94913
+ cacheExpression(visitNode(node.left, visitor, isExpression)),
94901
94914
  node.operatorToken,
94902
- Debug.checkDefined(visitNode(node.right, visitor, isExpression))
94915
+ visitNode(node.right, visitor, isExpression)
94903
94916
  );
94904
94917
  }
94905
94918
  return visitEachChild(node, visitor, context);
@@ -94918,7 +94931,7 @@ function transformGenerators(context) {
94918
94931
  emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
94919
94932
  pendingExpressions = [];
94920
94933
  }
94921
- pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));
94934
+ pendingExpressions.push(visitNode(node2, visitor, isExpression));
94922
94935
  }
94923
94936
  }
94924
94937
  }
@@ -94932,7 +94945,7 @@ function transformGenerators(context) {
94932
94945
  emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
94933
94946
  pendingExpressions = [];
94934
94947
  }
94935
- pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));
94948
+ pendingExpressions.push(visitNode(elem, visitor, isExpression));
94936
94949
  }
94937
94950
  }
94938
94951
  return factory2.inlineExpressions(pendingExpressions);
@@ -94942,7 +94955,7 @@ function transformGenerators(context) {
94942
94955
  const resultLocal = declareLocal();
94943
94956
  emitAssignment(
94944
94957
  resultLocal,
94945
- Debug.checkDefined(visitNode(node.left, visitor, isExpression)),
94958
+ visitNode(node.left, visitor, isExpression),
94946
94959
  /*location*/
94947
94960
  node.left
94948
94961
  );
@@ -94963,7 +94976,7 @@ function transformGenerators(context) {
94963
94976
  }
94964
94977
  emitAssignment(
94965
94978
  resultLocal,
94966
- Debug.checkDefined(visitNode(node.right, visitor, isExpression)),
94979
+ visitNode(node.right, visitor, isExpression),
94967
94980
  /*location*/
94968
94981
  node.right
94969
94982
  );
@@ -94977,13 +94990,13 @@ function transformGenerators(context) {
94977
94990
  const resultLocal = declareLocal();
94978
94991
  emitBreakWhenFalse(
94979
94992
  whenFalseLabel,
94980
- Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),
94993
+ visitNode(node.condition, visitor, isExpression),
94981
94994
  /*location*/
94982
94995
  node.condition
94983
94996
  );
94984
94997
  emitAssignment(
94985
94998
  resultLocal,
94986
- Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),
94999
+ visitNode(node.whenTrue, visitor, isExpression),
94987
95000
  /*location*/
94988
95001
  node.whenTrue
94989
95002
  );
@@ -94991,7 +95004,7 @@ function transformGenerators(context) {
94991
95004
  markLabel(whenFalseLabel);
94992
95005
  emitAssignment(
94993
95006
  resultLocal,
94994
- Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),
95007
+ visitNode(node.whenFalse, visitor, isExpression),
94995
95008
  /*location*/
94996
95009
  node.whenFalse
94997
95010
  );
@@ -95071,7 +95084,7 @@ function transformGenerators(context) {
95071
95084
  leadingElement = void 0;
95072
95085
  expressions2 = [];
95073
95086
  }
95074
- expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));
95087
+ expressions2.push(visitNode(element, visitor, isExpression));
95075
95088
  return expressions2;
95076
95089
  }
95077
95090
  }
@@ -95110,8 +95123,8 @@ function transformGenerators(context) {
95110
95123
  if (containsYield(node.argumentExpression)) {
95111
95124
  return factory2.updateElementAccessExpression(
95112
95125
  node,
95113
- cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))),
95114
- Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
95126
+ cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
95127
+ visitNode(node.argumentExpression, visitor, isExpression)
95115
95128
  );
95116
95129
  }
95117
95130
  return visitEachChild(node, visitor, context);
@@ -95128,7 +95141,7 @@ function transformGenerators(context) {
95128
95141
  return setOriginalNode(
95129
95142
  setTextRange(
95130
95143
  factory2.createFunctionApplyCall(
95131
- cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),
95144
+ cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
95132
95145
  thisArg,
95133
95146
  visitElements(node.arguments)
95134
95147
  ),
@@ -95146,7 +95159,7 @@ function transformGenerators(context) {
95146
95159
  setTextRange(
95147
95160
  factory2.createNewExpression(
95148
95161
  factory2.createFunctionApplyCall(
95149
- cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),
95162
+ cacheExpression(visitNode(target, visitor, isExpression)),
95150
95163
  thisArg,
95151
95164
  visitElements(
95152
95165
  node.arguments,
@@ -95262,7 +95275,7 @@ function transformGenerators(context) {
95262
95275
  return setSourceMapRange(
95263
95276
  factory2.createAssignment(
95264
95277
  setSourceMapRange(factory2.cloneNode(node.name), node.name),
95265
- Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
95278
+ visitNode(node.initializer, visitor, isExpression)
95266
95279
  ),
95267
95280
  node
95268
95281
  );
@@ -95274,7 +95287,7 @@ function transformGenerators(context) {
95274
95287
  const elseLabel = node.elseStatement ? defineLabel() : void 0;
95275
95288
  emitBreakWhenFalse(
95276
95289
  node.elseStatement ? elseLabel : endLabel,
95277
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
95290
+ visitNode(node.expression, visitor, isExpression),
95278
95291
  /*location*/
95279
95292
  node.expression
95280
95293
  );
@@ -95303,7 +95316,7 @@ function transformGenerators(context) {
95303
95316
  markLabel(loopLabel);
95304
95317
  transformAndEmitEmbeddedStatement(node.statement);
95305
95318
  markLabel(conditionLabel);
95306
- emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
95319
+ emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
95307
95320
  endLoopBlock();
95308
95321
  } else {
95309
95322
  emitStatement(visitNode(node, visitor, isStatement));
@@ -95324,7 +95337,7 @@ function transformGenerators(context) {
95324
95337
  const loopLabel = defineLabel();
95325
95338
  const endLabel = beginLoopBlock(loopLabel);
95326
95339
  markLabel(loopLabel);
95327
- emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
95340
+ emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
95328
95341
  transformAndEmitEmbeddedStatement(node.statement);
95329
95342
  emitBreak(loopLabel);
95330
95343
  endLoopBlock();
@@ -95355,7 +95368,7 @@ function transformGenerators(context) {
95355
95368
  emitStatement(
95356
95369
  setTextRange(
95357
95370
  factory2.createExpressionStatement(
95358
- Debug.checkDefined(visitNode(initializer, visitor, isExpression))
95371
+ visitNode(initializer, visitor, isExpression)
95359
95372
  ),
95360
95373
  initializer
95361
95374
  )
@@ -95364,7 +95377,7 @@ function transformGenerators(context) {
95364
95377
  }
95365
95378
  markLabel(conditionLabel);
95366
95379
  if (node.condition) {
95367
- emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));
95380
+ emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
95368
95381
  }
95369
95382
  transformAndEmitEmbeddedStatement(node.statement);
95370
95383
  markLabel(incrementLabel);
@@ -95372,7 +95385,7 @@ function transformGenerators(context) {
95372
95385
  emitStatement(
95373
95386
  setTextRange(
95374
95387
  factory2.createExpressionStatement(
95375
- Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))
95388
+ visitNode(node.incrementor, visitor, isExpression)
95376
95389
  ),
95377
95390
  node.incrementor
95378
95391
  )
@@ -95417,7 +95430,7 @@ function transformGenerators(context) {
95417
95430
  const keysIndex = factory2.createLoopVariable();
95418
95431
  const initializer = node.initializer;
95419
95432
  hoistVariableDeclaration(keysIndex);
95420
- emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
95433
+ emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
95421
95434
  emitAssignment(keysArray, factory2.createArrayLiteralExpression());
95422
95435
  emitStatement(
95423
95436
  factory2.createForInStatement(
@@ -95448,7 +95461,7 @@ function transformGenerators(context) {
95448
95461
  }
95449
95462
  variable = factory2.cloneNode(initializer.declarations[0].name);
95450
95463
  } else {
95451
- variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
95464
+ variable = visitNode(initializer, visitor, isExpression);
95452
95465
  Debug.assert(isLeftHandSideExpression(variable));
95453
95466
  }
95454
95467
  emitAssignment(variable, key);
@@ -95473,8 +95486,8 @@ function transformGenerators(context) {
95473
95486
  node = factory2.updateForInStatement(
95474
95487
  node,
95475
95488
  initializer.declarations[0].name,
95476
- Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
95477
- Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
95489
+ visitNode(node.expression, visitor, isExpression),
95490
+ visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
95478
95491
  );
95479
95492
  } else {
95480
95493
  node = visitEachChild(node, visitor, context);
@@ -95550,7 +95563,7 @@ function transformGenerators(context) {
95550
95563
  }
95551
95564
  function transformAndEmitWithStatement(node) {
95552
95565
  if (containsYield(node)) {
95553
- beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
95566
+ beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
95554
95567
  transformAndEmitEmbeddedStatement(node.statement);
95555
95568
  endWithBlock();
95556
95569
  } else {
@@ -95562,7 +95575,7 @@ function transformGenerators(context) {
95562
95575
  const caseBlock = node.caseBlock;
95563
95576
  const numClauses = caseBlock.clauses.length;
95564
95577
  const endLabel = beginSwitchBlock();
95565
- const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
95578
+ const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
95566
95579
  const clauseLabels = [];
95567
95580
  let defaultClauseIndex = -1;
95568
95581
  for (let i = 0; i < numClauses; i++) {
@@ -95584,7 +95597,7 @@ function transformGenerators(context) {
95584
95597
  }
95585
95598
  pendingClauses.push(
95586
95599
  factory2.createCaseClause(
95587
- Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),
95600
+ visitNode(clause.expression, visitor, isExpression),
95588
95601
  [
95589
95602
  createInlineBreak(
95590
95603
  clauseLabels[i],
@@ -95654,7 +95667,7 @@ function transformGenerators(context) {
95654
95667
  function transformAndEmitThrowStatement(node) {
95655
95668
  var _a2;
95656
95669
  emitThrow(
95657
- Debug.checkDefined(visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression)),
95670
+ visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
95658
95671
  /*location*/
95659
95672
  node
95660
95673
  );
@@ -96938,7 +96951,7 @@ function transformModule(context) {
96938
96951
  }
96939
96952
  function addExportEqualsIfNeeded(statements, emitAsReturn) {
96940
96953
  if (currentModuleInfo.exportEquals) {
96941
- const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);
96954
+ const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
96942
96955
  if (expressionResult) {
96943
96956
  if (emitAsReturn) {
96944
96957
  const statement = factory2.createReturnStatement(expressionResult);
@@ -96978,9 +96991,9 @@ function transformModule(context) {
96978
96991
  return visitFunctionDeclaration(node);
96979
96992
  case 260 /* ClassDeclaration */:
96980
96993
  return visitClassDeclaration(node);
96981
- case 357 /* MergeDeclarationMarker */:
96994
+ case 358 /* MergeDeclarationMarker */:
96982
96995
  return visitMergeDeclarationMarker(node);
96983
- case 358 /* EndOfDeclarationMarker */:
96996
+ case 359 /* EndOfDeclarationMarker */:
96984
96997
  return visitEndOfDeclarationMarker(node);
96985
96998
  default:
96986
96999
  return visitor(node);
@@ -96997,7 +97010,7 @@ function transformModule(context) {
96997
97010
  return visitExpressionStatement(node);
96998
97011
  case 214 /* ParenthesizedExpression */:
96999
97012
  return visitParenthesizedExpression(node, valueIsDiscarded);
97000
- case 355 /* PartiallyEmittedExpression */:
97013
+ case 356 /* PartiallyEmittedExpression */:
97001
97014
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
97002
97015
  case 210 /* CallExpression */:
97003
97016
  if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
@@ -97133,7 +97146,7 @@ function transformModule(context) {
97133
97146
  }
97134
97147
  function visitImportCallExpression(node) {
97135
97148
  const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
97136
- const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
97149
+ const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
97137
97150
  const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
97138
97151
  const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
97139
97152
  switch (compilerOptions.module) {
@@ -97662,7 +97675,7 @@ function transformModule(context) {
97662
97675
  deferredExports[id] = appendExportStatement(
97663
97676
  deferredExports[id],
97664
97677
  factory2.createIdentifier("default"),
97665
- visitNode(node.expression, visitor, isExpression),
97678
+ visitNode(node.expression, visitor),
97666
97679
  /*location*/
97667
97680
  node,
97668
97681
  /*allowComments*/
@@ -97672,7 +97685,7 @@ function transformModule(context) {
97672
97685
  statements = appendExportStatement(
97673
97686
  statements,
97674
97687
  factory2.createIdentifier("default"),
97675
- visitNode(node.expression, visitor, isExpression),
97688
+ visitNode(node.expression, visitor),
97676
97689
  /*location*/
97677
97690
  node,
97678
97691
  /*allowComments*/
@@ -97700,7 +97713,7 @@ function transformModule(context) {
97700
97713
  ),
97701
97714
  /*typeParameters*/
97702
97715
  void 0,
97703
- visitNodes2(node.parameters, visitor, isParameter),
97716
+ visitNodes2(node.parameters, visitor),
97704
97717
  /*type*/
97705
97718
  void 0,
97706
97719
  visitEachChild(node.body, visitor, context)
@@ -97741,8 +97754,8 @@ function transformModule(context) {
97741
97754
  ),
97742
97755
  /*typeParameters*/
97743
97756
  void 0,
97744
- visitNodes2(node.heritageClauses, visitor, isHeritageClause),
97745
- visitNodes2(node.members, visitor, isClassElement)
97757
+ visitNodes2(node.heritageClauses, visitor),
97758
+ visitNodes2(node.members, visitor)
97746
97759
  ),
97747
97760
  node
97748
97761
  ),
@@ -97790,7 +97803,7 @@ function transformModule(context) {
97790
97803
  variable.name,
97791
97804
  variable.exclamationToken,
97792
97805
  variable.type,
97793
- visitNode(variable.initializer, visitor, isExpression)
97806
+ visitNode(variable.initializer, visitor)
97794
97807
  );
97795
97808
  variables = append(variables, updatedVariable);
97796
97809
  expressions = append(expressions, expression);
@@ -97841,8 +97854,9 @@ function transformModule(context) {
97841
97854
  function transformInitializedVariable(node) {
97842
97855
  if (isBindingPattern(node.name)) {
97843
97856
  return flattenDestructuringAssignment(
97844
- visitNode(node, visitor, isInitializedVariable),
97845
- visitor,
97857
+ visitNode(node, visitor),
97858
+ /*visitor*/
97859
+ void 0,
97846
97860
  context,
97847
97861
  0 /* All */,
97848
97862
  /*needsValue*/
@@ -97859,7 +97873,7 @@ function transformModule(context) {
97859
97873
  /*location*/
97860
97874
  node.name
97861
97875
  ),
97862
- node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()
97876
+ node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
97863
97877
  );
97864
97878
  }
97865
97879
  }
@@ -98802,7 +98816,7 @@ function transformSystemModule(context) {
98802
98816
  ),
98803
98817
  /*typeParameters*/
98804
98818
  void 0,
98805
- visitNodes2(node.parameters, visitor, isParameter),
98819
+ visitNodes2(node.parameters, visitor, isParameterDeclaration),
98806
98820
  /*type*/
98807
98821
  void 0,
98808
98822
  visitNode(node.body, visitor, isBlock)
@@ -99112,9 +99126,9 @@ function transformSystemModule(context) {
99112
99126
  return visitCatchClause(node);
99113
99127
  case 238 /* Block */:
99114
99128
  return visitBlock(node);
99115
- case 357 /* MergeDeclarationMarker */:
99129
+ case 358 /* MergeDeclarationMarker */:
99116
99130
  return visitMergeDeclarationMarker(node);
99117
- case 358 /* EndOfDeclarationMarker */:
99131
+ case 359 /* EndOfDeclarationMarker */:
99118
99132
  return visitEndOfDeclarationMarker(node);
99119
99133
  default:
99120
99134
  return visitor(node);
@@ -99176,7 +99190,7 @@ function transformSystemModule(context) {
99176
99190
  }
99177
99191
  return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
99178
99192
  } else {
99179
- return visitNode(node, discardedValueVisitor, isForInitializer);
99193
+ return visitNode(node, discardedValueVisitor, isExpression);
99180
99194
  }
99181
99195
  }
99182
99196
  function visitDoStatement(node) {
@@ -99197,21 +99211,21 @@ function transformSystemModule(context) {
99197
99211
  return factory2.updateLabeledStatement(
99198
99212
  node,
99199
99213
  node.label,
99200
- Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
99214
+ visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
99201
99215
  );
99202
99216
  }
99203
99217
  function visitWithStatement(node) {
99204
99218
  return factory2.updateWithStatement(
99205
99219
  node,
99206
99220
  visitNode(node.expression, visitor, isExpression),
99207
- Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
99221
+ visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
99208
99222
  );
99209
99223
  }
99210
99224
  function visitSwitchStatement(node) {
99211
99225
  return factory2.updateSwitchStatement(
99212
99226
  node,
99213
99227
  visitNode(node.expression, visitor, isExpression),
99214
- Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
99228
+ visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
99215
99229
  );
99216
99230
  }
99217
99231
  function visitCaseBlock(node) {
@@ -99243,7 +99257,7 @@ function transformSystemModule(context) {
99243
99257
  node = factory2.updateCatchClause(
99244
99258
  node,
99245
99259
  node.variableDeclaration,
99246
- Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
99260
+ visitNode(node.block, topLevelNestedVisitor, isBlock)
99247
99261
  );
99248
99262
  enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
99249
99263
  return node;
@@ -99270,7 +99284,7 @@ function transformSystemModule(context) {
99270
99284
  return visitExpressionStatement(node);
99271
99285
  case 214 /* ParenthesizedExpression */:
99272
99286
  return visitParenthesizedExpression(node, valueIsDiscarded);
99273
- case 355 /* PartiallyEmittedExpression */:
99287
+ case 356 /* PartiallyEmittedExpression */:
99274
99288
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
99275
99289
  case 223 /* BinaryExpression */:
99276
99290
  if (isDestructuringAssignment(node)) {
@@ -99313,7 +99327,7 @@ function transformSystemModule(context) {
99313
99327
  }
99314
99328
  function visitImportCallExpression(node) {
99315
99329
  const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
99316
- const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
99330
+ const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
99317
99331
  const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
99318
99332
  return factory2.createCallExpression(
99319
99333
  factory2.createPropertyAccessExpression(
@@ -100434,7 +100448,7 @@ function transformDeclarations(context) {
100434
100448
  sourceFile,
100435
100449
  /*bundled*/
100436
100450
  true
100437
- )) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
100451
+ )) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
100438
100452
  const newFile = factory2.updateSourceFile(
100439
100453
  sourceFile,
100440
100454
  [factory2.createModuleDeclaration(
@@ -100456,7 +100470,7 @@ function transformDeclarations(context) {
100456
100470
  return newFile;
100457
100471
  }
100458
100472
  needsDeclare = true;
100459
- const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
100473
+ const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
100460
100474
  return factory2.updateSourceFile(
100461
100475
  sourceFile,
100462
100476
  transformAndReplaceLatePaintedStatements(updated2),
@@ -100525,7 +100539,7 @@ function transformDeclarations(context) {
100525
100539
  refs.forEach(referenceVisitor);
100526
100540
  emittedImports = filter(combinedStatements, isAnyImportSyntax);
100527
100541
  } else {
100528
- const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);
100542
+ const statements = visitNodes2(node.statements, visitDeclarationStatements);
100529
100543
  combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
100530
100544
  refs.forEach(referenceVisitor);
100531
100545
  emittedImports = filter(combinedStatements, isAnyImportSyntax);
@@ -100642,9 +100656,9 @@ function transformDeclarations(context) {
100642
100656
  return name;
100643
100657
  } else {
100644
100658
  if (name.kind === 204 /* ArrayBindingPattern */) {
100645
- return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
100659
+ return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
100646
100660
  } else {
100647
- return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
100661
+ return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
100648
100662
  }
100649
100663
  }
100650
100664
  function visitBindingElement(elem) {
@@ -100714,10 +100728,10 @@ function transformDeclarations(context) {
100714
100728
  }
100715
100729
  const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
100716
100730
  if (type && !shouldUseResolverType) {
100717
- return visitNode(type, visitDeclarationSubtree, isTypeNode);
100731
+ return visitNode(type, visitDeclarationSubtree);
100718
100732
  }
100719
100733
  if (!getParseTreeNode(node)) {
100720
- return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
100734
+ return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
100721
100735
  }
100722
100736
  if (node.kind === 175 /* SetAccessor */) {
100723
100737
  return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
@@ -100831,7 +100845,7 @@ function transformDeclarations(context) {
100831
100845
  return factory2.createNodeArray(newParams || emptyArray);
100832
100846
  }
100833
100847
  function ensureTypeParams(node, params) {
100834
- return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
100848
+ return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
100835
100849
  }
100836
100850
  function isEnclosingDeclaration(node) {
100837
100851
  return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
@@ -100966,7 +100980,7 @@ function transformDeclarations(context) {
100966
100980
  needsDeclare = priorNeedsDeclare;
100967
100981
  lateStatementReplacementMap.set(getOriginalNodeId(i), result);
100968
100982
  }
100969
- return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
100983
+ return visitNodes2(statements, visitLateVisibilityMarkedStatements);
100970
100984
  function visitLateVisibilityMarkedStatements(statement) {
100971
100985
  if (isLateVisibilityPaintedStatement(statement)) {
100972
100986
  const key = getOriginalNodeId(statement);
@@ -101180,7 +101194,7 @@ function transformDeclarations(context) {
101180
101194
  input,
101181
101195
  ensureModifiers(input),
101182
101196
  updateParamsList(input, input.parameters),
101183
- visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
101197
+ visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
101184
101198
  ));
101185
101199
  }
101186
101200
  case 257 /* VariableDeclaration */: {
@@ -101213,24 +101227,20 @@ function transformDeclarations(context) {
101213
101227
  return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
101214
101228
  }
101215
101229
  case 191 /* ConditionalType */: {
101216
- const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);
101217
- const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);
101230
+ const checkType = visitNode(input.checkType, visitDeclarationSubtree);
101231
+ const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
101218
101232
  const oldEnclosingDecl = enclosingDeclaration;
101219
101233
  enclosingDeclaration = input.trueType;
101220
- const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);
101234
+ const trueType = visitNode(input.trueType, visitDeclarationSubtree);
101221
101235
  enclosingDeclaration = oldEnclosingDecl;
101222
- const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);
101223
- Debug.assert(checkType);
101224
- Debug.assert(extendsType);
101225
- Debug.assert(trueType);
101226
- Debug.assert(falseType);
101236
+ const falseType = visitNode(input.falseType, visitDeclarationSubtree);
101227
101237
  return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
101228
101238
  }
101229
101239
  case 181 /* FunctionType */: {
101230
- return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
101240
+ return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
101231
101241
  }
101232
101242
  case 182 /* ConstructorType */: {
101233
- return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
101243
+ return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
101234
101244
  }
101235
101245
  case 202 /* ImportType */: {
101236
101246
  if (!isLiteralImportTypeNode(input))
@@ -101374,7 +101384,7 @@ function transformDeclarations(context) {
101374
101384
  ensureModifiers(input),
101375
101385
  input.name,
101376
101386
  visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
101377
- Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
101387
+ visitNode(input.type, visitDeclarationSubtree, isTypeNode)
101378
101388
  ));
101379
101389
  needsDeclare = previousNeedsDeclare;
101380
101390
  return clean2;
@@ -101386,7 +101396,7 @@ function transformDeclarations(context) {
101386
101396
  input.name,
101387
101397
  ensureTypeParams(input, input.typeParameters),
101388
101398
  transformHeritageClauses(input.heritageClauses),
101389
- visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)
101399
+ visitNodes2(input.members, visitDeclarationSubtree)
101390
101400
  ));
101391
101401
  }
101392
101402
  case 259 /* FunctionDeclaration */: {
@@ -101503,7 +101513,7 @@ function transformDeclarations(context) {
101503
101513
  const oldHasScopeFix = resultHasScopeMarker;
101504
101514
  resultHasScopeMarker = false;
101505
101515
  needsScopeFixMarker = false;
101506
- const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);
101516
+ const statements = visitNodes2(inner.statements, visitDeclarationStatements);
101507
101517
  let lateStatements = transformAndReplaceLatePaintedStatements(statements);
101508
101518
  if (input.flags & 16777216 /* Ambient */) {
101509
101519
  needsScopeFixMarker = false;
@@ -101512,7 +101522,7 @@ function transformDeclarations(context) {
101512
101522
  if (needsScopeFixMarker) {
101513
101523
  lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
101514
101524
  } else {
101515
- lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);
101525
+ lateStatements = visitNodes2(lateStatements, stripExportModifiers);
101516
101526
  }
101517
101527
  }
101518
101528
  const body = factory2.updateModuleBlock(inner, lateStatements);
@@ -101608,7 +101618,7 @@ function transformDeclarations(context) {
101608
101618
  void 0
101609
101619
  )
101610
101620
  ] : void 0;
101611
- const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
101621
+ const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
101612
101622
  const members = factory2.createNodeArray(memberNodes);
101613
101623
  const extendsClause = getEffectiveBaseTypeNode(input);
101614
101624
  if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
@@ -101632,11 +101642,11 @@ function transformDeclarations(context) {
101632
101642
  if (clause.token === 94 /* ExtendsKeyword */) {
101633
101643
  const oldDiag2 = getSymbolAccessibilityDiagnostic;
101634
101644
  getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
101635
- const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
101645
+ const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
101636
101646
  getSymbolAccessibilityDiagnostic = oldDiag2;
101637
101647
  return newClause;
101638
101648
  }
101639
- return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));
101649
+ return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
101640
101650
  }));
101641
101651
  return [statement, cleanup(factory2.updateClassDeclaration(
101642
101652
  input,
@@ -101692,7 +101702,7 @@ function transformDeclarations(context) {
101692
101702
  function transformVariableStatement(input) {
101693
101703
  if (!forEach(input.declarationList.declarations, getBindingNameVisible))
101694
101704
  return;
101695
- const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);
101705
+ const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
101696
101706
  if (!length(nodes))
101697
101707
  return;
101698
101708
  return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
@@ -101783,7 +101793,7 @@ function transformDeclarations(context) {
101783
101793
  function transformHeritageClauses(nodes) {
101784
101794
  return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
101785
101795
  return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
101786
- })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length));
101796
+ })), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
101787
101797
  }
101788
101798
  }
101789
101799
  function isAlwaysType(node) {
@@ -101961,7 +101971,7 @@ function noEmitNotification(hint, node, callback) {
101961
101971
  }
101962
101972
  function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
101963
101973
  var _a2, _b;
101964
- const enabledSyntaxKindFeatures = new Array(360 /* Count */);
101974
+ const enabledSyntaxKindFeatures = new Array(361 /* Count */);
101965
101975
  let lexicalEnvironmentVariableDeclarations;
101966
101976
  let lexicalEnvironmentFunctionDeclarations;
101967
101977
  let lexicalEnvironmentStatements;
@@ -103835,6 +103845,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
103835
103845
  case 346 /* JSDocThisTag */:
103836
103846
  case 347 /* JSDocTypeTag */:
103837
103847
  case 352 /* JSDocThrowsTag */:
103848
+ case 353 /* JSDocSatisfiesTag */:
103838
103849
  return emitJSDocSimpleTypedTag(node);
103839
103850
  case 348 /* JSDocTemplateTag */:
103840
103851
  return emitJSDocTemplateTag(node);
@@ -103842,9 +103853,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
103842
103853
  return emitJSDocTypedefTag(node);
103843
103854
  case 350 /* JSDocSeeTag */:
103844
103855
  return emitJSDocSeeTag(node);
103845
- case 354 /* NotEmittedStatement */:
103846
- case 358 /* EndOfDeclarationMarker */:
103847
- case 357 /* MergeDeclarationMarker */:
103856
+ case 355 /* NotEmittedStatement */:
103857
+ case 359 /* EndOfDeclarationMarker */:
103858
+ case 358 /* MergeDeclarationMarker */:
103848
103859
  return;
103849
103860
  }
103850
103861
  if (isExpression(node)) {
@@ -103943,18 +103954,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
103943
103954
  return emitJsxSelfClosingElement(node);
103944
103955
  case 285 /* JsxFragment */:
103945
103956
  return emitJsxFragment(node);
103946
- case 353 /* SyntaxList */:
103957
+ case 354 /* SyntaxList */:
103947
103958
  return Debug.fail("SyntaxList should not be printed");
103948
- case 354 /* NotEmittedStatement */:
103959
+ case 355 /* NotEmittedStatement */:
103949
103960
  return;
103950
- case 355 /* PartiallyEmittedExpression */:
103961
+ case 356 /* PartiallyEmittedExpression */:
103951
103962
  return emitPartiallyEmittedExpression(node);
103952
- case 356 /* CommaListExpression */:
103963
+ case 357 /* CommaListExpression */:
103953
103964
  return emitCommaList(node);
103954
- case 357 /* MergeDeclarationMarker */:
103955
- case 358 /* EndOfDeclarationMarker */:
103965
+ case 358 /* MergeDeclarationMarker */:
103966
+ case 359 /* EndOfDeclarationMarker */:
103956
103967
  return;
103957
- case 359 /* SyntheticReferenceExpression */:
103968
+ case 360 /* SyntheticReferenceExpression */:
103958
103969
  return Debug.fail("SyntheticReferenceExpression should not be printed");
103959
103970
  }
103960
103971
  }
@@ -107202,7 +107213,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
107202
107213
  emitLeadingComments(
107203
107214
  pos,
107204
107215
  /*isEmittedNode*/
107205
- node.kind !== 354 /* NotEmittedStatement */
107216
+ node.kind !== 355 /* NotEmittedStatement */
107206
107217
  );
107207
107218
  }
107208
107219
  if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
@@ -107226,7 +107237,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
107226
107237
  containerPos = savedContainerPos;
107227
107238
  containerEnd = savedContainerEnd;
107228
107239
  declarationListContainerEnd = savedDeclarationListContainerEnd;
107229
- if (!skipTrailingComments && node.kind !== 354 /* NotEmittedStatement */) {
107240
+ if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) {
107230
107241
  emitTrailingComments(end);
107231
107242
  }
107232
107243
  }
@@ -107498,7 +107509,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
107498
107509
  }
107499
107510
  } else {
107500
107511
  const source = sourceMapRange.source || sourceMapSource;
107501
- if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
107512
+ if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
107502
107513
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
107503
107514
  }
107504
107515
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
@@ -107513,7 +107524,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
107513
107524
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
107514
107525
  sourceMapsDisabled = false;
107515
107526
  }
107516
- if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
107527
+ if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
107517
107528
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
107518
107529
  }
107519
107530
  }
@@ -114429,9 +114440,6 @@ function getFilesInErrorForSummary(diagnostics) {
114429
114440
  }
114430
114441
  );
114431
114442
  return filesInError.map((fileName) => {
114432
- if (fileName === void 0) {
114433
- return void 0;
114434
- }
114435
114443
  const diagnosticForFileName = find(
114436
114444
  diagnostics,
114437
114445
  (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
@@ -115080,8 +115088,6 @@ function createWatchProgram(host) {
115080
115088
  parseConfigFile2();
115081
115089
  newLine = updateNewLine();
115082
115090
  }
115083
- Debug.assert(compilerOptions);
115084
- Debug.assert(rootFileNames);
115085
115091
  const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
115086
115092
  const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
115087
115093
  writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
@@ -115184,8 +115190,6 @@ function createWatchProgram(host) {
115184
115190
  }
115185
115191
  function synchronizeProgram() {
115186
115192
  writeLog(`Synchronizing program`);
115187
- Debug.assert(compilerOptions);
115188
- Debug.assert(rootFileNames);
115189
115193
  clearInvalidateResolutionsOfFailedLookupLocations();
115190
115194
  const program = getCurrentBuilderProgram();
115191
115195
  if (hasChangedCompilerOptions) {
@@ -115425,8 +115429,6 @@ function createWatchProgram(host) {
115425
115429
  }
115426
115430
  function reloadFileNamesFromConfigFile() {
115427
115431
  writeLog("Reloading new file names and options");
115428
- Debug.assert(compilerOptions);
115429
- Debug.assert(configFileName);
115430
115432
  reloadLevel = 0 /* None */;
115431
115433
  rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
115432
115434
  if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
@@ -115435,7 +115437,6 @@ function createWatchProgram(host) {
115435
115437
  synchronizeProgram();
115436
115438
  }
115437
115439
  function reloadConfigFile() {
115438
- Debug.assert(configFileName);
115439
115440
  writeLog(`Reloading config file: ${configFileName}`);
115440
115441
  reloadLevel = 0 /* None */;
115441
115442
  if (cachedDirectoryStructureHost) {
@@ -115448,7 +115449,6 @@ function createWatchProgram(host) {
115448
115449
  updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
115449
115450
  }
115450
115451
  function parseConfigFile2() {
115451
- Debug.assert(configFileName);
115452
115452
  setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
115453
115453
  configFileName,
115454
115454
  optionsToExtendForConfigFile,
@@ -115476,7 +115476,6 @@ function createWatchProgram(host) {
115476
115476
  return config.parsedCommandLine;
115477
115477
  if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
115478
115478
  writeLog("Reloading new file names and options");
115479
- Debug.assert(compilerOptions);
115480
115479
  const fileNames = getFileNamesFromConfigSpecs(
115481
115480
  config.parsedCommandLine.options.configFile.configFileSpecs,
115482
115481
  getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
@@ -115568,8 +115567,7 @@ function createWatchProgram(host) {
115568
115567
  return watchDirectory(
115569
115568
  directory,
115570
115569
  (fileOrDirectory) => {
115571
- Debug.assert(configFileName);
115572
- Debug.assert(compilerOptions);
115570
+ Debug.assert(!!configFileName);
115573
115571
  const fileOrDirectoryPath = toPath3(fileOrDirectory);
115574
115572
  if (cachedDirectoryStructureHost) {
115575
115573
  cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
@@ -115600,7 +115598,6 @@ function createWatchProgram(host) {
115600
115598
  );
115601
115599
  }
115602
115600
  function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
115603
- Debug.assert(configFileName);
115604
115601
  updateSharedExtendedConfigFileWatcher(
115605
115602
  forProjectPath,
115606
115603
  options,