typescript 5.1.0-dev.20230416 → 5.1.0-dev.20230417

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
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.1";
21
- var version = `${versionMajorMinor}.0-dev.20230416`;
21
+ var version = `${versionMajorMinor}.0-dev.20230417`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -12469,6 +12469,14 @@ function getErrorSpanForNode(sourceFile, node) {
12469
12469
  const pos2 = skipTrivia(sourceFile.text, node.pos);
12470
12470
  return getSpanOfTokenAtPosition(sourceFile, pos2);
12471
12471
  }
12472
+ case 237 /* SatisfiesExpression */: {
12473
+ const pos2 = skipTrivia(sourceFile.text, node.expression.end);
12474
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
12475
+ }
12476
+ case 356 /* JSDocSatisfiesTag */: {
12477
+ const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);
12478
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
12479
+ }
12472
12480
  }
12473
12481
  if (errorNode === void 0) {
12474
12482
  return getSpanOfTokenAtPosition(sourceFile, node.pos);
@@ -14610,7 +14618,7 @@ function isQuoteOrBacktick(charCode) {
14610
14618
  }
14611
14619
  function isIntrinsicJsxName(name) {
14612
14620
  const ch = name.charCodeAt(0);
14613
- return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-") || stringContains(name, ":");
14621
+ return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-");
14614
14622
  }
14615
14623
  var indentStrings = ["", " "];
14616
14624
  function getIndentString(level) {
@@ -17272,15 +17280,24 @@ function tryGetJSDocSatisfiesTypeNode(node) {
17272
17280
  return tag && tag.typeExpression && tag.typeExpression.type;
17273
17281
  }
17274
17282
  function getEscapedTextOfJsxAttributeName(node) {
17275
- return isIdentifier(node) ? node.escapedText : `${node.namespace.escapedText}:${idText(node.name)}`;
17283
+ return isIdentifier(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node);
17276
17284
  }
17277
17285
  function getTextOfJsxAttributeName(node) {
17278
- return isIdentifier(node) ? idText(node) : `${idText(node.namespace)}:${idText(node.name)}`;
17286
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
17279
17287
  }
17280
17288
  function isJsxAttributeName(node) {
17281
17289
  const kind = node.kind;
17282
17290
  return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */;
17283
17291
  }
17292
+ function getEscapedTextOfJsxNamespacedName(node) {
17293
+ return `${node.namespace.escapedText}:${idText(node.name)}`;
17294
+ }
17295
+ function getTextOfJsxNamespacedName(node) {
17296
+ return `${idText(node.namespace)}:${idText(node.name)}`;
17297
+ }
17298
+ function intrinsicTagNameToString(node) {
17299
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
17300
+ }
17284
17301
 
17285
17302
  // src/compiler/factory/baseNodeFactory.ts
17286
17303
  function createBaseNodeFactory() {
@@ -39006,6 +39023,9 @@ function createBinder() {
39006
39023
  const containingClassSymbol = containingClass.symbol;
39007
39024
  return getSymbolNameForPrivateIdentifier(containingClassSymbol, name.escapedText);
39008
39025
  }
39026
+ if (isJsxNamespacedName(name)) {
39027
+ return getEscapedTextOfJsxAttributeName(name);
39028
+ }
39009
39029
  return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0;
39010
39030
  }
39011
39031
  switch (node.kind) {
@@ -57139,16 +57159,18 @@ function createTypeChecker(host) {
57139
57159
  while (true) {
57140
57160
  if (tailCount === 1e3) {
57141
57161
  error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
57142
- result = errorType;
57143
- break;
57162
+ return errorType;
57144
57163
  }
57145
- const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
57146
57164
  const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper);
57147
- const checkTypeDeferred = isDeferredType(checkType, checkTuples);
57148
57165
  const extendsType = instantiateType(root.extendsType, mapper);
57166
+ if (checkType === errorType || extendsType === errorType) {
57167
+ return errorType;
57168
+ }
57149
57169
  if (checkType === wildcardType || extendsType === wildcardType) {
57150
57170
  return wildcardType;
57151
57171
  }
57172
+ const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
57173
+ const checkTypeDeferred = isDeferredType(checkType, checkTuples);
57152
57174
  let combinedMapper;
57153
57175
  if (root.inferTypeParameters) {
57154
57176
  const freshParams = sameMap(root.inferTypeParameters, maybeCloneTypeParameter);
@@ -65065,7 +65087,7 @@ function createTypeChecker(host) {
65065
65087
  }
65066
65088
  function isTypePresencePossible(type, propName, assumeTrue) {
65067
65089
  const prop = getPropertyOfType(type, propName);
65068
- return prop ? !!(prop.flags & 16777216 /* Optional */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
65090
+ return prop ? !!(prop.flags & 16777216 /* Optional */ || getCheckFlags(prop) & 48 /* Partial */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
65069
65091
  }
65070
65092
  function narrowTypeByInKeyword(type, nameType, assumeTrue) {
65071
65093
  const name = getPropertyNameFromType(nameType);
@@ -67182,7 +67204,7 @@ function createTypeChecker(host) {
67182
67204
  return isTypeAny(instanceType) ? instanceType : getTypeOfPropertyOfType(instanceType, forcedLookupLocation);
67183
67205
  }
67184
67206
  function getStaticTypeOfReferencedJsxConstructor(context) {
67185
- if (isJsxIntrinsicIdentifier(context.tagName)) {
67207
+ if (isJsxIntrinsicTagName(context.tagName)) {
67186
67208
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context);
67187
67209
  const fakeSignature = createSignatureForJSXIntrinsic(context, result);
67188
67210
  return getOrCreateTypeFromSignature(fakeSignature);
@@ -67783,7 +67805,7 @@ function createTypeChecker(host) {
67783
67805
  }
67784
67806
  function checkJsxElementDeferred(node) {
67785
67807
  checkJsxOpeningLikeElementOrOpeningFragment(node.openingElement);
67786
- if (isJsxIntrinsicIdentifier(node.closingElement.tagName)) {
67808
+ if (isJsxIntrinsicTagName(node.closingElement.tagName)) {
67787
67809
  getIntrinsicTagSymbol(node.closingElement);
67788
67810
  } else {
67789
67811
  checkExpression(node.closingElement.tagName);
@@ -67806,8 +67828,8 @@ function createTypeChecker(host) {
67806
67828
  function isHyphenatedJsxName(name) {
67807
67829
  return stringContains(name, "-");
67808
67830
  }
67809
- function isJsxIntrinsicIdentifier(tagName) {
67810
- return tagName.kind === 80 /* Identifier */ && isIntrinsicJsxName(tagName.escapedText);
67831
+ function isJsxIntrinsicTagName(tagName) {
67832
+ return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);
67811
67833
  }
67812
67834
  function checkJsxAttribute(node, checkMode) {
67813
67835
  return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType;
@@ -67992,9 +68014,9 @@ function createTypeChecker(host) {
67992
68014
  if (!links.resolvedSymbol) {
67993
68015
  const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node);
67994
68016
  if (!isErrorType(intrinsicElementsType)) {
67995
- if (!isIdentifier(node.tagName))
68017
+ if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName))
67996
68018
  return Debug.fail();
67997
- const intrinsicProp = getPropertyOfType(intrinsicElementsType, node.tagName.escapedText);
68019
+ const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText);
67998
68020
  if (intrinsicProp) {
67999
68021
  links.jsxFlags |= 1 /* IntrinsicNamedElement */;
68000
68022
  return links.resolvedSymbol = intrinsicProp;
@@ -68004,7 +68026,7 @@ function createTypeChecker(host) {
68004
68026
  links.jsxFlags |= 2 /* IntrinsicIndexedElement */;
68005
68027
  return links.resolvedSymbol = intrinsicElementsType.symbol;
68006
68028
  }
68007
- error(node, Diagnostics.Property_0_does_not_exist_on_type_1, idText(node.tagName), "JSX." + JsxNames.IntrinsicElements);
68029
+ error(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements);
68008
68030
  return links.resolvedSymbol = unknownSymbol;
68009
68031
  } else {
68010
68032
  if (noImplicitAny) {
@@ -68175,7 +68197,7 @@ function createTypeChecker(host) {
68175
68197
  }
68176
68198
  }
68177
68199
  function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
68178
- Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
68200
+ Debug.assert(isJsxIntrinsicTagName(node.tagName));
68179
68201
  const links = getNodeLinks(node);
68180
68202
  if (!links.resolvedJsxElementAttributesType) {
68181
68203
  const symbol = getIntrinsicTagSymbol(node);
@@ -68275,7 +68297,7 @@ function createTypeChecker(host) {
68275
68297
  const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode);
68276
68298
  if (elementTypeConstraint !== void 0) {
68277
68299
  const tagName = jsxOpeningLikeNode.tagName;
68278
- const tagType = isJsxIntrinsicIdentifier(tagName) ? getStringLiteralType(unescapeLeadingUnderscores(tagName.escapedText)) : checkExpression(tagName);
68300
+ const tagType = isJsxIntrinsicTagName(tagName) ? getStringLiteralType(intrinsicTagNameToString(tagName)) : checkExpression(tagName);
68279
68301
  checkTypeRelatedTo(tagType, elementTypeConstraint, assignableRelation, tagName, Diagnostics.Its_type_0_is_not_a_valid_JSX_element_type, () => {
68280
68302
  const componentName = getTextOfNode(tagName);
68281
68303
  return chainDiagnosticMessages(
@@ -69535,7 +69557,7 @@ function createTypeChecker(host) {
69535
69557
  return typeArgumentTypes;
69536
69558
  }
69537
69559
  function getJsxReferenceKind(node) {
69538
- if (isJsxIntrinsicIdentifier(node.tagName)) {
69560
+ if (isJsxIntrinsicTagName(node.tagName)) {
69539
69561
  return 2 /* Mixed */;
69540
69562
  }
69541
69563
  const tagType = getApparentType(checkExpression(node.tagName));
@@ -69572,7 +69594,7 @@ function createTypeChecker(host) {
69572
69594
  if (getJsxNamespaceContainerForImplicitImport(node)) {
69573
69595
  return true;
69574
69596
  }
69575
- const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : void 0;
69597
+ const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicTagName(node.tagName) ? checkExpression(node.tagName) : void 0;
69576
69598
  if (!tagType) {
69577
69599
  return true;
69578
69600
  }
@@ -70822,7 +70844,7 @@ function createTypeChecker(host) {
70822
70844
  );
70823
70845
  }
70824
70846
  function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) {
70825
- if (isJsxIntrinsicIdentifier(node.tagName)) {
70847
+ if (isJsxIntrinsicTagName(node.tagName)) {
70826
70848
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
70827
70849
  const fakeSignature = createSignatureForJSXIntrinsic(node, result);
70828
70850
  checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType(
@@ -71437,7 +71459,8 @@ function createTypeChecker(host) {
71437
71459
  if (isErrorType(targetType)) {
71438
71460
  return targetType;
71439
71461
  }
71440
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
71462
+ const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */);
71463
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
71441
71464
  return exprType;
71442
71465
  }
71443
71466
  function checkMetaProperty(node) {
@@ -80143,7 +80166,7 @@ function createTypeChecker(host) {
80143
80166
  const isJSDoc2 = findAncestor(name, or(isJSDocLinkLike, isJSDocNameReference, isJSDocMemberName));
80144
80167
  const meaning = isJSDoc2 ? 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */ : 111551 /* Value */;
80145
80168
  if (name.kind === 80 /* Identifier */) {
80146
- if (isJSXTagName(name) && isJsxIntrinsicIdentifier(name)) {
80169
+ if (isJSXTagName(name) && isJsxIntrinsicTagName(name)) {
80147
80170
  const symbol = getIntrinsicTagSymbol(name.parent);
80148
80171
  return symbol === unknownSymbol ? void 0 : symbol;
80149
80172
  }
@@ -80373,6 +80396,11 @@ function createTypeChecker(host) {
80373
80396
  return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0;
80374
80397
  case 235 /* MetaProperty */:
80375
80398
  return checkExpression(node).symbol;
80399
+ case 294 /* JsxNamespacedName */:
80400
+ if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) {
80401
+ const symbol = getIntrinsicTagSymbol(node.parent);
80402
+ return symbol === unknownSymbol ? void 0 : symbol;
80403
+ }
80376
80404
  default:
80377
80405
  return void 0;
80378
80406
  }
package/lib/tsserver.js CHANGED
@@ -747,6 +747,7 @@ __export(server_exports, {
747
747
  getErrorSummaryText: () => getErrorSummaryText,
748
748
  getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
749
749
  getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
750
+ getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
750
751
  getExpandoInitializer: () => getExpandoInitializer,
751
752
  getExportAssignmentExpression: () => getExportAssignmentExpression,
752
753
  getExportInfoMap: () => getExportInfoMap,
@@ -1039,6 +1040,7 @@ __export(server_exports, {
1039
1040
  getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
1040
1041
  getTextOfJSDocComment: () => getTextOfJSDocComment,
1041
1042
  getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
1043
+ getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
1042
1044
  getTextOfNode: () => getTextOfNode,
1043
1045
  getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
1044
1046
  getTextOfPropertyName: () => getTextOfPropertyName,
@@ -1138,6 +1140,7 @@ __export(server_exports, {
1138
1140
  insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
1139
1141
  insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
1140
1142
  intersperse: () => intersperse,
1143
+ intrinsicTagNameToString: () => intrinsicTagNameToString,
1141
1144
  introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
1142
1145
  inverseJsxOptionMap: () => inverseJsxOptionMap,
1143
1146
  isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
@@ -2298,7 +2301,7 @@ module.exports = __toCommonJS(server_exports);
2298
2301
 
2299
2302
  // src/compiler/corePublic.ts
2300
2303
  var versionMajorMinor = "5.1";
2301
- var version = `${versionMajorMinor}.0-dev.20230416`;
2304
+ var version = `${versionMajorMinor}.0-dev.20230417`;
2302
2305
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2303
2306
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2304
2307
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -16270,6 +16273,14 @@ function getErrorSpanForNode(sourceFile, node) {
16270
16273
  const pos2 = skipTrivia(sourceFile.text, node.pos);
16271
16274
  return getSpanOfTokenAtPosition(sourceFile, pos2);
16272
16275
  }
16276
+ case 237 /* SatisfiesExpression */: {
16277
+ const pos2 = skipTrivia(sourceFile.text, node.expression.end);
16278
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
16279
+ }
16280
+ case 356 /* JSDocSatisfiesTag */: {
16281
+ const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);
16282
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
16283
+ }
16273
16284
  }
16274
16285
  if (errorNode === void 0) {
16275
16286
  return getSpanOfTokenAtPosition(sourceFile, node.pos);
@@ -18560,7 +18571,7 @@ function isQuoteOrBacktick(charCode) {
18560
18571
  }
18561
18572
  function isIntrinsicJsxName(name) {
18562
18573
  const ch = name.charCodeAt(0);
18563
- return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-") || stringContains(name, ":");
18574
+ return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-");
18564
18575
  }
18565
18576
  var indentStrings = ["", " "];
18566
18577
  function getIndentString(level) {
@@ -21450,15 +21461,24 @@ function tryGetJSDocSatisfiesTypeNode(node) {
21450
21461
  return tag && tag.typeExpression && tag.typeExpression.type;
21451
21462
  }
21452
21463
  function getEscapedTextOfJsxAttributeName(node) {
21453
- return isIdentifier(node) ? node.escapedText : `${node.namespace.escapedText}:${idText(node.name)}`;
21464
+ return isIdentifier(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node);
21454
21465
  }
21455
21466
  function getTextOfJsxAttributeName(node) {
21456
- return isIdentifier(node) ? idText(node) : `${idText(node.namespace)}:${idText(node.name)}`;
21467
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
21457
21468
  }
21458
21469
  function isJsxAttributeName(node) {
21459
21470
  const kind = node.kind;
21460
21471
  return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */;
21461
21472
  }
21473
+ function getEscapedTextOfJsxNamespacedName(node) {
21474
+ return `${node.namespace.escapedText}:${idText(node.name)}`;
21475
+ }
21476
+ function getTextOfJsxNamespacedName(node) {
21477
+ return `${idText(node.namespace)}:${idText(node.name)}`;
21478
+ }
21479
+ function intrinsicTagNameToString(node) {
21480
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
21481
+ }
21462
21482
 
21463
21483
  // src/compiler/factory/baseNodeFactory.ts
21464
21484
  function createBaseNodeFactory() {
@@ -43609,6 +43629,9 @@ function createBinder() {
43609
43629
  const containingClassSymbol = containingClass.symbol;
43610
43630
  return getSymbolNameForPrivateIdentifier(containingClassSymbol, name.escapedText);
43611
43631
  }
43632
+ if (isJsxNamespacedName(name)) {
43633
+ return getEscapedTextOfJsxAttributeName(name);
43634
+ }
43612
43635
  return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0;
43613
43636
  }
43614
43637
  switch (node.kind) {
@@ -61790,16 +61813,18 @@ function createTypeChecker(host) {
61790
61813
  while (true) {
61791
61814
  if (tailCount === 1e3) {
61792
61815
  error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
61793
- result = errorType;
61794
- break;
61816
+ return errorType;
61795
61817
  }
61796
- const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
61797
61818
  const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper);
61798
- const checkTypeDeferred = isDeferredType(checkType, checkTuples);
61799
61819
  const extendsType = instantiateType(root.extendsType, mapper);
61820
+ if (checkType === errorType || extendsType === errorType) {
61821
+ return errorType;
61822
+ }
61800
61823
  if (checkType === wildcardType || extendsType === wildcardType) {
61801
61824
  return wildcardType;
61802
61825
  }
61826
+ const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
61827
+ const checkTypeDeferred = isDeferredType(checkType, checkTuples);
61803
61828
  let combinedMapper;
61804
61829
  if (root.inferTypeParameters) {
61805
61830
  const freshParams = sameMap(root.inferTypeParameters, maybeCloneTypeParameter);
@@ -69716,7 +69741,7 @@ function createTypeChecker(host) {
69716
69741
  }
69717
69742
  function isTypePresencePossible(type, propName, assumeTrue) {
69718
69743
  const prop = getPropertyOfType(type, propName);
69719
- return prop ? !!(prop.flags & 16777216 /* Optional */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
69744
+ return prop ? !!(prop.flags & 16777216 /* Optional */ || getCheckFlags(prop) & 48 /* Partial */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
69720
69745
  }
69721
69746
  function narrowTypeByInKeyword(type, nameType, assumeTrue) {
69722
69747
  const name = getPropertyNameFromType(nameType);
@@ -71833,7 +71858,7 @@ function createTypeChecker(host) {
71833
71858
  return isTypeAny(instanceType) ? instanceType : getTypeOfPropertyOfType(instanceType, forcedLookupLocation);
71834
71859
  }
71835
71860
  function getStaticTypeOfReferencedJsxConstructor(context) {
71836
- if (isJsxIntrinsicIdentifier(context.tagName)) {
71861
+ if (isJsxIntrinsicTagName(context.tagName)) {
71837
71862
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context);
71838
71863
  const fakeSignature = createSignatureForJSXIntrinsic(context, result);
71839
71864
  return getOrCreateTypeFromSignature(fakeSignature);
@@ -72434,7 +72459,7 @@ function createTypeChecker(host) {
72434
72459
  }
72435
72460
  function checkJsxElementDeferred(node) {
72436
72461
  checkJsxOpeningLikeElementOrOpeningFragment(node.openingElement);
72437
- if (isJsxIntrinsicIdentifier(node.closingElement.tagName)) {
72462
+ if (isJsxIntrinsicTagName(node.closingElement.tagName)) {
72438
72463
  getIntrinsicTagSymbol(node.closingElement);
72439
72464
  } else {
72440
72465
  checkExpression(node.closingElement.tagName);
@@ -72457,8 +72482,8 @@ function createTypeChecker(host) {
72457
72482
  function isHyphenatedJsxName(name) {
72458
72483
  return stringContains(name, "-");
72459
72484
  }
72460
- function isJsxIntrinsicIdentifier(tagName) {
72461
- return tagName.kind === 80 /* Identifier */ && isIntrinsicJsxName(tagName.escapedText);
72485
+ function isJsxIntrinsicTagName(tagName) {
72486
+ return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);
72462
72487
  }
72463
72488
  function checkJsxAttribute(node, checkMode) {
72464
72489
  return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType;
@@ -72643,9 +72668,9 @@ function createTypeChecker(host) {
72643
72668
  if (!links.resolvedSymbol) {
72644
72669
  const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node);
72645
72670
  if (!isErrorType(intrinsicElementsType)) {
72646
- if (!isIdentifier(node.tagName))
72671
+ if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName))
72647
72672
  return Debug.fail();
72648
- const intrinsicProp = getPropertyOfType(intrinsicElementsType, node.tagName.escapedText);
72673
+ const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText);
72649
72674
  if (intrinsicProp) {
72650
72675
  links.jsxFlags |= 1 /* IntrinsicNamedElement */;
72651
72676
  return links.resolvedSymbol = intrinsicProp;
@@ -72655,7 +72680,7 @@ function createTypeChecker(host) {
72655
72680
  links.jsxFlags |= 2 /* IntrinsicIndexedElement */;
72656
72681
  return links.resolvedSymbol = intrinsicElementsType.symbol;
72657
72682
  }
72658
- error(node, Diagnostics.Property_0_does_not_exist_on_type_1, idText(node.tagName), "JSX." + JsxNames.IntrinsicElements);
72683
+ error(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements);
72659
72684
  return links.resolvedSymbol = unknownSymbol;
72660
72685
  } else {
72661
72686
  if (noImplicitAny) {
@@ -72826,7 +72851,7 @@ function createTypeChecker(host) {
72826
72851
  }
72827
72852
  }
72828
72853
  function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
72829
- Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
72854
+ Debug.assert(isJsxIntrinsicTagName(node.tagName));
72830
72855
  const links = getNodeLinks(node);
72831
72856
  if (!links.resolvedJsxElementAttributesType) {
72832
72857
  const symbol = getIntrinsicTagSymbol(node);
@@ -72926,7 +72951,7 @@ function createTypeChecker(host) {
72926
72951
  const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode);
72927
72952
  if (elementTypeConstraint !== void 0) {
72928
72953
  const tagName = jsxOpeningLikeNode.tagName;
72929
- const tagType = isJsxIntrinsicIdentifier(tagName) ? getStringLiteralType(unescapeLeadingUnderscores(tagName.escapedText)) : checkExpression(tagName);
72954
+ const tagType = isJsxIntrinsicTagName(tagName) ? getStringLiteralType(intrinsicTagNameToString(tagName)) : checkExpression(tagName);
72930
72955
  checkTypeRelatedTo(tagType, elementTypeConstraint, assignableRelation, tagName, Diagnostics.Its_type_0_is_not_a_valid_JSX_element_type, () => {
72931
72956
  const componentName = getTextOfNode(tagName);
72932
72957
  return chainDiagnosticMessages(
@@ -74186,7 +74211,7 @@ function createTypeChecker(host) {
74186
74211
  return typeArgumentTypes;
74187
74212
  }
74188
74213
  function getJsxReferenceKind(node) {
74189
- if (isJsxIntrinsicIdentifier(node.tagName)) {
74214
+ if (isJsxIntrinsicTagName(node.tagName)) {
74190
74215
  return 2 /* Mixed */;
74191
74216
  }
74192
74217
  const tagType = getApparentType(checkExpression(node.tagName));
@@ -74223,7 +74248,7 @@ function createTypeChecker(host) {
74223
74248
  if (getJsxNamespaceContainerForImplicitImport(node)) {
74224
74249
  return true;
74225
74250
  }
74226
- const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : void 0;
74251
+ const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicTagName(node.tagName) ? checkExpression(node.tagName) : void 0;
74227
74252
  if (!tagType) {
74228
74253
  return true;
74229
74254
  }
@@ -75473,7 +75498,7 @@ function createTypeChecker(host) {
75473
75498
  );
75474
75499
  }
75475
75500
  function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) {
75476
- if (isJsxIntrinsicIdentifier(node.tagName)) {
75501
+ if (isJsxIntrinsicTagName(node.tagName)) {
75477
75502
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
75478
75503
  const fakeSignature = createSignatureForJSXIntrinsic(node, result);
75479
75504
  checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType(
@@ -76088,7 +76113,8 @@ function createTypeChecker(host) {
76088
76113
  if (isErrorType(targetType)) {
76089
76114
  return targetType;
76090
76115
  }
76091
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
76116
+ const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */);
76117
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
76092
76118
  return exprType;
76093
76119
  }
76094
76120
  function checkMetaProperty(node) {
@@ -84794,7 +84820,7 @@ function createTypeChecker(host) {
84794
84820
  const isJSDoc2 = findAncestor(name, or(isJSDocLinkLike, isJSDocNameReference, isJSDocMemberName));
84795
84821
  const meaning = isJSDoc2 ? 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */ : 111551 /* Value */;
84796
84822
  if (name.kind === 80 /* Identifier */) {
84797
- if (isJSXTagName(name) && isJsxIntrinsicIdentifier(name)) {
84823
+ if (isJSXTagName(name) && isJsxIntrinsicTagName(name)) {
84798
84824
  const symbol = getIntrinsicTagSymbol(name.parent);
84799
84825
  return symbol === unknownSymbol ? void 0 : symbol;
84800
84826
  }
@@ -85024,6 +85050,11 @@ function createTypeChecker(host) {
85024
85050
  return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0;
85025
85051
  case 235 /* MetaProperty */:
85026
85052
  return checkExpression(node).symbol;
85053
+ case 294 /* JsxNamespacedName */:
85054
+ if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) {
85055
+ const symbol = getIntrinsicTagSymbol(node.parent);
85056
+ return symbol === unknownSymbol ? void 0 : symbol;
85057
+ }
85027
85058
  default:
85028
85059
  return void 0;
85029
85060
  }
@@ -136367,6 +136398,9 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
136367
136398
  if (isImportMeta(node.parent) && node.parent.name === node) {
136368
136399
  return node.parent;
136369
136400
  }
136401
+ if (isJsxNamespacedName(node.parent)) {
136402
+ return node.parent;
136403
+ }
136370
136404
  return node;
136371
136405
  }
136372
136406
  function shouldGetType(sourceFile, node, position) {
@@ -169470,6 +169504,7 @@ __export(ts_exports2, {
169470
169504
  getErrorSummaryText: () => getErrorSummaryText,
169471
169505
  getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
169472
169506
  getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
169507
+ getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
169473
169508
  getExpandoInitializer: () => getExpandoInitializer,
169474
169509
  getExportAssignmentExpression: () => getExportAssignmentExpression,
169475
169510
  getExportInfoMap: () => getExportInfoMap,
@@ -169762,6 +169797,7 @@ __export(ts_exports2, {
169762
169797
  getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
169763
169798
  getTextOfJSDocComment: () => getTextOfJSDocComment,
169764
169799
  getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
169800
+ getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
169765
169801
  getTextOfNode: () => getTextOfNode,
169766
169802
  getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
169767
169803
  getTextOfPropertyName: () => getTextOfPropertyName,
@@ -169861,6 +169897,7 @@ __export(ts_exports2, {
169861
169897
  insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
169862
169898
  insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
169863
169899
  intersperse: () => intersperse,
169900
+ intrinsicTagNameToString: () => intrinsicTagNameToString,
169864
169901
  introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
169865
169902
  inverseJsxOptionMap: () => inverseJsxOptionMap,
169866
169903
  isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
@@ -183902,6 +183939,7 @@ start(initializeNodeSystem(), require("os").platform());
183902
183939
  getErrorSummaryText,
183903
183940
  getEscapedTextOfIdentifierOrLiteral,
183904
183941
  getEscapedTextOfJsxAttributeName,
183942
+ getEscapedTextOfJsxNamespacedName,
183905
183943
  getExpandoInitializer,
183906
183944
  getExportAssignmentExpression,
183907
183945
  getExportInfoMap,
@@ -184194,6 +184232,7 @@ start(initializeNodeSystem(), require("os").platform());
184194
184232
  getTextOfIdentifierOrLiteral,
184195
184233
  getTextOfJSDocComment,
184196
184234
  getTextOfJsxAttributeName,
184235
+ getTextOfJsxNamespacedName,
184197
184236
  getTextOfNode,
184198
184237
  getTextOfNodeFromSourceText,
184199
184238
  getTextOfPropertyName,
@@ -184293,6 +184332,7 @@ start(initializeNodeSystem(), require("os").platform());
184293
184332
  insertStatementsAfterCustomPrologue,
184294
184333
  insertStatementsAfterStandardPrologue,
184295
184334
  intersperse,
184335
+ intrinsicTagNameToString,
184296
184336
  introducesArgumentsExoticObject,
184297
184337
  inverseJsxOptionMap,
184298
184338
  isAbstractConstructorSymbol,
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.1";
38
- version = `${versionMajorMinor}.0-dev.20230416`;
38
+ version = `${versionMajorMinor}.0-dev.20230417`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -14085,6 +14085,14 @@ ${lanes.join("\n")}
14085
14085
  const pos2 = skipTrivia(sourceFile.text, node.pos);
14086
14086
  return getSpanOfTokenAtPosition(sourceFile, pos2);
14087
14087
  }
14088
+ case 237 /* SatisfiesExpression */: {
14089
+ const pos2 = skipTrivia(sourceFile.text, node.expression.end);
14090
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
14091
+ }
14092
+ case 356 /* JSDocSatisfiesTag */: {
14093
+ const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);
14094
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
14095
+ }
14088
14096
  }
14089
14097
  if (errorNode === void 0) {
14090
14098
  return getSpanOfTokenAtPosition(sourceFile, node.pos);
@@ -16291,7 +16299,7 @@ ${lanes.join("\n")}
16291
16299
  }
16292
16300
  function isIntrinsicJsxName(name) {
16293
16301
  const ch = name.charCodeAt(0);
16294
- return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-") || stringContains(name, ":");
16302
+ return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-");
16295
16303
  }
16296
16304
  function getIndentString(level) {
16297
16305
  const singleLevel = indentStrings[1];
@@ -19103,15 +19111,24 @@ ${lanes.join("\n")}
19103
19111
  return tag && tag.typeExpression && tag.typeExpression.type;
19104
19112
  }
19105
19113
  function getEscapedTextOfJsxAttributeName(node) {
19106
- return isIdentifier(node) ? node.escapedText : `${node.namespace.escapedText}:${idText(node.name)}`;
19114
+ return isIdentifier(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node);
19107
19115
  }
19108
19116
  function getTextOfJsxAttributeName(node) {
19109
- return isIdentifier(node) ? idText(node) : `${idText(node.namespace)}:${idText(node.name)}`;
19117
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
19110
19118
  }
19111
19119
  function isJsxAttributeName(node) {
19112
19120
  const kind = node.kind;
19113
19121
  return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */;
19114
19122
  }
19123
+ function getEscapedTextOfJsxNamespacedName(node) {
19124
+ return `${node.namespace.escapedText}:${idText(node.name)}`;
19125
+ }
19126
+ function getTextOfJsxNamespacedName(node) {
19127
+ return `${idText(node.namespace)}:${idText(node.name)}`;
19128
+ }
19129
+ function intrinsicTagNameToString(node) {
19130
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
19131
+ }
19115
19132
  var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
19116
19133
  var init_utilities = __esm({
19117
19134
  "src/compiler/utilities.ts"() {
@@ -41498,6 +41515,9 @@ ${lanes.join("\n")}
41498
41515
  const containingClassSymbol = containingClass.symbol;
41499
41516
  return getSymbolNameForPrivateIdentifier(containingClassSymbol, name.escapedText);
41500
41517
  }
41518
+ if (isJsxNamespacedName(name)) {
41519
+ return getEscapedTextOfJsxAttributeName(name);
41520
+ }
41501
41521
  return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0;
41502
41522
  }
41503
41523
  switch (node.kind) {
@@ -59587,16 +59607,18 @@ ${lanes.join("\n")}
59587
59607
  while (true) {
59588
59608
  if (tailCount === 1e3) {
59589
59609
  error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
59590
- result = errorType;
59591
- break;
59610
+ return errorType;
59592
59611
  }
59593
- const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
59594
59612
  const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper);
59595
- const checkTypeDeferred = isDeferredType(checkType, checkTuples);
59596
59613
  const extendsType = instantiateType(root.extendsType, mapper);
59614
+ if (checkType === errorType || extendsType === errorType) {
59615
+ return errorType;
59616
+ }
59597
59617
  if (checkType === wildcardType || extendsType === wildcardType) {
59598
59618
  return wildcardType;
59599
59619
  }
59620
+ const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
59621
+ const checkTypeDeferred = isDeferredType(checkType, checkTuples);
59600
59622
  let combinedMapper;
59601
59623
  if (root.inferTypeParameters) {
59602
59624
  const freshParams = sameMap(root.inferTypeParameters, maybeCloneTypeParameter);
@@ -67513,7 +67535,7 @@ ${lanes.join("\n")}
67513
67535
  }
67514
67536
  function isTypePresencePossible(type, propName, assumeTrue) {
67515
67537
  const prop = getPropertyOfType(type, propName);
67516
- return prop ? !!(prop.flags & 16777216 /* Optional */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
67538
+ return prop ? !!(prop.flags & 16777216 /* Optional */ || getCheckFlags(prop) & 48 /* Partial */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
67517
67539
  }
67518
67540
  function narrowTypeByInKeyword(type, nameType, assumeTrue) {
67519
67541
  const name = getPropertyNameFromType(nameType);
@@ -69630,7 +69652,7 @@ ${lanes.join("\n")}
69630
69652
  return isTypeAny(instanceType) ? instanceType : getTypeOfPropertyOfType(instanceType, forcedLookupLocation);
69631
69653
  }
69632
69654
  function getStaticTypeOfReferencedJsxConstructor(context) {
69633
- if (isJsxIntrinsicIdentifier(context.tagName)) {
69655
+ if (isJsxIntrinsicTagName(context.tagName)) {
69634
69656
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context);
69635
69657
  const fakeSignature = createSignatureForJSXIntrinsic(context, result);
69636
69658
  return getOrCreateTypeFromSignature(fakeSignature);
@@ -70231,7 +70253,7 @@ ${lanes.join("\n")}
70231
70253
  }
70232
70254
  function checkJsxElementDeferred(node) {
70233
70255
  checkJsxOpeningLikeElementOrOpeningFragment(node.openingElement);
70234
- if (isJsxIntrinsicIdentifier(node.closingElement.tagName)) {
70256
+ if (isJsxIntrinsicTagName(node.closingElement.tagName)) {
70235
70257
  getIntrinsicTagSymbol(node.closingElement);
70236
70258
  } else {
70237
70259
  checkExpression(node.closingElement.tagName);
@@ -70254,8 +70276,8 @@ ${lanes.join("\n")}
70254
70276
  function isHyphenatedJsxName(name) {
70255
70277
  return stringContains(name, "-");
70256
70278
  }
70257
- function isJsxIntrinsicIdentifier(tagName) {
70258
- return tagName.kind === 80 /* Identifier */ && isIntrinsicJsxName(tagName.escapedText);
70279
+ function isJsxIntrinsicTagName(tagName) {
70280
+ return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);
70259
70281
  }
70260
70282
  function checkJsxAttribute(node, checkMode) {
70261
70283
  return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType;
@@ -70440,9 +70462,9 @@ ${lanes.join("\n")}
70440
70462
  if (!links.resolvedSymbol) {
70441
70463
  const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node);
70442
70464
  if (!isErrorType(intrinsicElementsType)) {
70443
- if (!isIdentifier(node.tagName))
70465
+ if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName))
70444
70466
  return Debug.fail();
70445
- const intrinsicProp = getPropertyOfType(intrinsicElementsType, node.tagName.escapedText);
70467
+ const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText);
70446
70468
  if (intrinsicProp) {
70447
70469
  links.jsxFlags |= 1 /* IntrinsicNamedElement */;
70448
70470
  return links.resolvedSymbol = intrinsicProp;
@@ -70452,7 +70474,7 @@ ${lanes.join("\n")}
70452
70474
  links.jsxFlags |= 2 /* IntrinsicIndexedElement */;
70453
70475
  return links.resolvedSymbol = intrinsicElementsType.symbol;
70454
70476
  }
70455
- error(node, Diagnostics.Property_0_does_not_exist_on_type_1, idText(node.tagName), "JSX." + JsxNames.IntrinsicElements);
70477
+ error(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements);
70456
70478
  return links.resolvedSymbol = unknownSymbol;
70457
70479
  } else {
70458
70480
  if (noImplicitAny) {
@@ -70623,7 +70645,7 @@ ${lanes.join("\n")}
70623
70645
  }
70624
70646
  }
70625
70647
  function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
70626
- Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
70648
+ Debug.assert(isJsxIntrinsicTagName(node.tagName));
70627
70649
  const links = getNodeLinks(node);
70628
70650
  if (!links.resolvedJsxElementAttributesType) {
70629
70651
  const symbol = getIntrinsicTagSymbol(node);
@@ -70723,7 +70745,7 @@ ${lanes.join("\n")}
70723
70745
  const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode);
70724
70746
  if (elementTypeConstraint !== void 0) {
70725
70747
  const tagName = jsxOpeningLikeNode.tagName;
70726
- const tagType = isJsxIntrinsicIdentifier(tagName) ? getStringLiteralType(unescapeLeadingUnderscores(tagName.escapedText)) : checkExpression(tagName);
70748
+ const tagType = isJsxIntrinsicTagName(tagName) ? getStringLiteralType(intrinsicTagNameToString(tagName)) : checkExpression(tagName);
70727
70749
  checkTypeRelatedTo(tagType, elementTypeConstraint, assignableRelation, tagName, Diagnostics.Its_type_0_is_not_a_valid_JSX_element_type, () => {
70728
70750
  const componentName = getTextOfNode(tagName);
70729
70751
  return chainDiagnosticMessages(
@@ -71983,7 +72005,7 @@ ${lanes.join("\n")}
71983
72005
  return typeArgumentTypes;
71984
72006
  }
71985
72007
  function getJsxReferenceKind(node) {
71986
- if (isJsxIntrinsicIdentifier(node.tagName)) {
72008
+ if (isJsxIntrinsicTagName(node.tagName)) {
71987
72009
  return 2 /* Mixed */;
71988
72010
  }
71989
72011
  const tagType = getApparentType(checkExpression(node.tagName));
@@ -72020,7 +72042,7 @@ ${lanes.join("\n")}
72020
72042
  if (getJsxNamespaceContainerForImplicitImport(node)) {
72021
72043
  return true;
72022
72044
  }
72023
- const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : void 0;
72045
+ const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicTagName(node.tagName) ? checkExpression(node.tagName) : void 0;
72024
72046
  if (!tagType) {
72025
72047
  return true;
72026
72048
  }
@@ -73270,7 +73292,7 @@ ${lanes.join("\n")}
73270
73292
  );
73271
73293
  }
73272
73294
  function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) {
73273
- if (isJsxIntrinsicIdentifier(node.tagName)) {
73295
+ if (isJsxIntrinsicTagName(node.tagName)) {
73274
73296
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
73275
73297
  const fakeSignature = createSignatureForJSXIntrinsic(node, result);
73276
73298
  checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType(
@@ -73885,7 +73907,8 @@ ${lanes.join("\n")}
73885
73907
  if (isErrorType(targetType)) {
73886
73908
  return targetType;
73887
73909
  }
73888
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
73910
+ const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */);
73911
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
73889
73912
  return exprType;
73890
73913
  }
73891
73914
  function checkMetaProperty(node) {
@@ -82591,7 +82614,7 @@ ${lanes.join("\n")}
82591
82614
  const isJSDoc2 = findAncestor(name, or(isJSDocLinkLike, isJSDocNameReference, isJSDocMemberName));
82592
82615
  const meaning = isJSDoc2 ? 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */ : 111551 /* Value */;
82593
82616
  if (name.kind === 80 /* Identifier */) {
82594
- if (isJSXTagName(name) && isJsxIntrinsicIdentifier(name)) {
82617
+ if (isJSXTagName(name) && isJsxIntrinsicTagName(name)) {
82595
82618
  const symbol = getIntrinsicTagSymbol(name.parent);
82596
82619
  return symbol === unknownSymbol ? void 0 : symbol;
82597
82620
  }
@@ -82821,6 +82844,11 @@ ${lanes.join("\n")}
82821
82844
  return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0;
82822
82845
  case 235 /* MetaProperty */:
82823
82846
  return checkExpression(node).symbol;
82847
+ case 294 /* JsxNamespacedName */:
82848
+ if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) {
82849
+ const symbol = getIntrinsicTagSymbol(node.parent);
82850
+ return symbol === unknownSymbol ? void 0 : symbol;
82851
+ }
82824
82852
  default:
82825
82853
  return void 0;
82826
82854
  }
@@ -134123,6 +134151,9 @@ ${lanes.join("\n")}
134123
134151
  if (isImportMeta(node.parent) && node.parent.name === node) {
134124
134152
  return node.parent;
134125
134153
  }
134154
+ if (isJsxNamespacedName(node.parent)) {
134155
+ return node.parent;
134156
+ }
134126
134157
  return node;
134127
134158
  }
134128
134159
  function shouldGetType(sourceFile, node, position) {
@@ -180550,6 +180581,7 @@ ${e.message}`;
180550
180581
  getErrorSummaryText: () => getErrorSummaryText,
180551
180582
  getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
180552
180583
  getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
180584
+ getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
180553
180585
  getExpandoInitializer: () => getExpandoInitializer,
180554
180586
  getExportAssignmentExpression: () => getExportAssignmentExpression,
180555
180587
  getExportInfoMap: () => getExportInfoMap,
@@ -180842,6 +180874,7 @@ ${e.message}`;
180842
180874
  getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
180843
180875
  getTextOfJSDocComment: () => getTextOfJSDocComment,
180844
180876
  getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
180877
+ getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
180845
180878
  getTextOfNode: () => getTextOfNode,
180846
180879
  getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
180847
180880
  getTextOfPropertyName: () => getTextOfPropertyName,
@@ -180941,6 +180974,7 @@ ${e.message}`;
180941
180974
  insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
180942
180975
  insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
180943
180976
  intersperse: () => intersperse,
180977
+ intrinsicTagNameToString: () => intrinsicTagNameToString,
180944
180978
  introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
180945
180979
  inverseJsxOptionMap: () => inverseJsxOptionMap,
180946
180980
  isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
@@ -182922,6 +182956,7 @@ ${e.message}`;
182922
182956
  getErrorSummaryText: () => getErrorSummaryText,
182923
182957
  getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
182924
182958
  getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
182959
+ getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
182925
182960
  getExpandoInitializer: () => getExpandoInitializer,
182926
182961
  getExportAssignmentExpression: () => getExportAssignmentExpression,
182927
182962
  getExportInfoMap: () => getExportInfoMap,
@@ -183214,6 +183249,7 @@ ${e.message}`;
183214
183249
  getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
183215
183250
  getTextOfJSDocComment: () => getTextOfJSDocComment,
183216
183251
  getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
183252
+ getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
183217
183253
  getTextOfNode: () => getTextOfNode,
183218
183254
  getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
183219
183255
  getTextOfPropertyName: () => getTextOfPropertyName,
@@ -183313,6 +183349,7 @@ ${e.message}`;
183313
183349
  insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
183314
183350
  insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
183315
183351
  intersperse: () => intersperse,
183352
+ intrinsicTagNameToString: () => intrinsicTagNameToString,
183316
183353
  introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
183317
183354
  inverseJsxOptionMap: () => inverseJsxOptionMap,
183318
183355
  isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.1";
38
- version = `${versionMajorMinor}.0-dev.20230416`;
38
+ version = `${versionMajorMinor}.0-dev.20230417`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -14085,6 +14085,14 @@ ${lanes.join("\n")}
14085
14085
  const pos2 = skipTrivia(sourceFile.text, node.pos);
14086
14086
  return getSpanOfTokenAtPosition(sourceFile, pos2);
14087
14087
  }
14088
+ case 237 /* SatisfiesExpression */: {
14089
+ const pos2 = skipTrivia(sourceFile.text, node.expression.end);
14090
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
14091
+ }
14092
+ case 356 /* JSDocSatisfiesTag */: {
14093
+ const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);
14094
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
14095
+ }
14088
14096
  }
14089
14097
  if (errorNode === void 0) {
14090
14098
  return getSpanOfTokenAtPosition(sourceFile, node.pos);
@@ -16291,7 +16299,7 @@ ${lanes.join("\n")}
16291
16299
  }
16292
16300
  function isIntrinsicJsxName(name) {
16293
16301
  const ch = name.charCodeAt(0);
16294
- return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-") || stringContains(name, ":");
16302
+ return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-");
16295
16303
  }
16296
16304
  function getIndentString(level) {
16297
16305
  const singleLevel = indentStrings[1];
@@ -19103,15 +19111,24 @@ ${lanes.join("\n")}
19103
19111
  return tag && tag.typeExpression && tag.typeExpression.type;
19104
19112
  }
19105
19113
  function getEscapedTextOfJsxAttributeName(node) {
19106
- return isIdentifier(node) ? node.escapedText : `${node.namespace.escapedText}:${idText(node.name)}`;
19114
+ return isIdentifier(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node);
19107
19115
  }
19108
19116
  function getTextOfJsxAttributeName(node) {
19109
- return isIdentifier(node) ? idText(node) : `${idText(node.namespace)}:${idText(node.name)}`;
19117
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
19110
19118
  }
19111
19119
  function isJsxAttributeName(node) {
19112
19120
  const kind = node.kind;
19113
19121
  return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */;
19114
19122
  }
19123
+ function getEscapedTextOfJsxNamespacedName(node) {
19124
+ return `${node.namespace.escapedText}:${idText(node.name)}`;
19125
+ }
19126
+ function getTextOfJsxNamespacedName(node) {
19127
+ return `${idText(node.namespace)}:${idText(node.name)}`;
19128
+ }
19129
+ function intrinsicTagNameToString(node) {
19130
+ return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);
19131
+ }
19115
19132
  var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
19116
19133
  var init_utilities = __esm({
19117
19134
  "src/compiler/utilities.ts"() {
@@ -41498,6 +41515,9 @@ ${lanes.join("\n")}
41498
41515
  const containingClassSymbol = containingClass.symbol;
41499
41516
  return getSymbolNameForPrivateIdentifier(containingClassSymbol, name.escapedText);
41500
41517
  }
41518
+ if (isJsxNamespacedName(name)) {
41519
+ return getEscapedTextOfJsxAttributeName(name);
41520
+ }
41501
41521
  return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0;
41502
41522
  }
41503
41523
  switch (node.kind) {
@@ -59587,16 +59607,18 @@ ${lanes.join("\n")}
59587
59607
  while (true) {
59588
59608
  if (tailCount === 1e3) {
59589
59609
  error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
59590
- result = errorType;
59591
- break;
59610
+ return errorType;
59592
59611
  }
59593
- const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
59594
59612
  const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper);
59595
- const checkTypeDeferred = isDeferredType(checkType, checkTuples);
59596
59613
  const extendsType = instantiateType(root.extendsType, mapper);
59614
+ if (checkType === errorType || extendsType === errorType) {
59615
+ return errorType;
59616
+ }
59597
59617
  if (checkType === wildcardType || extendsType === wildcardType) {
59598
59618
  return wildcardType;
59599
59619
  }
59620
+ const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
59621
+ const checkTypeDeferred = isDeferredType(checkType, checkTuples);
59600
59622
  let combinedMapper;
59601
59623
  if (root.inferTypeParameters) {
59602
59624
  const freshParams = sameMap(root.inferTypeParameters, maybeCloneTypeParameter);
@@ -67513,7 +67535,7 @@ ${lanes.join("\n")}
67513
67535
  }
67514
67536
  function isTypePresencePossible(type, propName, assumeTrue) {
67515
67537
  const prop = getPropertyOfType(type, propName);
67516
- return prop ? !!(prop.flags & 16777216 /* Optional */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
67538
+ return prop ? !!(prop.flags & 16777216 /* Optional */ || getCheckFlags(prop) & 48 /* Partial */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
67517
67539
  }
67518
67540
  function narrowTypeByInKeyword(type, nameType, assumeTrue) {
67519
67541
  const name = getPropertyNameFromType(nameType);
@@ -69630,7 +69652,7 @@ ${lanes.join("\n")}
69630
69652
  return isTypeAny(instanceType) ? instanceType : getTypeOfPropertyOfType(instanceType, forcedLookupLocation);
69631
69653
  }
69632
69654
  function getStaticTypeOfReferencedJsxConstructor(context) {
69633
- if (isJsxIntrinsicIdentifier(context.tagName)) {
69655
+ if (isJsxIntrinsicTagName(context.tagName)) {
69634
69656
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context);
69635
69657
  const fakeSignature = createSignatureForJSXIntrinsic(context, result);
69636
69658
  return getOrCreateTypeFromSignature(fakeSignature);
@@ -70231,7 +70253,7 @@ ${lanes.join("\n")}
70231
70253
  }
70232
70254
  function checkJsxElementDeferred(node) {
70233
70255
  checkJsxOpeningLikeElementOrOpeningFragment(node.openingElement);
70234
- if (isJsxIntrinsicIdentifier(node.closingElement.tagName)) {
70256
+ if (isJsxIntrinsicTagName(node.closingElement.tagName)) {
70235
70257
  getIntrinsicTagSymbol(node.closingElement);
70236
70258
  } else {
70237
70259
  checkExpression(node.closingElement.tagName);
@@ -70254,8 +70276,8 @@ ${lanes.join("\n")}
70254
70276
  function isHyphenatedJsxName(name) {
70255
70277
  return stringContains(name, "-");
70256
70278
  }
70257
- function isJsxIntrinsicIdentifier(tagName) {
70258
- return tagName.kind === 80 /* Identifier */ && isIntrinsicJsxName(tagName.escapedText);
70279
+ function isJsxIntrinsicTagName(tagName) {
70280
+ return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);
70259
70281
  }
70260
70282
  function checkJsxAttribute(node, checkMode) {
70261
70283
  return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType;
@@ -70440,9 +70462,9 @@ ${lanes.join("\n")}
70440
70462
  if (!links.resolvedSymbol) {
70441
70463
  const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node);
70442
70464
  if (!isErrorType(intrinsicElementsType)) {
70443
- if (!isIdentifier(node.tagName))
70465
+ if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName))
70444
70466
  return Debug.fail();
70445
- const intrinsicProp = getPropertyOfType(intrinsicElementsType, node.tagName.escapedText);
70467
+ const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText);
70446
70468
  if (intrinsicProp) {
70447
70469
  links.jsxFlags |= 1 /* IntrinsicNamedElement */;
70448
70470
  return links.resolvedSymbol = intrinsicProp;
@@ -70452,7 +70474,7 @@ ${lanes.join("\n")}
70452
70474
  links.jsxFlags |= 2 /* IntrinsicIndexedElement */;
70453
70475
  return links.resolvedSymbol = intrinsicElementsType.symbol;
70454
70476
  }
70455
- error(node, Diagnostics.Property_0_does_not_exist_on_type_1, idText(node.tagName), "JSX." + JsxNames.IntrinsicElements);
70477
+ error(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements);
70456
70478
  return links.resolvedSymbol = unknownSymbol;
70457
70479
  } else {
70458
70480
  if (noImplicitAny) {
@@ -70623,7 +70645,7 @@ ${lanes.join("\n")}
70623
70645
  }
70624
70646
  }
70625
70647
  function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
70626
- Debug.assert(isJsxIntrinsicIdentifier(node.tagName));
70648
+ Debug.assert(isJsxIntrinsicTagName(node.tagName));
70627
70649
  const links = getNodeLinks(node);
70628
70650
  if (!links.resolvedJsxElementAttributesType) {
70629
70651
  const symbol = getIntrinsicTagSymbol(node);
@@ -70723,7 +70745,7 @@ ${lanes.join("\n")}
70723
70745
  const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode);
70724
70746
  if (elementTypeConstraint !== void 0) {
70725
70747
  const tagName = jsxOpeningLikeNode.tagName;
70726
- const tagType = isJsxIntrinsicIdentifier(tagName) ? getStringLiteralType(unescapeLeadingUnderscores(tagName.escapedText)) : checkExpression(tagName);
70748
+ const tagType = isJsxIntrinsicTagName(tagName) ? getStringLiteralType(intrinsicTagNameToString(tagName)) : checkExpression(tagName);
70727
70749
  checkTypeRelatedTo(tagType, elementTypeConstraint, assignableRelation, tagName, Diagnostics.Its_type_0_is_not_a_valid_JSX_element_type, () => {
70728
70750
  const componentName = getTextOfNode(tagName);
70729
70751
  return chainDiagnosticMessages(
@@ -71983,7 +72005,7 @@ ${lanes.join("\n")}
71983
72005
  return typeArgumentTypes;
71984
72006
  }
71985
72007
  function getJsxReferenceKind(node) {
71986
- if (isJsxIntrinsicIdentifier(node.tagName)) {
72008
+ if (isJsxIntrinsicTagName(node.tagName)) {
71987
72009
  return 2 /* Mixed */;
71988
72010
  }
71989
72011
  const tagType = getApparentType(checkExpression(node.tagName));
@@ -72020,7 +72042,7 @@ ${lanes.join("\n")}
72020
72042
  if (getJsxNamespaceContainerForImplicitImport(node)) {
72021
72043
  return true;
72022
72044
  }
72023
- const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : void 0;
72045
+ const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicTagName(node.tagName) ? checkExpression(node.tagName) : void 0;
72024
72046
  if (!tagType) {
72025
72047
  return true;
72026
72048
  }
@@ -73270,7 +73292,7 @@ ${lanes.join("\n")}
73270
73292
  );
73271
73293
  }
73272
73294
  function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) {
73273
- if (isJsxIntrinsicIdentifier(node.tagName)) {
73295
+ if (isJsxIntrinsicTagName(node.tagName)) {
73274
73296
  const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);
73275
73297
  const fakeSignature = createSignatureForJSXIntrinsic(node, result);
73276
73298
  checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType(
@@ -73885,7 +73907,8 @@ ${lanes.join("\n")}
73885
73907
  if (isErrorType(targetType)) {
73886
73908
  return targetType;
73887
73909
  }
73888
- checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
73910
+ const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */);
73911
+ checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
73889
73912
  return exprType;
73890
73913
  }
73891
73914
  function checkMetaProperty(node) {
@@ -82591,7 +82614,7 @@ ${lanes.join("\n")}
82591
82614
  const isJSDoc2 = findAncestor(name, or(isJSDocLinkLike, isJSDocNameReference, isJSDocMemberName));
82592
82615
  const meaning = isJSDoc2 ? 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */ : 111551 /* Value */;
82593
82616
  if (name.kind === 80 /* Identifier */) {
82594
- if (isJSXTagName(name) && isJsxIntrinsicIdentifier(name)) {
82617
+ if (isJSXTagName(name) && isJsxIntrinsicTagName(name)) {
82595
82618
  const symbol = getIntrinsicTagSymbol(name.parent);
82596
82619
  return symbol === unknownSymbol ? void 0 : symbol;
82597
82620
  }
@@ -82821,6 +82844,11 @@ ${lanes.join("\n")}
82821
82844
  return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0;
82822
82845
  case 235 /* MetaProperty */:
82823
82846
  return checkExpression(node).symbol;
82847
+ case 294 /* JsxNamespacedName */:
82848
+ if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) {
82849
+ const symbol = getIntrinsicTagSymbol(node.parent);
82850
+ return symbol === unknownSymbol ? void 0 : symbol;
82851
+ }
82824
82852
  default:
82825
82853
  return void 0;
82826
82854
  }
@@ -134137,6 +134165,9 @@ ${lanes.join("\n")}
134137
134165
  if (isImportMeta(node.parent) && node.parent.name === node) {
134138
134166
  return node.parent;
134139
134167
  }
134168
+ if (isJsxNamespacedName(node.parent)) {
134169
+ return node.parent;
134170
+ }
134140
134171
  return node;
134141
134172
  }
134142
134173
  function shouldGetType(sourceFile, node, position) {
@@ -169225,6 +169256,7 @@ ${options.prefix}` : "\n" : options.prefix
169225
169256
  getErrorSummaryText: () => getErrorSummaryText,
169226
169257
  getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
169227
169258
  getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
169259
+ getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
169228
169260
  getExpandoInitializer: () => getExpandoInitializer,
169229
169261
  getExportAssignmentExpression: () => getExportAssignmentExpression,
169230
169262
  getExportInfoMap: () => getExportInfoMap,
@@ -169517,6 +169549,7 @@ ${options.prefix}` : "\n" : options.prefix
169517
169549
  getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
169518
169550
  getTextOfJSDocComment: () => getTextOfJSDocComment,
169519
169551
  getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
169552
+ getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
169520
169553
  getTextOfNode: () => getTextOfNode,
169521
169554
  getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
169522
169555
  getTextOfPropertyName: () => getTextOfPropertyName,
@@ -169616,6 +169649,7 @@ ${options.prefix}` : "\n" : options.prefix
169616
169649
  insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
169617
169650
  insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
169618
169651
  intersperse: () => intersperse,
169652
+ intrinsicTagNameToString: () => intrinsicTagNameToString,
169619
169653
  introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
169620
169654
  inverseJsxOptionMap: () => inverseJsxOptionMap,
169621
169655
  isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.1";
57
- var version = `${versionMajorMinor}.0-dev.20230416`;
57
+ var version = `${versionMajorMinor}.0-dev.20230417`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -10201,6 +10201,14 @@ function getErrorSpanForNode(sourceFile, node) {
10201
10201
  const pos2 = skipTrivia(sourceFile.text, node.pos);
10202
10202
  return getSpanOfTokenAtPosition(sourceFile, pos2);
10203
10203
  }
10204
+ case 237 /* SatisfiesExpression */: {
10205
+ const pos2 = skipTrivia(sourceFile.text, node.expression.end);
10206
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
10207
+ }
10208
+ case 356 /* JSDocSatisfiesTag */: {
10209
+ const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);
10210
+ return getSpanOfTokenAtPosition(sourceFile, pos2);
10211
+ }
10204
10212
  }
10205
10213
  if (errorNode === void 0) {
10206
10214
  return getSpanOfTokenAtPosition(sourceFile, node.pos);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.1.0-dev.20230416",
5
+ "version": "5.1.0-dev.20230417",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "14.21.1",
114
114
  "npm": "8.19.3"
115
115
  },
116
- "gitHead": "bdcf8abb0c280cd0e41a2bc1f9c5f806b05ae424"
116
+ "gitHead": "430c5be783928c71e1b16ef267fad26d2998d7ab"
117
117
  }