typescript 5.1.0-dev.20230416 → 5.1.0-dev.20230418

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsserver.js CHANGED
@@ -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.20230418`;
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() {
@@ -42112,22 +42132,22 @@ var nodeModulesPathPart = "/node_modules/";
42112
42132
  function pathContainsNodeModules(path) {
42113
42133
  return stringContains(path, nodeModulesPathPart);
42114
42134
  }
42115
- function parseNodeModuleFromPath(resolved) {
42135
+ function parseNodeModuleFromPath(resolved, isFolder) {
42116
42136
  const path = normalizePath(resolved);
42117
42137
  const idx = path.lastIndexOf(nodeModulesPathPart);
42118
42138
  if (idx === -1) {
42119
42139
  return void 0;
42120
42140
  }
42121
42141
  const indexAfterNodeModules = idx + nodeModulesPathPart.length;
42122
- let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules);
42142
+ let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules, isFolder);
42123
42143
  if (path.charCodeAt(indexAfterNodeModules) === 64 /* at */) {
42124
- indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName);
42144
+ indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName, isFolder);
42125
42145
  }
42126
42146
  return path.slice(0, indexAfterPackageName);
42127
42147
  }
42128
- function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex) {
42148
+ function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex, isFolder) {
42129
42149
  const nextSeparatorIndex = path.indexOf(directorySeparator, prevSeparatorIndex + 1);
42130
- return nextSeparatorIndex === -1 ? prevSeparatorIndex : nextSeparatorIndex;
42150
+ return nextSeparatorIndex === -1 ? isFolder ? path.length : prevSeparatorIndex : nextSeparatorIndex;
42131
42151
  }
42132
42152
  function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
42133
42153
  return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
@@ -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 getEscapedTextOfJsxNamespacedName(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);
@@ -71524,7 +71549,7 @@ function createTypeChecker(host) {
71524
71549
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType2(conditional, contextFlags) : void 0;
71525
71550
  }
71526
71551
  function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
71527
- const attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
71552
+ const attributesType = getApparentTypeOfContextualType(node.openingElement.attributes, contextFlags);
71528
71553
  const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
71529
71554
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
71530
71555
  return void 0;
@@ -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
  }
@@ -123387,6 +123418,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
123387
123418
  reusedNames,
123388
123419
  loader,
123389
123420
  getResolutionWithResolvedFileName,
123421
+ deferWatchingNonRelativeResolution,
123390
123422
  shouldRetryResolution,
123391
123423
  logChanges
123392
123424
  }) {
@@ -123411,7 +123443,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
123411
123443
  resolutionHost.onDiscoveredSymlink();
123412
123444
  }
123413
123445
  resolutionsInFile.set(name, mode, resolution);
123414
- watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName);
123446
+ watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
123415
123447
  if (existingResolution) {
123416
123448
  stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
123417
123449
  }
@@ -123487,7 +123519,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
123487
123519
  typeReferenceDirectiveResolutionCache
123488
123520
  ),
123489
123521
  getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2,
123490
- shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0
123522
+ shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0,
123523
+ deferWatchingNonRelativeResolution: false
123491
123524
  });
123492
123525
  }
123493
123526
  function resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
@@ -123506,7 +123539,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
123506
123539
  ),
123507
123540
  getResolutionWithResolvedFileName: getResolvedModule2,
123508
123541
  shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
123509
- logChanges: logChangesWhenResolvingModule
123542
+ logChanges: logChangesWhenResolvingModule,
123543
+ deferWatchingNonRelativeResolution: true
123544
+ // Defer non relative resolution watch because we could be using ambient modules
123510
123545
  });
123511
123546
  }
123512
123547
  function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
@@ -123524,7 +123559,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
123524
123559
  function isNodeModulesAtTypesDirectory(dirPath) {
123525
123560
  return endsWith(dirPath, "/node_modules/@types");
123526
123561
  }
123527
- function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
123562
+ function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution) {
123528
123563
  var _a;
123529
123564
  if (resolution.refCount) {
123530
123565
  resolution.refCount++;
@@ -123532,7 +123567,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
123532
123567
  } else {
123533
123568
  resolution.refCount = 1;
123534
123569
  Debug.assert(!((_a = resolution.files) == null ? void 0 : _a.size));
123535
- if (isExternalModuleNameRelative(name)) {
123570
+ if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) {
123536
123571
  watchFailedLookupLocationOfResolution(resolution);
123537
123572
  } else {
123538
123573
  nonRelativeExternalModuleResolutions.add(name, resolution);
@@ -123812,7 +123847,11 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
123812
123847
  return false;
123813
123848
  }
123814
123849
  (failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
123815
- const packagePath = parseNodeModuleFromPath(fileOrDirectoryPath);
123850
+ const packagePath = parseNodeModuleFromPath(
123851
+ fileOrDirectoryPath,
123852
+ /*isFolder*/
123853
+ true
123854
+ );
123816
123855
  if (packagePath)
123817
123856
  (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(packagePath);
123818
123857
  }
@@ -136367,6 +136406,9 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
136367
136406
  if (isImportMeta(node.parent) && node.parent.name === node) {
136368
136407
  return node.parent;
136369
136408
  }
136409
+ if (isJsxNamespacedName(node.parent)) {
136410
+ return node.parent;
136411
+ }
136370
136412
  return node;
136371
136413
  }
136372
136414
  function shouldGetType(sourceFile, node, position) {
@@ -169470,6 +169512,7 @@ __export(ts_exports2, {
169470
169512
  getErrorSummaryText: () => getErrorSummaryText,
169471
169513
  getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
169472
169514
  getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
169515
+ getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
169473
169516
  getExpandoInitializer: () => getExpandoInitializer,
169474
169517
  getExportAssignmentExpression: () => getExportAssignmentExpression,
169475
169518
  getExportInfoMap: () => getExportInfoMap,
@@ -169762,6 +169805,7 @@ __export(ts_exports2, {
169762
169805
  getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
169763
169806
  getTextOfJSDocComment: () => getTextOfJSDocComment,
169764
169807
  getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
169808
+ getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
169765
169809
  getTextOfNode: () => getTextOfNode,
169766
169810
  getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
169767
169811
  getTextOfPropertyName: () => getTextOfPropertyName,
@@ -169861,6 +169905,7 @@ __export(ts_exports2, {
169861
169905
  insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
169862
169906
  insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
169863
169907
  intersperse: () => intersperse,
169908
+ intrinsicTagNameToString: () => intrinsicTagNameToString,
169864
169909
  introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
169865
169910
  inverseJsxOptionMap: () => inverseJsxOptionMap,
169866
169911
  isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
@@ -183902,6 +183947,7 @@ start(initializeNodeSystem(), require("os").platform());
183902
183947
  getErrorSummaryText,
183903
183948
  getEscapedTextOfIdentifierOrLiteral,
183904
183949
  getEscapedTextOfJsxAttributeName,
183950
+ getEscapedTextOfJsxNamespacedName,
183905
183951
  getExpandoInitializer,
183906
183952
  getExportAssignmentExpression,
183907
183953
  getExportInfoMap,
@@ -184194,6 +184240,7 @@ start(initializeNodeSystem(), require("os").platform());
184194
184240
  getTextOfIdentifierOrLiteral,
184195
184241
  getTextOfJSDocComment,
184196
184242
  getTextOfJsxAttributeName,
184243
+ getTextOfJsxNamespacedName,
184197
184244
  getTextOfNode,
184198
184245
  getTextOfNodeFromSourceText,
184199
184246
  getTextOfPropertyName,
@@ -184293,6 +184340,7 @@ start(initializeNodeSystem(), require("os").platform());
184293
184340
  insertStatementsAfterCustomPrologue,
184294
184341
  insertStatementsAfterStandardPrologue,
184295
184342
  intersperse,
184343
+ intrinsicTagNameToString,
184296
184344
  introducesArgumentsExoticObject,
184297
184345
  inverseJsxOptionMap,
184298
184346
  isAbstractConstructorSymbol,