@typescript-deploys/pr-build 5.0.0-pr-52240-9 → 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/tsserver.js CHANGED
@@ -1001,6 +1001,8 @@ __export(server_exports, {
1001
1001
  getJSDocReturnTag: () => getJSDocReturnTag,
1002
1002
  getJSDocReturnType: () => getJSDocReturnType,
1003
1003
  getJSDocRoot: () => getJSDocRoot,
1004
+ getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
1005
+ getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
1004
1006
  getJSDocTags: () => getJSDocTags,
1005
1007
  getJSDocTagsNoCache: () => getJSDocTagsNoCache,
1006
1008
  getJSDocTemplateTag: () => getJSDocTemplateTag,
@@ -1627,6 +1629,8 @@ __export(server_exports, {
1627
1629
  isJSDocPublicTag: () => isJSDocPublicTag,
1628
1630
  isJSDocReadonlyTag: () => isJSDocReadonlyTag,
1629
1631
  isJSDocReturnTag: () => isJSDocReturnTag,
1632
+ isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
1633
+ isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
1630
1634
  isJSDocSeeTag: () => isJSDocSeeTag,
1631
1635
  isJSDocSignature: () => isJSDocSignature,
1632
1636
  isJSDocTag: () => isJSDocTag,
@@ -1687,6 +1691,8 @@ __export(server_exports, {
1687
1691
  isLogicalOperator: () => isLogicalOperator,
1688
1692
  isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
1689
1693
  isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
1694
+ isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
1695
+ isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
1690
1696
  isMappedTypeNode: () => isMappedTypeNode,
1691
1697
  isMemberName: () => isMemberName,
1692
1698
  isMergeDeclarationMarker: () => isMergeDeclarationMarker,
@@ -2372,6 +2378,7 @@ __export(server_exports, {
2372
2378
  tryGetDirectories: () => tryGetDirectories,
2373
2379
  tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
2374
2380
  tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
2381
+ tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
2375
2382
  tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
2376
2383
  tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
2377
2384
  tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
@@ -2671,7 +2678,7 @@ __export(ts_server_exports3, {
2671
2678
 
2672
2679
  // src/compiler/corePublic.ts
2673
2680
  var versionMajorMinor = "5.0";
2674
- var version = `${versionMajorMinor}.0-insiders.20230114`;
2681
+ var version = `${versionMajorMinor}.0-insiders.20230117`;
2675
2682
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2676
2683
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2677
2684
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6471,14 +6478,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6471
6478
  SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag";
6472
6479
  SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag";
6473
6480
  SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag";
6474
- SyntaxKind5[SyntaxKind5["SyntaxList"] = 353] = "SyntaxList";
6475
- SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 354] = "NotEmittedStatement";
6476
- SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 355] = "PartiallyEmittedExpression";
6477
- SyntaxKind5[SyntaxKind5["CommaListExpression"] = 356] = "CommaListExpression";
6478
- SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 357] = "MergeDeclarationMarker";
6479
- SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 358] = "EndOfDeclarationMarker";
6480
- SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 359] = "SyntheticReferenceExpression";
6481
- SyntaxKind5[SyntaxKind5["Count"] = 360] = "Count";
6481
+ SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag";
6482
+ SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList";
6483
+ SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement";
6484
+ SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression";
6485
+ SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression";
6486
+ SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker";
6487
+ SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker";
6488
+ SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression";
6489
+ SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count";
6482
6490
  SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
6483
6491
  SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
6484
6492
  SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -6507,9 +6515,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6507
6515
  SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
6508
6516
  SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
6509
6517
  SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
6510
- SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 352 /* JSDocThrowsTag */] = "LastJSDocNode";
6518
+ SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode";
6511
6519
  SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
6512
- SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 352 /* JSDocThrowsTag */] = "LastJSDocTagNode";
6520
+ SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
6513
6521
  SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
6514
6522
  SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
6515
6523
  return SyntaxKind5;
@@ -9725,7 +9733,6 @@ var Diagnostics = {
9725
9733
  An_export_declaration_cannot_have_modifiers: diag(1193, 1 /* Error */, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."),
9726
9734
  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."),
9727
9735
  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."),
9728
- 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."),
9729
9736
  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."),
9730
9737
  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."),
9731
9738
  Unterminated_Unicode_escape_sequence: diag(1199, 1 /* Error */, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."),
@@ -11593,7 +11600,8 @@ var Diagnostics = {
11593
11600
  _0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
11594
11601
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
11595
11602
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
11596
- The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here.")
11603
+ 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."),
11604
+ Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string.")
11597
11605
  };
11598
11606
 
11599
11607
  // src/compiler/scanner.ts
@@ -14308,6 +14316,9 @@ function getJSDocReturnTag(node) {
14308
14316
  function getJSDocTemplateTag(node) {
14309
14317
  return getFirstJSDocTag(node, isJSDocTemplateTag);
14310
14318
  }
14319
+ function getJSDocSatisfiesTag(node) {
14320
+ return getFirstJSDocTag(node, isJSDocSatisfiesTag);
14321
+ }
14311
14322
  function getJSDocTypeTag(node) {
14312
14323
  const tag = getFirstJSDocTag(node, isJSDocTypeTag);
14313
14324
  if (tag && tag.typeExpression && tag.typeExpression.type) {
@@ -14867,8 +14878,8 @@ function isExpressionKind(kind) {
14867
14878
  case 227 /* SpreadElement */:
14868
14879
  case 231 /* AsExpression */:
14869
14880
  case 229 /* OmittedExpression */:
14870
- case 356 /* CommaListExpression */:
14871
- case 355 /* PartiallyEmittedExpression */:
14881
+ case 357 /* CommaListExpression */:
14882
+ case 356 /* PartiallyEmittedExpression */:
14872
14883
  case 235 /* SatisfiesExpression */:
14873
14884
  return true;
14874
14885
  default:
@@ -15053,7 +15064,7 @@ function isDeclarationStatementKind(kind) {
15053
15064
  return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */;
15054
15065
  }
15055
15066
  function isStatementKindButNotDeclarationKind(kind) {
15056
- return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 354 /* NotEmittedStatement */ || kind === 358 /* EndOfDeclarationMarker */ || kind === 357 /* MergeDeclarationMarker */;
15067
+ return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */;
15057
15068
  }
15058
15069
  function isDeclaration(node) {
15059
15070
  if (node.kind === 165 /* TypeParameter */) {
@@ -15114,13 +15125,13 @@ function isCaseOrDefaultClause(node) {
15114
15125
  return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
15115
15126
  }
15116
15127
  function isJSDocNode(node) {
15117
- return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 352 /* LastJSDocNode */;
15128
+ return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */;
15118
15129
  }
15119
15130
  function isJSDocCommentContainingNode(node) {
15120
15131
  return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
15121
15132
  }
15122
15133
  function isJSDocTag(node) {
15123
- return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 352 /* LastJSDocTagNode */;
15134
+ return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */;
15124
15135
  }
15125
15136
  function isSetAccessor(node) {
15126
15137
  return node.kind === 175 /* SetAccessor */;
@@ -15536,7 +15547,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
15536
15547
  if (includeJsDoc && hasJSDocNodes(node)) {
15537
15548
  return getTokenPosOfNode(node.jsDoc[0], sourceFile);
15538
15549
  }
15539
- if (node.kind === 353 /* SyntaxList */ && node._children.length > 0) {
15550
+ if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) {
15540
15551
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
15541
15552
  }
15542
15553
  return skipTrivia(
@@ -17414,7 +17425,7 @@ function filterOwnedJSDocTags(hostNode, jsDoc) {
17414
17425
  return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0;
17415
17426
  }
17416
17427
  function ownsJSDocTag(hostNode, tag) {
17417
- return !isJSDocTypeTag(tag) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
17428
+ return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
17418
17429
  }
17419
17430
  function getNextJSDocCommentLocation(node) {
17420
17431
  const parent2 = node.parent;
@@ -17997,7 +18008,7 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => {
17997
18008
  })(OperatorPrecedence || {});
17998
18009
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
17999
18010
  switch (nodeKind) {
18000
- case 356 /* CommaListExpression */:
18011
+ case 357 /* CommaListExpression */:
18001
18012
  return 0 /* Comma */;
18002
18013
  case 227 /* SpreadElement */:
18003
18014
  return 1 /* Spread */;
@@ -18999,14 +19010,23 @@ function modifierToFlag(token) {
18999
19010
  }
19000
19011
  return 0 /* None */;
19001
19012
  }
19013
+ function isBinaryLogicalOperator(token) {
19014
+ return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */;
19015
+ }
19002
19016
  function isLogicalOperator(token) {
19003
- return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */ || token === 53 /* ExclamationToken */;
19017
+ return isBinaryLogicalOperator(token) || token === 53 /* ExclamationToken */;
19004
19018
  }
19005
19019
  function isLogicalOrCoalescingAssignmentOperator(token) {
19006
19020
  return token === 75 /* BarBarEqualsToken */ || token === 76 /* AmpersandAmpersandEqualsToken */ || token === 77 /* QuestionQuestionEqualsToken */;
19007
19021
  }
19008
19022
  function isLogicalOrCoalescingAssignmentExpression(expr) {
19009
- return isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
19023
+ return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
19024
+ }
19025
+ function isLogicalOrCoalescingBinaryOperator(token) {
19026
+ return isBinaryLogicalOperator(token) || token === 60 /* QuestionQuestionToken */;
19027
+ }
19028
+ function isLogicalOrCoalescingBinaryExpression(expr) {
19029
+ return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);
19010
19030
  }
19011
19031
  function isAssignmentOperator(token) {
19012
19032
  return token >= 63 /* FirstAssignment */ && token <= 78 /* LastAssignment */;
@@ -19652,7 +19672,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
19652
19672
  case 209 /* ElementAccessExpression */:
19653
19673
  case 208 /* PropertyAccessExpression */:
19654
19674
  case 232 /* NonNullExpression */:
19655
- case 355 /* PartiallyEmittedExpression */:
19675
+ case 356 /* PartiallyEmittedExpression */:
19656
19676
  case 235 /* SatisfiesExpression */:
19657
19677
  node = node.expression;
19658
19678
  continue;
@@ -20966,7 +20986,7 @@ function getContainingNodeArray(node) {
20966
20986
  return parent2.types;
20967
20987
  case 186 /* TupleType */:
20968
20988
  case 206 /* ArrayLiteralExpression */:
20969
- case 356 /* CommaListExpression */:
20989
+ case 357 /* CommaListExpression */:
20970
20990
  case 272 /* NamedImports */:
20971
20991
  case 276 /* NamedExports */:
20972
20992
  return parent2.elements;
@@ -21151,6 +21171,16 @@ function isNonNullAccess(node) {
21151
21171
  const kind = node.kind;
21152
21172
  return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
21153
21173
  }
21174
+ function isJSDocSatisfiesExpression(node) {
21175
+ return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);
21176
+ }
21177
+ function getJSDocSatisfiesExpressionType(node) {
21178
+ return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));
21179
+ }
21180
+ function tryGetJSDocSatisfiesTypeNode(node) {
21181
+ const tag = getJSDocSatisfiesTag(node);
21182
+ return tag && tag.typeExpression && tag.typeExpression.type;
21183
+ }
21154
21184
 
21155
21185
  // src/compiler/factory/baseNodeFactory.ts
21156
21186
  function createBaseNodeFactory() {
@@ -22175,6 +22205,12 @@ function createNodeFactory(flags, baseFactory2) {
22175
22205
  get updateJSDocThrowsTag() {
22176
22206
  return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */);
22177
22207
  },
22208
+ get createJSDocSatisfiesTag() {
22209
+ return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */);
22210
+ },
22211
+ get updateJSDocSatisfiesTag() {
22212
+ return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */);
22213
+ },
22178
22214
  createJSDocEnumTag: createJSDocEnumTag2,
22179
22215
  updateJSDocEnumTag,
22180
22216
  createJSDocUnknownTag,
@@ -25334,18 +25370,18 @@ function createNodeFactory(flags, baseFactory2) {
25334
25370
  return node;
25335
25371
  }
25336
25372
  function createSyntaxList3(children) {
25337
- const node = createBaseNode(353 /* SyntaxList */);
25373
+ const node = createBaseNode(354 /* SyntaxList */);
25338
25374
  node._children = children;
25339
25375
  return node;
25340
25376
  }
25341
25377
  function createNotEmittedStatement2(original) {
25342
- const node = createBaseNode(354 /* NotEmittedStatement */);
25378
+ const node = createBaseNode(355 /* NotEmittedStatement */);
25343
25379
  node.original = original;
25344
25380
  setTextRange(node, original);
25345
25381
  return node;
25346
25382
  }
25347
25383
  function createPartiallyEmittedExpression2(expression, original) {
25348
- const node = createBaseNode(355 /* PartiallyEmittedExpression */);
25384
+ const node = createBaseNode(356 /* PartiallyEmittedExpression */);
25349
25385
  node.expression = expression;
25350
25386
  node.original = original;
25351
25387
  node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
@@ -25367,7 +25403,7 @@ function createNodeFactory(flags, baseFactory2) {
25367
25403
  return node;
25368
25404
  }
25369
25405
  function createCommaListExpression(elements) {
25370
- const node = createBaseNode(356 /* CommaListExpression */);
25406
+ const node = createBaseNode(357 /* CommaListExpression */);
25371
25407
  node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements));
25372
25408
  node.transformFlags |= propagateChildrenFlags(node.elements);
25373
25409
  return node;
@@ -25376,19 +25412,19 @@ function createNodeFactory(flags, baseFactory2) {
25376
25412
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
25377
25413
  }
25378
25414
  function createEndOfDeclarationMarker(original) {
25379
- const node = createBaseNode(358 /* EndOfDeclarationMarker */);
25415
+ const node = createBaseNode(359 /* EndOfDeclarationMarker */);
25380
25416
  node.emitNode = {};
25381
25417
  node.original = original;
25382
25418
  return node;
25383
25419
  }
25384
25420
  function createMergeDeclarationMarker(original) {
25385
- const node = createBaseNode(357 /* MergeDeclarationMarker */);
25421
+ const node = createBaseNode(358 /* MergeDeclarationMarker */);
25386
25422
  node.emitNode = {};
25387
25423
  node.original = original;
25388
25424
  return node;
25389
25425
  }
25390
25426
  function createSyntheticReferenceExpression(expression, thisArg) {
25391
- const node = createBaseNode(359 /* SyntheticReferenceExpression */);
25427
+ const node = createBaseNode(360 /* SyntheticReferenceExpression */);
25392
25428
  node.expression = expression;
25393
25429
  node.thisArg = thisArg;
25394
25430
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -25628,7 +25664,7 @@ function createNodeFactory(flags, baseFactory2) {
25628
25664
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
25629
25665
  case 232 /* NonNullExpression */:
25630
25666
  return updateNonNullExpression2(outerExpression, expression);
25631
- case 355 /* PartiallyEmittedExpression */:
25667
+ case 356 /* PartiallyEmittedExpression */:
25632
25668
  return updatePartiallyEmittedExpression2(outerExpression, expression);
25633
25669
  }
25634
25670
  }
@@ -26164,7 +26200,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
26164
26200
  case 213 /* TypeAssertionExpression */:
26165
26201
  case 235 /* SatisfiesExpression */:
26166
26202
  case 231 /* AsExpression */:
26167
- case 355 /* PartiallyEmittedExpression */:
26203
+ case 356 /* PartiallyEmittedExpression */:
26168
26204
  case 214 /* ParenthesizedExpression */:
26169
26205
  case 106 /* SuperKeyword */:
26170
26206
  return -2147483648 /* OuterExpressionExcludes */;
@@ -27803,10 +27839,10 @@ function isSyntheticExpression(node) {
27803
27839
  return node.kind === 234 /* SyntheticExpression */;
27804
27840
  }
27805
27841
  function isPartiallyEmittedExpression(node) {
27806
- return node.kind === 355 /* PartiallyEmittedExpression */;
27842
+ return node.kind === 356 /* PartiallyEmittedExpression */;
27807
27843
  }
27808
27844
  function isCommaListExpression(node) {
27809
- return node.kind === 356 /* CommaListExpression */;
27845
+ return node.kind === 357 /* CommaListExpression */;
27810
27846
  }
27811
27847
  function isTemplateSpan(node) {
27812
27848
  return node.kind === 236 /* TemplateSpan */;
@@ -27950,16 +27986,16 @@ function isMissingDeclaration(node) {
27950
27986
  return node.kind === 279 /* MissingDeclaration */;
27951
27987
  }
27952
27988
  function isNotEmittedStatement(node) {
27953
- return node.kind === 354 /* NotEmittedStatement */;
27989
+ return node.kind === 355 /* NotEmittedStatement */;
27954
27990
  }
27955
27991
  function isSyntheticReference(node) {
27956
- return node.kind === 359 /* SyntheticReferenceExpression */;
27992
+ return node.kind === 360 /* SyntheticReferenceExpression */;
27957
27993
  }
27958
27994
  function isMergeDeclarationMarker(node) {
27959
- return node.kind === 357 /* MergeDeclarationMarker */;
27995
+ return node.kind === 358 /* MergeDeclarationMarker */;
27960
27996
  }
27961
27997
  function isEndOfDeclarationMarker(node) {
27962
- return node.kind === 358 /* EndOfDeclarationMarker */;
27998
+ return node.kind === 359 /* EndOfDeclarationMarker */;
27963
27999
  }
27964
28000
  function isExternalModuleReference(node) {
27965
28001
  return node.kind === 280 /* ExternalModuleReference */;
@@ -28150,11 +28186,14 @@ function isJSDocPropertyTag(node) {
28150
28186
  function isJSDocImplementsTag(node) {
28151
28187
  return node.kind === 332 /* JSDocImplementsTag */;
28152
28188
  }
28189
+ function isJSDocSatisfiesTag(node) {
28190
+ return node.kind === 353 /* JSDocSatisfiesTag */;
28191
+ }
28153
28192
  function isJSDocThrowsTag(node) {
28154
28193
  return node.kind === 352 /* JSDocThrowsTag */;
28155
28194
  }
28156
28195
  function isSyntaxList(n) {
28157
- return n.kind === 353 /* SyntaxList */;
28196
+ return n.kind === 354 /* SyntaxList */;
28158
28197
  }
28159
28198
 
28160
28199
  // src/compiler/factory/utilities.ts
@@ -28522,7 +28561,7 @@ function startsWithUseStrict(statements) {
28522
28561
  return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
28523
28562
  }
28524
28563
  function isCommaSequence(node) {
28525
- return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 356 /* CommaListExpression */;
28564
+ return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 357 /* CommaListExpression */;
28526
28565
  }
28527
28566
  function isJSDocTypeAssertion(node) {
28528
28567
  return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
@@ -28545,7 +28584,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
28545
28584
  return (kinds & 2 /* TypeAssertions */) !== 0;
28546
28585
  case 232 /* NonNullExpression */:
28547
28586
  return (kinds & 4 /* NonNullAssertions */) !== 0;
28548
- case 355 /* PartiallyEmittedExpression */:
28587
+ case 356 /* PartiallyEmittedExpression */:
28549
28588
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
28550
28589
  }
28551
28590
  return false;
@@ -29548,7 +29587,7 @@ var forEachChildTable = {
29548
29587
  [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
29549
29588
  return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
29550
29589
  },
29551
- [356 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
29590
+ [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
29552
29591
  return visitNodes(cbNode, cbNodes, node.elements);
29553
29592
  },
29554
29593
  [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
@@ -29620,6 +29659,7 @@ var forEachChildTable = {
29620
29659
  [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
29621
29660
  [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
29622
29661
  [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
29662
+ [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
29623
29663
  [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
29624
29664
  [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
29625
29665
  [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
@@ -29639,7 +29679,7 @@ var forEachChildTable = {
29639
29679
  [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
29640
29680
  [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
29641
29681
  [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
29642
- [355 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
29682
+ [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
29643
29683
  };
29644
29684
  function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
29645
29685
  return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
@@ -35715,6 +35755,9 @@ var Parser;
35715
35755
  case "overload":
35716
35756
  tag = parseOverloadTag(start3, tagName, margin, indentText);
35717
35757
  break;
35758
+ case "satisfies":
35759
+ tag = parseSatisfiesTag(start3, tagName, margin, indentText);
35760
+ break;
35718
35761
  case "see":
35719
35762
  tag = parseSeeTag(start3, tagName, margin, indentText);
35720
35763
  break;
@@ -36023,6 +36066,14 @@ var Parser;
36023
36066
  const className = parseExpressionWithTypeArgumentsForAugments();
36024
36067
  return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start3, getNodePos(), margin, indentText)), start3);
36025
36068
  }
36069
+ function parseSatisfiesTag(start3, tagName, margin, indentText) {
36070
+ const typeExpression = parseJSDocTypeExpression(
36071
+ /*mayOmitBraces*/
36072
+ false
36073
+ );
36074
+ const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), margin, indentText) : void 0;
36075
+ return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start3);
36076
+ }
36026
36077
  function parseExpressionWithTypeArgumentsForAugments() {
36027
36078
  const usedBrace = parseOptional(18 /* OpenBraceToken */);
36028
36079
  const pos = getNodePos();
@@ -39646,7 +39697,7 @@ function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) {
39646
39697
  const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
39647
39698
  json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
39648
39699
  let extendedConfigPath;
39649
- if (json.extends) {
39700
+ if (json.extends || json.extends === "") {
39650
39701
  if (!isCompilerOptionsValue(extendsOptionDeclaration, json.extends)) {
39651
39702
  errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", getCompilerOptionValueTypeString(extendsOptionDeclaration)));
39652
39703
  } else {
@@ -39773,7 +39824,11 @@ function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiag
39773
39824
  if (resolved.resolvedModule) {
39774
39825
  return resolved.resolvedModule.resolvedFileName;
39775
39826
  }
39776
- errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
39827
+ if (extendedConfig === "") {
39828
+ errors.push(createDiagnostic(Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
39829
+ } else {
39830
+ errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
39831
+ }
39777
39832
  return void 0;
39778
39833
  }
39779
39834
  function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
@@ -43512,13 +43567,12 @@ function createBinder() {
43512
43567
  } else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) {
43513
43568
  node = node.operand;
43514
43569
  } else {
43515
- return node.kind === 223 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */);
43570
+ return isLogicalOrCoalescingBinaryExpression(node);
43516
43571
  }
43517
43572
  }
43518
43573
  }
43519
43574
  function isLogicalAssignmentExpression(node) {
43520
- node = skipParentheses(node);
43521
- return isBinaryExpression(node) && isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind);
43575
+ return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));
43522
43576
  }
43523
43577
  function isTopLevelLogicalExpression(node) {
43524
43578
  while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 53 /* ExclamationToken */) {
@@ -43901,7 +43955,7 @@ function createBinder() {
43901
43955
  };
43902
43956
  }
43903
43957
  const operator = node.operatorToken.kind;
43904
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */ || isLogicalOrCoalescingAssignmentOperator(operator)) {
43958
+ if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {
43905
43959
  if (isTopLevelLogicalExpression(node)) {
43906
43960
  const postExpressionLabel = createBranchLabel();
43907
43961
  bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
@@ -54714,12 +54768,9 @@ function createTypeChecker(host) {
54714
54768
  }
54715
54769
  const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration);
54716
54770
  const isOptional = includeOptionality && isOptionalDeclaration(declaration);
54717
- let declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
54718
- if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
54719
- if (declaredType) {
54720
- return isTypeAny(declaredType) || declaredType === unknownType ? declaredType : errorType;
54721
- }
54722
- declaredType = useUnknownInCatchVariables ? unknownType : anyType;
54771
+ const declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
54772
+ if (!declaredType && isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
54773
+ return useUnknownInCatchVariables ? unknownType : anyType;
54723
54774
  }
54724
54775
  if (declaredType) {
54725
54776
  return addOptionality(declaredType, isProperty, isOptional);
@@ -69887,7 +69938,7 @@ function createTypeChecker(host) {
69887
69938
  }
69888
69939
  }
69889
69940
  function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
69890
- const typeNode = getEffectiveTypeAnnotationNode(declaration);
69941
+ const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);
69891
69942
  if (typeNode) {
69892
69943
  return getTypeFromTypeNode(typeNode);
69893
69944
  }
@@ -70496,8 +70547,16 @@ function createTypeChecker(host) {
70496
70547
  Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */);
70497
70548
  return getContextualTypeForSubstitutionExpression(parent2.parent, node);
70498
70549
  case 214 /* ParenthesizedExpression */: {
70499
- const tag = isInJSFile(parent2) ? getJSDocTypeTag(parent2) : void 0;
70500
- return !tag ? getContextualType2(parent2, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(tag.typeExpression.type);
70550
+ if (isInJSFile(parent2)) {
70551
+ if (isJSDocSatisfiesExpression(parent2)) {
70552
+ return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2));
70553
+ }
70554
+ const typeTag = getJSDocTypeTag(parent2);
70555
+ if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {
70556
+ return getTypeFromTypeNode(typeTag.typeExpression.type);
70557
+ }
70558
+ }
70559
+ return getContextualType2(parent2, contextFlags);
70501
70560
  }
70502
70561
  case 232 /* NonNullExpression */:
70503
70562
  return getContextualType2(parent2, contextFlags);
@@ -74701,12 +74760,15 @@ function createTypeChecker(host) {
74701
74760
  }
74702
74761
  function checkSatisfiesExpression(node) {
74703
74762
  checkSourceElement(node.type);
74704
- const exprType = checkExpression(node.expression);
74705
- const targetType = getTypeFromTypeNode(node.type);
74763
+ return checkSatisfiesExpressionWorker(node.expression, node.type);
74764
+ }
74765
+ function checkSatisfiesExpressionWorker(expression, target, checkMode) {
74766
+ const exprType = checkExpression(expression, checkMode);
74767
+ const targetType = getTypeFromTypeNode(target);
74706
74768
  if (isErrorType(targetType)) {
74707
74769
  return targetType;
74708
74770
  }
74709
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, node.type, node.expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
74771
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
74710
74772
  return exprType;
74711
74773
  }
74712
74774
  function checkMetaProperty(node) {
@@ -76113,12 +76175,12 @@ function createTypeChecker(host) {
76113
76175
  void 0
76114
76176
  );
76115
76177
  const operator = operatorToken.kind;
76116
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
76117
- if (operator === 55 /* AmpersandAmpersandToken */) {
76118
- let parent2 = node.parent;
76119
- while (parent2.kind === 214 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) {
76120
- parent2 = parent2.parent;
76121
- }
76178
+ if (isLogicalOrCoalescingBinaryOperator(operator)) {
76179
+ let parent2 = node.parent;
76180
+ while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) {
76181
+ parent2 = parent2.parent;
76182
+ }
76183
+ if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) {
76122
76184
  checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0);
76123
76185
  }
76124
76186
  checkTruthinessOfType(leftType, node.left);
@@ -76195,7 +76257,7 @@ function createTypeChecker(host) {
76195
76257
  return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */);
76196
76258
  }
76197
76259
  let leftType;
76198
- if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
76260
+ if (isLogicalOrCoalescingBinaryOperator(operator)) {
76199
76261
  leftType = checkTruthinessExpression(left, checkMode);
76200
76262
  } else {
76201
76263
  leftType = checkExpression(left, checkMode);
@@ -76738,6 +76800,12 @@ function createTypeChecker(host) {
76738
76800
  }
76739
76801
  function checkDeclarationInitializer(declaration, checkMode, contextualType) {
76740
76802
  const initializer = getEffectiveInitializer(declaration);
76803
+ if (isInJSFile(declaration)) {
76804
+ const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);
76805
+ if (typeNode) {
76806
+ return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);
76807
+ }
76808
+ }
76741
76809
  const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(
76742
76810
  initializer,
76743
76811
  contextualType,
@@ -77065,9 +77133,14 @@ function createTypeChecker(host) {
77065
77133
  }
77066
77134
  }
77067
77135
  function checkParenthesizedExpression(node, checkMode) {
77068
- if (hasJSDocNodes(node) && isJSDocTypeAssertion(node)) {
77069
- const type = getJSDocTypeAssertionType(node);
77070
- return checkAssertionWorker(type, type, node.expression, checkMode);
77136
+ if (hasJSDocNodes(node)) {
77137
+ if (isJSDocSatisfiesExpression(node)) {
77138
+ return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
77139
+ }
77140
+ if (isJSDocTypeAssertion(node)) {
77141
+ const type = getJSDocTypeAssertionType(node);
77142
+ return checkAssertionWorker(type, type, node.expression, checkMode);
77143
+ }
77071
77144
  }
77072
77145
  return checkExpression(node.expression, checkMode);
77073
77146
  }
@@ -78769,6 +78842,19 @@ function createTypeChecker(host) {
78769
78842
  function checkJSDocTypeTag(node) {
78770
78843
  checkSourceElement(node.typeExpression);
78771
78844
  }
78845
+ function checkJSDocSatisfiesTag(node) {
78846
+ checkSourceElement(node.typeExpression);
78847
+ const host2 = getEffectiveJSDocHost(node);
78848
+ if (host2) {
78849
+ const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);
78850
+ if (length(tags) > 1) {
78851
+ for (let i = 1; i < length(tags); i++) {
78852
+ const tagName = tags[i].tagName;
78853
+ error(tagName, Diagnostics._0_tag_already_specified, idText(tagName));
78854
+ }
78855
+ }
78856
+ }
78857
+ }
78772
78858
  function checkJSDocLinkLikeTag(node) {
78773
78859
  if (node.name) {
78774
78860
  resolveJSDocMemberName(
@@ -79554,15 +79640,24 @@ function createTypeChecker(host) {
79554
79640
  function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) {
79555
79641
  if (!strictNullChecks)
79556
79642
  return;
79557
- helper(condExpr, body);
79558
- while (isBinaryExpression(condExpr) && condExpr.operatorToken.kind === 56 /* BarBarToken */) {
79559
- condExpr = condExpr.left;
79560
- helper(condExpr, body);
79643
+ bothHelper(condExpr, body);
79644
+ function bothHelper(condExpr2, body2) {
79645
+ condExpr2 = skipParentheses(condExpr2);
79646
+ helper(condExpr2, body2);
79647
+ while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 60 /* QuestionQuestionToken */)) {
79648
+ condExpr2 = skipParentheses(condExpr2.left);
79649
+ helper(condExpr2, body2);
79650
+ }
79561
79651
  }
79562
79652
  function helper(condExpr2, body2) {
79563
- const location = isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 55 /* AmpersandAmpersandToken */) ? condExpr2.right : condExpr2;
79564
- if (isModuleExportsAccessExpression(location))
79653
+ const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
79654
+ if (isModuleExportsAccessExpression(location)) {
79565
79655
  return;
79656
+ }
79657
+ if (isLogicalOrCoalescingBinaryExpression(location)) {
79658
+ bothHelper(location, body2);
79659
+ return;
79660
+ }
79566
79661
  const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
79567
79662
  const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion3(location.expression);
79568
79663
  if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
@@ -79572,7 +79667,7 @@ function createTypeChecker(host) {
79572
79667
  if (callSignatures.length === 0 && !isPromise) {
79573
79668
  return;
79574
79669
  }
79575
- const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : isBinaryExpression(location) && isIdentifier(location.right) ? location.right : void 0;
79670
+ const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;
79576
79671
  const testedSymbol = testedNode && getSymbolAtLocation(testedNode);
79577
79672
  if (!testedSymbol && !isPromise) {
79578
79673
  return;
@@ -80531,13 +80626,7 @@ function createTypeChecker(host) {
80531
80626
  if (catchClause.variableDeclaration) {
80532
80627
  const declaration = catchClause.variableDeclaration;
80533
80628
  checkVariableLikeDeclaration(declaration);
80534
- const typeNode = getEffectiveTypeAnnotationNode(declaration);
80535
- if (typeNode) {
80536
- const type = getTypeFromTypeNode(typeNode);
80537
- if (type && !(type.flags & 3 /* AnyOrUnknown */)) {
80538
- grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
80539
- }
80540
- } else if (declaration.initializer) {
80629
+ if (declaration.initializer) {
80541
80630
  grammarErrorOnFirstToken(declaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
80542
80631
  } else {
80543
80632
  const blockLocals = catchClause.block.locals;
@@ -82369,6 +82458,8 @@ function createTypeChecker(host) {
82369
82458
  case 338 /* JSDocProtectedTag */:
82370
82459
  case 337 /* JSDocPrivateTag */:
82371
82460
  return checkJSDocAccessibilityModifiers(node);
82461
+ case 353 /* JSDocSatisfiesTag */:
82462
+ return checkJSDocSatisfiesTag(node);
82372
82463
  case 196 /* IndexedAccessType */:
82373
82464
  return checkIndexedAccessType(node);
82374
82465
  case 197 /* MappedType */:
@@ -87182,13 +87273,13 @@ var visitEachChildTable = {
87182
87273
  );
87183
87274
  },
87184
87275
  // Transformation nodes
87185
- [355 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87276
+ [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87186
87277
  return context.factory.updatePartiallyEmittedExpression(
87187
87278
  node,
87188
87279
  nodeVisitor(node.expression, visitor, isExpression)
87189
87280
  );
87190
87281
  },
87191
- [356 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
87282
+ [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
87192
87283
  return context.factory.updateCommaListExpression(
87193
87284
  node,
87194
87285
  nodesVisitor(node.elements, visitor, isExpression)
@@ -93946,7 +94037,7 @@ function transformES2018(context) {
93946
94037
  return visitObjectLiteralExpression(node);
93947
94038
  case 223 /* BinaryExpression */:
93948
94039
  return visitBinaryExpression(node, expressionResultIsUnused2);
93949
- case 356 /* CommaListExpression */:
94040
+ case 357 /* CommaListExpression */:
93950
94041
  return visitCommaListExpression(node, expressionResultIsUnused2);
93951
94042
  case 295 /* CatchClause */:
93952
94043
  return visitCatchClause(node);
@@ -95378,15 +95469,10 @@ function transformES2021(context) {
95378
95469
  if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {
95379
95470
  return node;
95380
95471
  }
95381
- switch (node.kind) {
95382
- case 223 /* BinaryExpression */:
95383
- const binaryExpression = node;
95384
- if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
95385
- return transformLogicalAssignment(binaryExpression);
95386
- }
95387
- default:
95388
- return visitEachChild(node, visitor, context);
95472
+ if (isLogicalOrCoalescingAssignmentExpression(node)) {
95473
+ return transformLogicalAssignment(node);
95389
95474
  }
95475
+ return visitEachChild(node, visitor, context);
95390
95476
  }
95391
95477
  function transformLogicalAssignment(binaryExpression) {
95392
95478
  const operator = binaryExpression.operatorToken;
@@ -96524,7 +96610,7 @@ function transformES2015(context) {
96524
96610
  return visitParenthesizedExpression(node, expressionResultIsUnused2);
96525
96611
  case 223 /* BinaryExpression */:
96526
96612
  return visitBinaryExpression(node, expressionResultIsUnused2);
96527
- case 356 /* CommaListExpression */:
96613
+ case 357 /* CommaListExpression */:
96528
96614
  return visitCommaListExpression(node, expressionResultIsUnused2);
96529
96615
  case 14 /* NoSubstitutionTemplateLiteral */:
96530
96616
  case 15 /* TemplateHead */:
@@ -99676,7 +99762,7 @@ function transformGenerators(context) {
99676
99762
  switch (node.kind) {
99677
99763
  case 223 /* BinaryExpression */:
99678
99764
  return visitBinaryExpression(node);
99679
- case 356 /* CommaListExpression */:
99765
+ case 357 /* CommaListExpression */:
99680
99766
  return visitCommaListExpression(node);
99681
99767
  case 224 /* ConditionalExpression */:
99682
99768
  return visitConditionalExpression(node);
@@ -102015,9 +102101,9 @@ function transformModule(context) {
102015
102101
  return visitFunctionDeclaration(node);
102016
102102
  case 260 /* ClassDeclaration */:
102017
102103
  return visitClassDeclaration(node);
102018
- case 357 /* MergeDeclarationMarker */:
102104
+ case 358 /* MergeDeclarationMarker */:
102019
102105
  return visitMergeDeclarationMarker(node);
102020
- case 358 /* EndOfDeclarationMarker */:
102106
+ case 359 /* EndOfDeclarationMarker */:
102021
102107
  return visitEndOfDeclarationMarker(node);
102022
102108
  default:
102023
102109
  return visitor(node);
@@ -102034,7 +102120,7 @@ function transformModule(context) {
102034
102120
  return visitExpressionStatement(node);
102035
102121
  case 214 /* ParenthesizedExpression */:
102036
102122
  return visitParenthesizedExpression(node, valueIsDiscarded);
102037
- case 355 /* PartiallyEmittedExpression */:
102123
+ case 356 /* PartiallyEmittedExpression */:
102038
102124
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
102039
102125
  case 210 /* CallExpression */:
102040
102126
  if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
@@ -104150,9 +104236,9 @@ function transformSystemModule(context) {
104150
104236
  return visitCatchClause(node);
104151
104237
  case 238 /* Block */:
104152
104238
  return visitBlock(node);
104153
- case 357 /* MergeDeclarationMarker */:
104239
+ case 358 /* MergeDeclarationMarker */:
104154
104240
  return visitMergeDeclarationMarker(node);
104155
- case 358 /* EndOfDeclarationMarker */:
104241
+ case 359 /* EndOfDeclarationMarker */:
104156
104242
  return visitEndOfDeclarationMarker(node);
104157
104243
  default:
104158
104244
  return visitor(node);
@@ -104308,7 +104394,7 @@ function transformSystemModule(context) {
104308
104394
  return visitExpressionStatement(node);
104309
104395
  case 214 /* ParenthesizedExpression */:
104310
104396
  return visitParenthesizedExpression(node, valueIsDiscarded);
104311
- case 355 /* PartiallyEmittedExpression */:
104397
+ case 356 /* PartiallyEmittedExpression */:
104312
104398
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
104313
104399
  case 223 /* BinaryExpression */:
104314
104400
  if (isDestructuringAssignment(node)) {
@@ -106995,7 +107081,7 @@ function noEmitNotification(hint, node, callback) {
106995
107081
  }
106996
107082
  function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
106997
107083
  var _a2, _b;
106998
- const enabledSyntaxKindFeatures = new Array(360 /* Count */);
107084
+ const enabledSyntaxKindFeatures = new Array(361 /* Count */);
106999
107085
  let lexicalEnvironmentVariableDeclarations;
107000
107086
  let lexicalEnvironmentFunctionDeclarations;
107001
107087
  let lexicalEnvironmentStatements;
@@ -108880,6 +108966,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
108880
108966
  case 346 /* JSDocThisTag */:
108881
108967
  case 347 /* JSDocTypeTag */:
108882
108968
  case 352 /* JSDocThrowsTag */:
108969
+ case 353 /* JSDocSatisfiesTag */:
108883
108970
  return emitJSDocSimpleTypedTag(node);
108884
108971
  case 348 /* JSDocTemplateTag */:
108885
108972
  return emitJSDocTemplateTag(node);
@@ -108887,9 +108974,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
108887
108974
  return emitJSDocTypedefTag(node);
108888
108975
  case 350 /* JSDocSeeTag */:
108889
108976
  return emitJSDocSeeTag(node);
108890
- case 354 /* NotEmittedStatement */:
108891
- case 358 /* EndOfDeclarationMarker */:
108892
- case 357 /* MergeDeclarationMarker */:
108977
+ case 355 /* NotEmittedStatement */:
108978
+ case 359 /* EndOfDeclarationMarker */:
108979
+ case 358 /* MergeDeclarationMarker */:
108893
108980
  return;
108894
108981
  }
108895
108982
  if (isExpression(node)) {
@@ -108988,18 +109075,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
108988
109075
  return emitJsxSelfClosingElement(node);
108989
109076
  case 285 /* JsxFragment */:
108990
109077
  return emitJsxFragment(node);
108991
- case 353 /* SyntaxList */:
109078
+ case 354 /* SyntaxList */:
108992
109079
  return Debug.fail("SyntaxList should not be printed");
108993
- case 354 /* NotEmittedStatement */:
109080
+ case 355 /* NotEmittedStatement */:
108994
109081
  return;
108995
- case 355 /* PartiallyEmittedExpression */:
109082
+ case 356 /* PartiallyEmittedExpression */:
108996
109083
  return emitPartiallyEmittedExpression(node);
108997
- case 356 /* CommaListExpression */:
109084
+ case 357 /* CommaListExpression */:
108998
109085
  return emitCommaList(node);
108999
- case 357 /* MergeDeclarationMarker */:
109000
- case 358 /* EndOfDeclarationMarker */:
109086
+ case 358 /* MergeDeclarationMarker */:
109087
+ case 359 /* EndOfDeclarationMarker */:
109001
109088
  return;
109002
- case 359 /* SyntheticReferenceExpression */:
109089
+ case 360 /* SyntheticReferenceExpression */:
109003
109090
  return Debug.fail("SyntheticReferenceExpression should not be printed");
109004
109091
  }
109005
109092
  }
@@ -112247,7 +112334,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112247
112334
  emitLeadingComments(
112248
112335
  pos,
112249
112336
  /*isEmittedNode*/
112250
- node.kind !== 354 /* NotEmittedStatement */
112337
+ node.kind !== 355 /* NotEmittedStatement */
112251
112338
  );
112252
112339
  }
112253
112340
  if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
@@ -112271,7 +112358,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112271
112358
  containerPos = savedContainerPos;
112272
112359
  containerEnd = savedContainerEnd;
112273
112360
  declarationListContainerEnd = savedDeclarationListContainerEnd;
112274
- if (!skipTrailingComments && node.kind !== 354 /* NotEmittedStatement */) {
112361
+ if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) {
112275
112362
  emitTrailingComments(end);
112276
112363
  }
112277
112364
  }
@@ -112543,7 +112630,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112543
112630
  }
112544
112631
  } else {
112545
112632
  const source = sourceMapRange.source || sourceMapSource;
112546
- if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
112633
+ if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
112547
112634
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
112548
112635
  }
112549
112636
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
@@ -112558,7 +112645,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112558
112645
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
112559
112646
  sourceMapsDisabled = false;
112560
112647
  }
112561
- if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
112648
+ if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
112562
112649
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
112563
112650
  }
112564
112651
  }
@@ -124244,6 +124331,8 @@ __export(ts_exports3, {
124244
124331
  getJSDocReturnTag: () => getJSDocReturnTag,
124245
124332
  getJSDocReturnType: () => getJSDocReturnType,
124246
124333
  getJSDocRoot: () => getJSDocRoot,
124334
+ getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
124335
+ getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
124247
124336
  getJSDocTags: () => getJSDocTags,
124248
124337
  getJSDocTagsNoCache: () => getJSDocTagsNoCache,
124249
124338
  getJSDocTemplateTag: () => getJSDocTemplateTag,
@@ -124870,6 +124959,8 @@ __export(ts_exports3, {
124870
124959
  isJSDocPublicTag: () => isJSDocPublicTag,
124871
124960
  isJSDocReadonlyTag: () => isJSDocReadonlyTag,
124872
124961
  isJSDocReturnTag: () => isJSDocReturnTag,
124962
+ isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
124963
+ isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
124873
124964
  isJSDocSeeTag: () => isJSDocSeeTag,
124874
124965
  isJSDocSignature: () => isJSDocSignature,
124875
124966
  isJSDocTag: () => isJSDocTag,
@@ -124930,6 +125021,8 @@ __export(ts_exports3, {
124930
125021
  isLogicalOperator: () => isLogicalOperator,
124931
125022
  isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
124932
125023
  isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
125024
+ isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
125025
+ isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
124933
125026
  isMappedTypeNode: () => isMappedTypeNode,
124934
125027
  isMemberName: () => isMemberName,
124935
125028
  isMergeDeclarationMarker: () => isMergeDeclarationMarker,
@@ -125615,6 +125708,7 @@ __export(ts_exports3, {
125615
125708
  tryGetDirectories: () => tryGetDirectories,
125616
125709
  tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
125617
125710
  tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
125711
+ tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
125618
125712
  tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
125619
125713
  tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
125620
125714
  tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
@@ -132965,7 +133059,7 @@ var NodeObject = class {
132965
133059
  if (!children.length) {
132966
133060
  return void 0;
132967
133061
  }
132968
- const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 352 /* LastJSDocNode */);
133062
+ const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */);
132969
133063
  return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
132970
133064
  }
132971
133065
  getLastToken(sourceFile) {
@@ -133032,7 +133126,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) {
133032
133126
  }
133033
133127
  }
133034
133128
  function createSyntaxList(nodes, parent2) {
133035
- const list = createNode(353 /* SyntaxList */, nodes.pos, nodes.end, parent2);
133129
+ const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2);
133036
133130
  list._children = [];
133037
133131
  let pos = nodes.pos;
133038
133132
  for (const node of nodes) {
@@ -147169,6 +147263,7 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
147169
147263
  void 0,
147170
147264
  contextToken,
147171
147265
  location,
147266
+ position,
147172
147267
  sourceFile,
147173
147268
  host,
147174
147269
  program,
@@ -147282,10 +147377,10 @@ function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options,
147282
147377
  } else if (!tracker.hasValue(type.value)) {
147283
147378
  switch (typeof type.value) {
147284
147379
  case "object":
147285
- elements.push(factory.createBigIntLiteral(type.value));
147380
+ elements.push(type.value.negative ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createBigIntLiteral({ negative: false, base10Value: type.value.base10Value })) : factory.createBigIntLiteral(type.value));
147286
147381
  break;
147287
147382
  case "number":
147288
- elements.push(factory.createNumericLiteral(type.value));
147383
+ elements.push(type.value < 0 ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createNumericLiteral(-type.value)) : factory.createNumericLiteral(type.value));
147289
147384
  break;
147290
147385
  case "string":
147291
147386
  elements.push(factory.createStringLiteral(type.value, quotePreference === 0 /* Single */));
@@ -147494,7 +147589,7 @@ function completionNameForLiteral(sourceFile, preferences, literal) {
147494
147589
  function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
147495
147590
  return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
147496
147591
  }
147497
- function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
147592
+ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
147498
147593
  let insertText;
147499
147594
  let replacementSpan = getReplacementSpanForContextToken(replacementToken);
147500
147595
  let data;
@@ -147552,7 +147647,7 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken,
147552
147647
  }
147553
147648
  if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
147554
147649
  let importAdder;
147555
- ({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext));
147650
+ ({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
147556
147651
  sortText = SortText.ClassMemberSnippets;
147557
147652
  if (importAdder == null ? void 0 : importAdder.hasFixes()) {
147558
147653
  hasAction = true;
@@ -147616,7 +147711,7 @@ function isClassLikeMemberCompletion(symbol, location, sourceFile) {
147616
147711
  const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;
147617
147712
  return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));
147618
147713
  }
147619
- function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) {
147714
+ function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {
147620
147715
  const classLikeDeclaration = findAncestor(location, isClassLike);
147621
147716
  if (!classLikeDeclaration) {
147622
147717
  return { insertText: name };
@@ -147652,7 +147747,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
147652
147747
  );
147653
147748
  }
147654
147749
  let modifiers = 0 /* None */;
147655
- const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken);
147750
+ const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position);
147656
147751
  const isAbstract = !!(presentModifiers & 256 /* Abstract */);
147657
147752
  const completionNodes = [];
147658
147753
  ts_codefix_exports.addNewNodeForMemberSymbol(
@@ -147707,8 +147802,8 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
147707
147802
  }
147708
147803
  return { insertText, isSnippet, importAdder, replacementSpan };
147709
147804
  }
147710
- function getPresentModifiers(contextToken) {
147711
- if (!contextToken) {
147805
+ function getPresentModifiers(contextToken, sourceFile, position) {
147806
+ if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
147712
147807
  return { modifiers: 0 /* None */ };
147713
147808
  }
147714
147809
  let modifiers = 0 /* None */;
@@ -148074,7 +148169,7 @@ function getSourceFromOrigin(origin) {
148074
148169
  return "TypeOnlyAlias/" /* TypeOnlyAlias */;
148075
148170
  }
148076
148171
  }
148077
- function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
148172
+ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
148078
148173
  var _a2;
148079
148174
  const start2 = timestamp();
148080
148175
  const variableDeclaration = getVariableDeclaration(location);
@@ -148097,6 +148192,7 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
148097
148192
  replacementToken,
148098
148193
  contextToken,
148099
148194
  location,
148195
+ position,
148100
148196
  sourceFile,
148101
148197
  host,
148102
148198
  program,
@@ -148340,6 +148436,7 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo
148340
148436
  name,
148341
148437
  symbol,
148342
148438
  location,
148439
+ position,
148343
148440
  contextToken,
148344
148441
  formatContext
148345
148442
  );
@@ -148720,6 +148817,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
148720
148817
  case 347 /* JSDocTypeTag */:
148721
148818
  case 349 /* JSDocTypedefTag */:
148722
148819
  case 352 /* JSDocThrowsTag */:
148820
+ case 353 /* JSDocSatisfiesTag */:
148723
148821
  return true;
148724
148822
  case 348 /* JSDocTemplateTag */:
148725
148823
  return !!tag.constraint;
@@ -149980,7 +150078,7 @@ function getPropertiesForCompletion(type, checker) {
149980
150078
  function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
149981
150079
  var _a2;
149982
150080
  switch (location.kind) {
149983
- case 353 /* SyntaxList */:
150081
+ case 354 /* SyntaxList */:
149984
150082
  return tryCast(location.parent, isObjectTypeDeclaration);
149985
150083
  case 1 /* EndOfFileToken */:
149986
150084
  const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
@@ -150326,10 +150424,10 @@ function getStringLiteralCompletions(sourceFile, position, contextToken, options
150326
150424
  if (!contextToken || !isStringLiteralLike(contextToken))
150327
150425
  return void 0;
150328
150426
  const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
150329
- return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences);
150427
+ return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
150330
150428
  }
150331
150429
  }
150332
- function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences) {
150430
+ function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
150333
150431
  if (completion === void 0) {
150334
150432
  return void 0;
150335
150433
  }
@@ -150345,6 +150443,7 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h
150345
150443
  contextToken,
150346
150444
  contextToken,
150347
150445
  sourceFile,
150446
+ position,
150348
150447
  sourceFile,
150349
150448
  host,
150350
150449
  program,
@@ -150985,7 +151084,7 @@ function removeLeadingDirectorySeparator(path) {
150985
151084
  }
150986
151085
  function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
150987
151086
  const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
150988
- const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment));
151087
+ const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0);
150989
151088
  if (fragmentDirectory !== void 0) {
150990
151089
  const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
150991
151090
  return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
@@ -154398,6 +154497,7 @@ var jsDocTagNames = [
154398
154497
  "readonly",
154399
154498
  "requires",
154400
154499
  "returns",
154500
+ "satisfies",
154401
154501
  "see",
154402
154502
  "since",
154403
154503
  "static",
@@ -154507,6 +154607,7 @@ function getCommentDisplayParts(tag, checker) {
154507
154607
  }
154508
154608
  return displayParts;
154509
154609
  case 347 /* JSDocTypeTag */:
154610
+ case 353 /* JSDocSatisfiesTag */:
154510
154611
  return withNode(tag.typeExpression);
154511
154612
  case 349 /* JSDocTypedefTag */:
154512
154613
  case 341 /* JSDocCallbackTag */:
@@ -179881,6 +179982,8 @@ start(initializeNodeSystem(), require("os").platform());
179881
179982
  getJSDocReturnTag,
179882
179983
  getJSDocReturnType,
179883
179984
  getJSDocRoot,
179985
+ getJSDocSatisfiesExpressionType,
179986
+ getJSDocSatisfiesTag,
179884
179987
  getJSDocTags,
179885
179988
  getJSDocTagsNoCache,
179886
179989
  getJSDocTemplateTag,
@@ -180507,6 +180610,8 @@ start(initializeNodeSystem(), require("os").platform());
180507
180610
  isJSDocPublicTag,
180508
180611
  isJSDocReadonlyTag,
180509
180612
  isJSDocReturnTag,
180613
+ isJSDocSatisfiesExpression,
180614
+ isJSDocSatisfiesTag,
180510
180615
  isJSDocSeeTag,
180511
180616
  isJSDocSignature,
180512
180617
  isJSDocTag,
@@ -180567,6 +180672,8 @@ start(initializeNodeSystem(), require("os").platform());
180567
180672
  isLogicalOperator,
180568
180673
  isLogicalOrCoalescingAssignmentExpression,
180569
180674
  isLogicalOrCoalescingAssignmentOperator,
180675
+ isLogicalOrCoalescingBinaryExpression,
180676
+ isLogicalOrCoalescingBinaryOperator,
180570
180677
  isMappedTypeNode,
180571
180678
  isMemberName,
180572
180679
  isMergeDeclarationMarker,
@@ -181252,6 +181359,7 @@ start(initializeNodeSystem(), require("os").platform());
181252
181359
  tryGetDirectories,
181253
181360
  tryGetExtensionFromPath,
181254
181361
  tryGetImportFromModuleSpecifier,
181362
+ tryGetJSDocSatisfiesTypeNode,
181255
181363
  tryGetModuleNameFromFile,
181256
181364
  tryGetModuleSpecifierFromDeclaration,
181257
181365
  tryGetNativePerformanceHooks,