@typescript-deploys/pr-build 5.0.0-pr-51373-23 → 5.0.0-pr-51753-3

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
@@ -1695,22 +1695,8 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1695
1695
  function enableDebugInfo() {
1696
1696
  if (isDebugInfoEnabled)
1697
1697
  return;
1698
- let weakTypeTextMap;
1699
- let weakNodeTextMap;
1700
- function getWeakTypeTextMap() {
1701
- if (weakTypeTextMap === void 0) {
1702
- if (typeof WeakMap === "function")
1703
- weakTypeTextMap = /* @__PURE__ */ new WeakMap();
1704
- }
1705
- return weakTypeTextMap;
1706
- }
1707
- function getWeakNodeTextMap() {
1708
- if (weakNodeTextMap === void 0) {
1709
- if (typeof WeakMap === "function")
1710
- weakNodeTextMap = /* @__PURE__ */ new WeakMap();
1711
- }
1712
- return weakNodeTextMap;
1713
- }
1698
+ const weakTypeTextMap = /* @__PURE__ */ new WeakMap();
1699
+ const weakNodeTextMap = /* @__PURE__ */ new WeakMap();
1714
1700
  Object.defineProperties(objectAllocator.getSymbolConstructor().prototype, {
1715
1701
  __tsDebuggerDisplay: {
1716
1702
  value() {
@@ -1739,11 +1725,10 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1739
1725
  } },
1740
1726
  __debugTypeToString: {
1741
1727
  value() {
1742
- const map2 = getWeakTypeTextMap();
1743
- let text = map2 == null ? void 0 : map2.get(this);
1728
+ let text = weakTypeTextMap.get(this);
1744
1729
  if (text === void 0) {
1745
1730
  text = this.checker.typeToString(this);
1746
- map2 == null ? void 0 : map2.set(this, text);
1731
+ weakTypeTextMap.set(this, text);
1747
1732
  }
1748
1733
  return text;
1749
1734
  }
@@ -1795,13 +1780,12 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1795
1780
  value(includeTrivia) {
1796
1781
  if (nodeIsSynthesized(this))
1797
1782
  return "";
1798
- const map2 = getWeakNodeTextMap();
1799
- let text = map2 == null ? void 0 : map2.get(this);
1783
+ let text = weakNodeTextMap.get(this);
1800
1784
  if (text === void 0) {
1801
1785
  const parseNode = getParseTreeNode(this);
1802
1786
  const sourceFile = parseNode && getSourceFileOfNode(parseNode);
1803
1787
  text = sourceFile ? getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : "";
1804
- map2 == null ? void 0 : map2.set(this, text);
1788
+ weakNodeTextMap.set(this, text);
1805
1789
  }
1806
1790
  return text;
1807
1791
  }
@@ -3356,14 +3340,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
3356
3340
  SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 348] = "JSDocTypedefTag";
3357
3341
  SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 349] = "JSDocSeeTag";
3358
3342
  SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 350] = "JSDocPropertyTag";
3359
- SyntaxKind4[SyntaxKind4["SyntaxList"] = 351] = "SyntaxList";
3360
- SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 352] = "NotEmittedStatement";
3361
- SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 353] = "PartiallyEmittedExpression";
3362
- SyntaxKind4[SyntaxKind4["CommaListExpression"] = 354] = "CommaListExpression";
3363
- SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 355] = "MergeDeclarationMarker";
3364
- SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 356] = "EndOfDeclarationMarker";
3365
- SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 357] = "SyntheticReferenceExpression";
3366
- SyntaxKind4[SyntaxKind4["Count"] = 358] = "Count";
3343
+ SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 351] = "JSDocSatisfiesTag";
3344
+ SyntaxKind4[SyntaxKind4["SyntaxList"] = 352] = "SyntaxList";
3345
+ SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 353] = "NotEmittedStatement";
3346
+ SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 354] = "PartiallyEmittedExpression";
3347
+ SyntaxKind4[SyntaxKind4["CommaListExpression"] = 355] = "CommaListExpression";
3348
+ SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 356] = "MergeDeclarationMarker";
3349
+ SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 357] = "EndOfDeclarationMarker";
3350
+ SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 358] = "SyntheticReferenceExpression";
3351
+ SyntaxKind4[SyntaxKind4["Count"] = 359] = "Count";
3367
3352
  SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
3368
3353
  SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
3369
3354
  SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -9891,6 +9876,9 @@ function getJSDocThisTag(node) {
9891
9876
  function getJSDocReturnTag(node) {
9892
9877
  return getFirstJSDocTag(node, isJSDocReturnTag);
9893
9878
  }
9879
+ function getJSDocSatisfiesTag(node) {
9880
+ return getFirstJSDocTag(node, isJSDocSatisfiesTag);
9881
+ }
9894
9882
  function getJSDocTypeTag(node) {
9895
9883
  const tag = getFirstJSDocTag(node, isJSDocTypeTag);
9896
9884
  if (tag && tag.typeExpression && tag.typeExpression.type) {
@@ -10381,8 +10369,8 @@ function isExpressionKind(kind) {
10381
10369
  case 227 /* SpreadElement */:
10382
10370
  case 231 /* AsExpression */:
10383
10371
  case 229 /* OmittedExpression */:
10384
- case 354 /* CommaListExpression */:
10385
- case 353 /* PartiallyEmittedExpression */:
10372
+ case 355 /* CommaListExpression */:
10373
+ case 354 /* PartiallyEmittedExpression */:
10386
10374
  case 235 /* SatisfiesExpression */:
10387
10375
  return true;
10388
10376
  default:
@@ -10445,7 +10433,7 @@ function isDeclarationStatementKind(kind) {
10445
10433
  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 */;
10446
10434
  }
10447
10435
  function isStatementKindButNotDeclarationKind(kind) {
10448
- 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 === 352 /* NotEmittedStatement */ || kind === 356 /* EndOfDeclarationMarker */ || kind === 355 /* MergeDeclarationMarker */;
10436
+ 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 === 353 /* NotEmittedStatement */ || kind === 357 /* EndOfDeclarationMarker */ || kind === 356 /* MergeDeclarationMarker */;
10449
10437
  }
10450
10438
  function isDeclaration(node) {
10451
10439
  if (node.kind === 165 /* TypeParameter */) {
@@ -10891,7 +10879,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
10891
10879
  if (includeJsDoc && hasJSDocNodes(node)) {
10892
10880
  return getTokenPosOfNode(node.jsDoc[0], sourceFile);
10893
10881
  }
10894
- if (node.kind === 351 /* SyntaxList */ && node._children.length > 0) {
10882
+ if (node.kind === 352 /* SyntaxList */ && node._children.length > 0) {
10895
10883
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
10896
10884
  }
10897
10885
  return skipTrivia(
@@ -12952,7 +12940,7 @@ function getOperator(expression) {
12952
12940
  }
12953
12941
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
12954
12942
  switch (nodeKind) {
12955
- case 354 /* CommaListExpression */:
12943
+ case 355 /* CommaListExpression */:
12956
12944
  return 0 /* Comma */;
12957
12945
  case 227 /* SpreadElement */:
12958
12946
  return 1 /* Spread */;
@@ -14374,7 +14362,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
14374
14362
  case 209 /* ElementAccessExpression */:
14375
14363
  case 208 /* PropertyAccessExpression */:
14376
14364
  case 232 /* NonNullExpression */:
14377
- case 353 /* PartiallyEmittedExpression */:
14365
+ case 354 /* PartiallyEmittedExpression */:
14378
14366
  case 235 /* SatisfiesExpression */:
14379
14367
  node = node.expression;
14380
14368
  continue;
@@ -15499,7 +15487,7 @@ function getContainingNodeArray(node) {
15499
15487
  return parent.types;
15500
15488
  case 186 /* TupleType */:
15501
15489
  case 206 /* ArrayLiteralExpression */:
15502
- case 354 /* CommaListExpression */:
15490
+ case 355 /* CommaListExpression */:
15503
15491
  case 272 /* NamedImports */:
15504
15492
  case 276 /* NamedExports */:
15505
15493
  return parent.elements;
@@ -15651,6 +15639,15 @@ function canUsePropertyAccess(name, languageVersion) {
15651
15639
  const firstChar = name.charCodeAt(0);
15652
15640
  return firstChar === 35 /* hash */ ? name.length > 1 && isIdentifierStart(name.charCodeAt(1), languageVersion) : isIdentifierStart(firstChar, languageVersion);
15653
15641
  }
15642
+ function isJSDocSatisfiesExpression(node) {
15643
+ return isInJSFile(node) && isParenthesizedExpression(node) && !!getJSDocSatisfiesTag(node);
15644
+ }
15645
+ function getJSDocSatisfiesExpressionType(node) {
15646
+ const tag = getJSDocSatisfiesTag(node);
15647
+ const type = tag && tag.typeExpression && tag.typeExpression.type;
15648
+ Debug.assertIsDefined(type);
15649
+ return type;
15650
+ }
15654
15651
 
15655
15652
  // src/compiler/factory/baseNodeFactory.ts
15656
15653
  function createBaseNodeFactory() {
@@ -16595,6 +16592,12 @@ function createNodeFactory(flags, baseFactory2) {
16595
16592
  get updateJSDocDeprecatedTag() {
16596
16593
  return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */);
16597
16594
  },
16595
+ get createJSDocSatisfiesTag() {
16596
+ return getJSDocTypeLikeTagCreateFunction(351 /* JSDocSatisfiesTag */);
16597
+ },
16598
+ get updateJSDocSatisfiesTag() {
16599
+ return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocSatisfiesTag */);
16600
+ },
16598
16601
  createJSDocUnknownTag,
16599
16602
  updateJSDocUnknownTag,
16600
16603
  createJSDocText,
@@ -19544,18 +19547,18 @@ function createNodeFactory(flags, baseFactory2) {
19544
19547
  return node;
19545
19548
  }
19546
19549
  function createSyntaxList(children) {
19547
- const node = createBaseNode(351 /* SyntaxList */);
19550
+ const node = createBaseNode(352 /* SyntaxList */);
19548
19551
  node._children = children;
19549
19552
  return node;
19550
19553
  }
19551
19554
  function createNotEmittedStatement(original) {
19552
- const node = createBaseNode(352 /* NotEmittedStatement */);
19555
+ const node = createBaseNode(353 /* NotEmittedStatement */);
19553
19556
  node.original = original;
19554
19557
  setTextRange(node, original);
19555
19558
  return node;
19556
19559
  }
19557
19560
  function createPartiallyEmittedExpression(expression, original) {
19558
- const node = createBaseNode(353 /* PartiallyEmittedExpression */);
19561
+ const node = createBaseNode(354 /* PartiallyEmittedExpression */);
19559
19562
  node.expression = expression;
19560
19563
  node.original = original;
19561
19564
  node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
@@ -19577,7 +19580,7 @@ function createNodeFactory(flags, baseFactory2) {
19577
19580
  return node;
19578
19581
  }
19579
19582
  function createCommaListExpression(elements) {
19580
- const node = createBaseNode(354 /* CommaListExpression */);
19583
+ const node = createBaseNode(355 /* CommaListExpression */);
19581
19584
  node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
19582
19585
  node.transformFlags |= propagateChildrenFlags(node.elements);
19583
19586
  return node;
@@ -19586,19 +19589,19 @@ function createNodeFactory(flags, baseFactory2) {
19586
19589
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
19587
19590
  }
19588
19591
  function createEndOfDeclarationMarker(original) {
19589
- const node = createBaseNode(356 /* EndOfDeclarationMarker */);
19592
+ const node = createBaseNode(357 /* EndOfDeclarationMarker */);
19590
19593
  node.emitNode = {};
19591
19594
  node.original = original;
19592
19595
  return node;
19593
19596
  }
19594
19597
  function createMergeDeclarationMarker(original) {
19595
- const node = createBaseNode(355 /* MergeDeclarationMarker */);
19598
+ const node = createBaseNode(356 /* MergeDeclarationMarker */);
19596
19599
  node.emitNode = {};
19597
19600
  node.original = original;
19598
19601
  return node;
19599
19602
  }
19600
19603
  function createSyntheticReferenceExpression(expression, thisArg) {
19601
- const node = createBaseNode(357 /* SyntheticReferenceExpression */);
19604
+ const node = createBaseNode(358 /* SyntheticReferenceExpression */);
19602
19605
  node.expression = expression;
19603
19606
  node.thisArg = thisArg;
19604
19607
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -19746,7 +19749,7 @@ function createNodeFactory(flags, baseFactory2) {
19746
19749
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
19747
19750
  case 232 /* NonNullExpression */:
19748
19751
  return updateNonNullExpression(outerExpression, expression);
19749
- case 353 /* PartiallyEmittedExpression */:
19752
+ case 354 /* PartiallyEmittedExpression */:
19750
19753
  return updatePartiallyEmittedExpression(outerExpression, expression);
19751
19754
  }
19752
19755
  }
@@ -20237,7 +20240,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
20237
20240
  case 213 /* TypeAssertionExpression */:
20238
20241
  case 235 /* SatisfiesExpression */:
20239
20242
  case 231 /* AsExpression */:
20240
- case 353 /* PartiallyEmittedExpression */:
20243
+ case 354 /* PartiallyEmittedExpression */:
20241
20244
  case 214 /* ParenthesizedExpression */:
20242
20245
  case 106 /* SuperKeyword */:
20243
20246
  return -2147483648 /* OuterExpressionExcludes */;
@@ -21689,10 +21692,10 @@ function isMetaProperty(node) {
21689
21692
  return node.kind === 233 /* MetaProperty */;
21690
21693
  }
21691
21694
  function isPartiallyEmittedExpression(node) {
21692
- return node.kind === 353 /* PartiallyEmittedExpression */;
21695
+ return node.kind === 354 /* PartiallyEmittedExpression */;
21693
21696
  }
21694
21697
  function isCommaListExpression(node) {
21695
- return node.kind === 354 /* CommaListExpression */;
21698
+ return node.kind === 355 /* CommaListExpression */;
21696
21699
  }
21697
21700
  function isTemplateSpan(node) {
21698
21701
  return node.kind === 236 /* TemplateSpan */;
@@ -21815,10 +21818,10 @@ function isExportSpecifier(node) {
21815
21818
  return node.kind === 278 /* ExportSpecifier */;
21816
21819
  }
21817
21820
  function isNotEmittedStatement(node) {
21818
- return node.kind === 352 /* NotEmittedStatement */;
21821
+ return node.kind === 353 /* NotEmittedStatement */;
21819
21822
  }
21820
21823
  function isSyntheticReference(node) {
21821
- return node.kind === 357 /* SyntheticReferenceExpression */;
21824
+ return node.kind === 358 /* SyntheticReferenceExpression */;
21822
21825
  }
21823
21826
  function isExternalModuleReference(node) {
21824
21827
  return node.kind === 280 /* ExternalModuleReference */;
@@ -21979,6 +21982,9 @@ function isJSDocTypedefTag(node) {
21979
21982
  function isJSDocImplementsTag(node) {
21980
21983
  return node.kind === 332 /* JSDocImplementsTag */;
21981
21984
  }
21985
+ function isJSDocSatisfiesTag(node) {
21986
+ return node.kind === 351 /* JSDocSatisfiesTag */;
21987
+ }
21982
21988
 
21983
21989
  // src/compiler/factory/utilities.ts
21984
21990
  function createEmptyExports(factory2) {
@@ -22274,7 +22280,7 @@ function startsWithUseStrict(statements) {
22274
22280
  return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
22275
22281
  }
22276
22282
  function isCommaSequence(node) {
22277
- return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 354 /* CommaListExpression */;
22283
+ return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 355 /* CommaListExpression */;
22278
22284
  }
22279
22285
  function isJSDocTypeAssertion(node) {
22280
22286
  return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
@@ -22297,7 +22303,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
22297
22303
  return (kinds & 2 /* TypeAssertions */) !== 0;
22298
22304
  case 232 /* NonNullExpression */:
22299
22305
  return (kinds & 4 /* NonNullAssertions */) !== 0;
22300
- case 353 /* PartiallyEmittedExpression */:
22306
+ case 354 /* PartiallyEmittedExpression */:
22301
22307
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
22302
22308
  }
22303
22309
  return false;
@@ -23224,7 +23230,7 @@ var forEachChildTable = {
23224
23230
  [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
23225
23231
  return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
23226
23232
  },
23227
- [354 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
23233
+ [355 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
23228
23234
  return visitNodes(cbNode, cbNodes, node.elements);
23229
23235
  },
23230
23236
  [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
@@ -23292,10 +23298,11 @@ var forEachChildTable = {
23292
23298
  [341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) {
23293
23299
  return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
23294
23300
  },
23295
- [344 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag,
23296
- [346 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag,
23297
- [345 /* JSDocThisTag */]: forEachChildInJSDocReturnTag,
23298
- [342 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag,
23301
+ [344 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag,
23302
+ [346 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
23303
+ [345 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
23304
+ [342 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
23305
+ [351 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
23299
23306
  [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
23300
23307
  return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type);
23301
23308
  },
@@ -23313,7 +23320,7 @@ var forEachChildTable = {
23313
23320
  [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
23314
23321
  [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
23315
23322
  [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
23316
- [353 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
23323
+ [354 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
23317
23324
  };
23318
23325
  function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
23319
23326
  return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
@@ -23354,7 +23361,7 @@ function forEachChildInOptionalRestOrJSDocParameterModifier(node, cbNode, _cbNod
23354
23361
  function forEachChildInJSDocParameterOrPropertyTag(node, cbNode, cbNodes) {
23355
23362
  return visitNode2(cbNode, node.tagName) || (node.isNameFirst ? visitNode2(cbNode, node.name) || visitNode2(cbNode, node.typeExpression) : visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.name)) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
23356
23363
  }
23357
- function forEachChildInJSDocReturnTag(node, cbNode, cbNodes) {
23364
+ function forEachChildInJSDocTypeLikeTag(node, cbNode, cbNodes) {
23358
23365
  return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
23359
23366
  }
23360
23367
  function forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) {
@@ -28634,6 +28641,9 @@ var Parser;
28634
28641
  case "callback":
28635
28642
  tag = parseCallbackTag(start2, tagName, margin, indentText);
28636
28643
  break;
28644
+ case "satisfies":
28645
+ tag = parseSatisfiesTag(start2, tagName, margin, indentText);
28646
+ break;
28637
28647
  case "see":
28638
28648
  tag = parseSeeTag(start2, tagName, margin, indentText);
28639
28649
  break;
@@ -28927,6 +28937,14 @@ var Parser;
28927
28937
  const className = parseExpressionWithTypeArgumentsForAugments();
28928
28938
  return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
28929
28939
  }
28940
+ function parseSatisfiesTag(start2, tagName, margin, indentText) {
28941
+ if (some(tags, isJSDocSatisfiesTag)) {
28942
+ parseErrorAt(tagName.pos, scanner.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText);
28943
+ }
28944
+ const typeExpression = parseJSDocTypeExpression(true);
28945
+ const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
28946
+ return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
28947
+ }
28930
28948
  function parseExpressionWithTypeArgumentsForAugments() {
28931
28949
  const usedBrace = parseOptional(18 /* OpenBraceToken */);
28932
28950
  const pos = getNodePos();
@@ -58996,6 +59014,9 @@ function createTypeChecker(host) {
58996
59014
  Debug.assert(parent.parent.kind === 225 /* TemplateExpression */);
58997
59015
  return getContextualTypeForSubstitutionExpression(parent.parent, node);
58998
59016
  case 214 /* ParenthesizedExpression */: {
59017
+ if (isJSDocSatisfiesExpression(parent)) {
59018
+ return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent));
59019
+ }
58999
59020
  const tag = isInJSFile(parent) ? getJSDocTypeTag(parent) : void 0;
59000
59021
  return !tag ? getContextualType(parent, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(tag.typeExpression.type);
59001
59022
  }
@@ -62715,12 +62736,15 @@ function createTypeChecker(host) {
62715
62736
  }
62716
62737
  function checkSatisfiesExpression(node) {
62717
62738
  checkSourceElement(node.type);
62718
- const exprType = checkExpression(node.expression);
62719
- const targetType = getTypeFromTypeNode(node.type);
62739
+ return checkSatisfiesExpressionWorker(node.expression, node.type);
62740
+ }
62741
+ function checkSatisfiesExpressionWorker(expression, target, checkMode) {
62742
+ const exprType = checkExpression(expression, checkMode);
62743
+ const targetType = getTypeFromTypeNode(target);
62720
62744
  if (isErrorType(targetType)) {
62721
62745
  return targetType;
62722
62746
  }
62723
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, node.type, node.expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
62747
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
62724
62748
  return exprType;
62725
62749
  }
62726
62750
  function checkMetaProperty(node) {
@@ -64834,9 +64858,14 @@ function createTypeChecker(host) {
64834
64858
  }
64835
64859
  }
64836
64860
  function checkParenthesizedExpression(node, checkMode) {
64837
- if (hasJSDocNodes(node) && isJSDocTypeAssertion(node)) {
64838
- const type = getJSDocTypeAssertionType(node);
64839
- return checkAssertionWorker(type, type, node.expression, checkMode);
64861
+ if (hasJSDocNodes(node)) {
64862
+ if (isJSDocSatisfiesExpression(node)) {
64863
+ return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
64864
+ }
64865
+ if (isJSDocTypeAssertion(node)) {
64866
+ const type = getJSDocTypeAssertionType(node);
64867
+ return checkAssertionWorker(type, type, node.expression, checkMode);
64868
+ }
64840
64869
  }
64841
64870
  return checkExpression(node.expression, checkMode);
64842
64871
  }
@@ -66464,6 +66493,9 @@ function createTypeChecker(host) {
66464
66493
  function checkJSDocTypeTag(node) {
66465
66494
  checkSourceElement(node.typeExpression);
66466
66495
  }
66496
+ function checkJSDocSatisfiesTag(node) {
66497
+ checkSourceElement(node.typeExpression);
66498
+ }
66467
66499
  function checkJSDocLinkLikeTag(node) {
66468
66500
  if (node.name) {
66469
66501
  resolveJSDocMemberName(node.name, true);
@@ -69799,6 +69831,8 @@ function createTypeChecker(host) {
69799
69831
  case 338 /* JSDocProtectedTag */:
69800
69832
  case 337 /* JSDocPrivateTag */:
69801
69833
  return checkJSDocAccessibilityModifiers(node);
69834
+ case 351 /* JSDocSatisfiesTag */:
69835
+ return checkJSDocSatisfiesTag(node);
69802
69836
  case 196 /* IndexedAccessType */:
69803
69837
  return checkIndexedAccessType(node);
69804
69838
  case 197 /* MappedType */:
@@ -74202,13 +74236,13 @@ var visitEachChildTable = {
74202
74236
  visitLexicalEnvironment(node.statements, visitor, context)
74203
74237
  );
74204
74238
  },
74205
- [353 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
74239
+ [354 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
74206
74240
  return context.factory.updatePartiallyEmittedExpression(
74207
74241
  node,
74208
74242
  nodeVisitor(node.expression, visitor, isExpression)
74209
74243
  );
74210
74244
  },
74211
- [354 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
74245
+ [355 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
74212
74246
  return context.factory.updateCommaListExpression(
74213
74247
  node,
74214
74248
  nodesVisitor(node.elements, visitor, isExpression)
@@ -80107,7 +80141,7 @@ function transformES2018(context) {
80107
80141
  return visitObjectLiteralExpression(node);
80108
80142
  case 223 /* BinaryExpression */:
80109
80143
  return visitBinaryExpression(node, expressionResultIsUnused2);
80110
- case 354 /* CommaListExpression */:
80144
+ case 355 /* CommaListExpression */:
80111
80145
  return visitCommaListExpression(node, expressionResultIsUnused2);
80112
80146
  case 295 /* CatchClause */:
80113
80147
  return visitCatchClause(node);
@@ -82303,7 +82337,7 @@ function transformES2015(context) {
82303
82337
  return visitParenthesizedExpression(node, expressionResultIsUnused2);
82304
82338
  case 223 /* BinaryExpression */:
82305
82339
  return visitBinaryExpression(node, expressionResultIsUnused2);
82306
- case 354 /* CommaListExpression */:
82340
+ case 355 /* CommaListExpression */:
82307
82341
  return visitCommaListExpression(node, expressionResultIsUnused2);
82308
82342
  case 14 /* NoSubstitutionTemplateLiteral */:
82309
82343
  case 15 /* TemplateHead */:
@@ -84998,7 +85032,7 @@ function transformGenerators(context) {
84998
85032
  switch (node.kind) {
84999
85033
  case 223 /* BinaryExpression */:
85000
85034
  return visitBinaryExpression(node);
85001
- case 354 /* CommaListExpression */:
85035
+ case 355 /* CommaListExpression */:
85002
85036
  return visitCommaListExpression(node);
85003
85037
  case 224 /* ConditionalExpression */:
85004
85038
  return visitConditionalExpression(node);
@@ -87083,9 +87117,9 @@ function transformModule(context) {
87083
87117
  return visitFunctionDeclaration(node);
87084
87118
  case 260 /* ClassDeclaration */:
87085
87119
  return visitClassDeclaration(node);
87086
- case 355 /* MergeDeclarationMarker */:
87120
+ case 356 /* MergeDeclarationMarker */:
87087
87121
  return visitMergeDeclarationMarker(node);
87088
- case 356 /* EndOfDeclarationMarker */:
87122
+ case 357 /* EndOfDeclarationMarker */:
87089
87123
  return visitEndOfDeclarationMarker(node);
87090
87124
  default:
87091
87125
  return visitor(node);
@@ -87102,7 +87136,7 @@ function transformModule(context) {
87102
87136
  return visitExpressionStatement(node);
87103
87137
  case 214 /* ParenthesizedExpression */:
87104
87138
  return visitParenthesizedExpression(node, valueIsDiscarded);
87105
- case 353 /* PartiallyEmittedExpression */:
87139
+ case 354 /* PartiallyEmittedExpression */:
87106
87140
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
87107
87141
  case 210 /* CallExpression */:
87108
87142
  if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
@@ -88877,9 +88911,9 @@ function transformSystemModule(context) {
88877
88911
  return visitCatchClause(node);
88878
88912
  case 238 /* Block */:
88879
88913
  return visitBlock(node);
88880
- case 355 /* MergeDeclarationMarker */:
88914
+ case 356 /* MergeDeclarationMarker */:
88881
88915
  return visitMergeDeclarationMarker(node);
88882
- case 356 /* EndOfDeclarationMarker */:
88916
+ case 357 /* EndOfDeclarationMarker */:
88883
88917
  return visitEndOfDeclarationMarker(node);
88884
88918
  default:
88885
88919
  return visitor(node);
@@ -89027,7 +89061,7 @@ function transformSystemModule(context) {
89027
89061
  return visitExpressionStatement(node);
89028
89062
  case 214 /* ParenthesizedExpression */:
89029
89063
  return visitParenthesizedExpression(node, valueIsDiscarded);
89030
- case 353 /* PartiallyEmittedExpression */:
89064
+ case 354 /* PartiallyEmittedExpression */:
89031
89065
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
89032
89066
  case 223 /* BinaryExpression */:
89033
89067
  if (isDestructuringAssignment(node)) {
@@ -91428,7 +91462,7 @@ function noEmitNotification(hint, node, callback) {
91428
91462
  }
91429
91463
  function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
91430
91464
  var _a2, _b;
91431
- const enabledSyntaxKindFeatures = new Array(358 /* Count */);
91465
+ const enabledSyntaxKindFeatures = new Array(359 /* Count */);
91432
91466
  let lexicalEnvironmentVariableDeclarations;
91433
91467
  let lexicalEnvironmentFunctionDeclarations;
91434
91468
  let lexicalEnvironmentStatements;
@@ -93135,6 +93169,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
93135
93169
  case 344 /* JSDocReturnTag */:
93136
93170
  case 345 /* JSDocThisTag */:
93137
93171
  case 346 /* JSDocTypeTag */:
93172
+ case 351 /* JSDocSatisfiesTag */:
93138
93173
  return emitJSDocSimpleTypedTag(node);
93139
93174
  case 347 /* JSDocTemplateTag */:
93140
93175
  return emitJSDocTemplateTag(node);
@@ -93142,9 +93177,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
93142
93177
  return emitJSDocTypedefTag(node);
93143
93178
  case 349 /* JSDocSeeTag */:
93144
93179
  return emitJSDocSeeTag(node);
93145
- case 352 /* NotEmittedStatement */:
93146
- case 356 /* EndOfDeclarationMarker */:
93147
- case 355 /* MergeDeclarationMarker */:
93180
+ case 353 /* NotEmittedStatement */:
93181
+ case 357 /* EndOfDeclarationMarker */:
93182
+ case 356 /* MergeDeclarationMarker */:
93148
93183
  return;
93149
93184
  }
93150
93185
  if (isExpression(node)) {
@@ -93239,18 +93274,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
93239
93274
  return emitJsxSelfClosingElement(node);
93240
93275
  case 285 /* JsxFragment */:
93241
93276
  return emitJsxFragment(node);
93242
- case 351 /* SyntaxList */:
93277
+ case 352 /* SyntaxList */:
93243
93278
  return Debug.fail("SyntaxList should not be printed");
93244
- case 352 /* NotEmittedStatement */:
93279
+ case 353 /* NotEmittedStatement */:
93245
93280
  return;
93246
- case 353 /* PartiallyEmittedExpression */:
93281
+ case 354 /* PartiallyEmittedExpression */:
93247
93282
  return emitPartiallyEmittedExpression(node);
93248
- case 354 /* CommaListExpression */:
93283
+ case 355 /* CommaListExpression */:
93249
93284
  return emitCommaList(node);
93250
- case 355 /* MergeDeclarationMarker */:
93251
- case 356 /* EndOfDeclarationMarker */:
93285
+ case 356 /* MergeDeclarationMarker */:
93286
+ case 357 /* EndOfDeclarationMarker */:
93252
93287
  return;
93253
- case 357 /* SyntheticReferenceExpression */:
93288
+ case 358 /* SyntheticReferenceExpression */:
93254
93289
  return Debug.fail("SyntheticReferenceExpression should not be printed");
93255
93290
  }
93256
93291
  }
@@ -96165,7 +96200,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
96165
96200
  const skipTrailingComments = end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */;
96166
96201
  if ((pos > 0 || end > 0) && pos !== end) {
96167
96202
  if (!skipLeadingComments) {
96168
- emitLeadingComments(pos, node.kind !== 352 /* NotEmittedStatement */);
96203
+ emitLeadingComments(pos, node.kind !== 353 /* NotEmittedStatement */);
96169
96204
  }
96170
96205
  if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
96171
96206
  containerPos = pos;
@@ -96188,7 +96223,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
96188
96223
  containerPos = savedContainerPos;
96189
96224
  containerEnd = savedContainerEnd;
96190
96225
  declarationListContainerEnd = savedDeclarationListContainerEnd;
96191
- if (!skipTrailingComments && node.kind !== 352 /* NotEmittedStatement */) {
96226
+ if (!skipTrailingComments && node.kind !== 353 /* NotEmittedStatement */) {
96192
96227
  emitTrailingComments(end);
96193
96228
  }
96194
96229
  }
@@ -96440,7 +96475,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
96440
96475
  }
96441
96476
  } else {
96442
96477
  const source = sourceMapRange.source || sourceMapSource;
96443
- if (node.kind !== 352 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
96478
+ if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
96444
96479
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
96445
96480
  }
96446
96481
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
@@ -96455,7 +96490,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
96455
96490
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
96456
96491
  sourceMapsDisabled = false;
96457
96492
  }
96458
- if (node.kind !== 352 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
96493
+ if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
96459
96494
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
96460
96495
  }
96461
96496
  }