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/tsc.js +71 -35
- package/lib/tsserver.js +83 -35
- package/lib/tsserverlibrary.js +80 -35
- package/lib/typescript.js +77 -35
- package/lib/typingsInstaller.js +14 -6
- package/package.json +2 -2
package/lib/tsserverlibrary.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.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230418`;
|
|
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, "-")
|
|
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 :
|
|
19114
|
+
return isIdentifier(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node);
|
|
19107
19115
|
}
|
|
19108
19116
|
function getTextOfJsxAttributeName(node) {
|
|
19109
|
-
return isIdentifier(node) ? idText(node) :
|
|
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"() {
|
|
@@ -39986,22 +40003,22 @@ ${lanes.join("\n")}
|
|
|
39986
40003
|
function pathContainsNodeModules(path) {
|
|
39987
40004
|
return stringContains(path, nodeModulesPathPart);
|
|
39988
40005
|
}
|
|
39989
|
-
function parseNodeModuleFromPath(resolved) {
|
|
40006
|
+
function parseNodeModuleFromPath(resolved, isFolder) {
|
|
39990
40007
|
const path = normalizePath(resolved);
|
|
39991
40008
|
const idx = path.lastIndexOf(nodeModulesPathPart);
|
|
39992
40009
|
if (idx === -1) {
|
|
39993
40010
|
return void 0;
|
|
39994
40011
|
}
|
|
39995
40012
|
const indexAfterNodeModules = idx + nodeModulesPathPart.length;
|
|
39996
|
-
let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules);
|
|
40013
|
+
let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules, isFolder);
|
|
39997
40014
|
if (path.charCodeAt(indexAfterNodeModules) === 64 /* at */) {
|
|
39998
|
-
indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName);
|
|
40015
|
+
indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName, isFolder);
|
|
39999
40016
|
}
|
|
40000
40017
|
return path.slice(0, indexAfterPackageName);
|
|
40001
40018
|
}
|
|
40002
|
-
function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex) {
|
|
40019
|
+
function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex, isFolder) {
|
|
40003
40020
|
const nextSeparatorIndex = path.indexOf(directorySeparator, prevSeparatorIndex + 1);
|
|
40004
|
-
return nextSeparatorIndex === -1 ? prevSeparatorIndex : nextSeparatorIndex;
|
|
40021
|
+
return nextSeparatorIndex === -1 ? isFolder ? path.length : prevSeparatorIndex : nextSeparatorIndex;
|
|
40005
40022
|
}
|
|
40006
40023
|
function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
|
|
40007
40024
|
return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
|
|
@@ -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 getEscapedTextOfJsxNamespacedName(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
|
-
|
|
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);
|
|
@@ -69321,7 +69343,7 @@ ${lanes.join("\n")}
|
|
|
69321
69343
|
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType2(conditional, contextFlags) : void 0;
|
|
69322
69344
|
}
|
|
69323
69345
|
function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
|
|
69324
|
-
const attributesType = getApparentTypeOfContextualType(node.openingElement.
|
|
69346
|
+
const attributesType = getApparentTypeOfContextualType(node.openingElement.attributes, contextFlags);
|
|
69325
69347
|
const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
|
|
69326
69348
|
if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
|
|
69327
69349
|
return void 0;
|
|
@@ -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 (
|
|
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 (
|
|
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
|
|
70258
|
-
return tagName
|
|
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,
|
|
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(
|
|
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 =
|
|
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 (
|
|
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) && !
|
|
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 (
|
|
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
|
-
|
|
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) &&
|
|
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
|
}
|
|
@@ -121547,6 +121575,7 @@ ${lanes.join("\n")}
|
|
|
121547
121575
|
reusedNames,
|
|
121548
121576
|
loader,
|
|
121549
121577
|
getResolutionWithResolvedFileName,
|
|
121578
|
+
deferWatchingNonRelativeResolution,
|
|
121550
121579
|
shouldRetryResolution,
|
|
121551
121580
|
logChanges
|
|
121552
121581
|
}) {
|
|
@@ -121571,7 +121600,7 @@ ${lanes.join("\n")}
|
|
|
121571
121600
|
resolutionHost.onDiscoveredSymlink();
|
|
121572
121601
|
}
|
|
121573
121602
|
resolutionsInFile.set(name, mode, resolution);
|
|
121574
|
-
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName);
|
|
121603
|
+
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
|
121575
121604
|
if (existingResolution) {
|
|
121576
121605
|
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
|
121577
121606
|
}
|
|
@@ -121647,7 +121676,8 @@ ${lanes.join("\n")}
|
|
|
121647
121676
|
typeReferenceDirectiveResolutionCache
|
|
121648
121677
|
),
|
|
121649
121678
|
getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2,
|
|
121650
|
-
shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0
|
|
121679
|
+
shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0,
|
|
121680
|
+
deferWatchingNonRelativeResolution: false
|
|
121651
121681
|
});
|
|
121652
121682
|
}
|
|
121653
121683
|
function resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
|
|
@@ -121666,7 +121696,9 @@ ${lanes.join("\n")}
|
|
|
121666
121696
|
),
|
|
121667
121697
|
getResolutionWithResolvedFileName: getResolvedModule2,
|
|
121668
121698
|
shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
|
|
121669
|
-
logChanges: logChangesWhenResolvingModule
|
|
121699
|
+
logChanges: logChangesWhenResolvingModule,
|
|
121700
|
+
deferWatchingNonRelativeResolution: true
|
|
121701
|
+
// Defer non relative resolution watch because we could be using ambient modules
|
|
121670
121702
|
});
|
|
121671
121703
|
}
|
|
121672
121704
|
function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
|
|
@@ -121684,7 +121716,7 @@ ${lanes.join("\n")}
|
|
|
121684
121716
|
function isNodeModulesAtTypesDirectory(dirPath) {
|
|
121685
121717
|
return endsWith(dirPath, "/node_modules/@types");
|
|
121686
121718
|
}
|
|
121687
|
-
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
121719
|
+
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution) {
|
|
121688
121720
|
var _a;
|
|
121689
121721
|
if (resolution.refCount) {
|
|
121690
121722
|
resolution.refCount++;
|
|
@@ -121692,7 +121724,7 @@ ${lanes.join("\n")}
|
|
|
121692
121724
|
} else {
|
|
121693
121725
|
resolution.refCount = 1;
|
|
121694
121726
|
Debug.assert(!((_a = resolution.files) == null ? void 0 : _a.size));
|
|
121695
|
-
if (isExternalModuleNameRelative(name)) {
|
|
121727
|
+
if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) {
|
|
121696
121728
|
watchFailedLookupLocationOfResolution(resolution);
|
|
121697
121729
|
} else {
|
|
121698
121730
|
nonRelativeExternalModuleResolutions.add(name, resolution);
|
|
@@ -121972,7 +122004,11 @@ ${lanes.join("\n")}
|
|
|
121972
122004
|
return false;
|
|
121973
122005
|
}
|
|
121974
122006
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
121975
|
-
const packagePath = parseNodeModuleFromPath(
|
|
122007
|
+
const packagePath = parseNodeModuleFromPath(
|
|
122008
|
+
fileOrDirectoryPath,
|
|
122009
|
+
/*isFolder*/
|
|
122010
|
+
true
|
|
122011
|
+
);
|
|
121976
122012
|
if (packagePath)
|
|
121977
122013
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(packagePath);
|
|
121978
122014
|
}
|
|
@@ -134123,6 +134159,9 @@ ${lanes.join("\n")}
|
|
|
134123
134159
|
if (isImportMeta(node.parent) && node.parent.name === node) {
|
|
134124
134160
|
return node.parent;
|
|
134125
134161
|
}
|
|
134162
|
+
if (isJsxNamespacedName(node.parent)) {
|
|
134163
|
+
return node.parent;
|
|
134164
|
+
}
|
|
134126
134165
|
return node;
|
|
134127
134166
|
}
|
|
134128
134167
|
function shouldGetType(sourceFile, node, position) {
|
|
@@ -180550,6 +180589,7 @@ ${e.message}`;
|
|
|
180550
180589
|
getErrorSummaryText: () => getErrorSummaryText,
|
|
180551
180590
|
getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
|
|
180552
180591
|
getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
|
|
180592
|
+
getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
|
|
180553
180593
|
getExpandoInitializer: () => getExpandoInitializer,
|
|
180554
180594
|
getExportAssignmentExpression: () => getExportAssignmentExpression,
|
|
180555
180595
|
getExportInfoMap: () => getExportInfoMap,
|
|
@@ -180842,6 +180882,7 @@ ${e.message}`;
|
|
|
180842
180882
|
getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
|
|
180843
180883
|
getTextOfJSDocComment: () => getTextOfJSDocComment,
|
|
180844
180884
|
getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
|
|
180885
|
+
getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
|
|
180845
180886
|
getTextOfNode: () => getTextOfNode,
|
|
180846
180887
|
getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
|
|
180847
180888
|
getTextOfPropertyName: () => getTextOfPropertyName,
|
|
@@ -180941,6 +180982,7 @@ ${e.message}`;
|
|
|
180941
180982
|
insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
|
|
180942
180983
|
insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
|
|
180943
180984
|
intersperse: () => intersperse,
|
|
180985
|
+
intrinsicTagNameToString: () => intrinsicTagNameToString,
|
|
180944
180986
|
introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
|
|
180945
180987
|
inverseJsxOptionMap: () => inverseJsxOptionMap,
|
|
180946
180988
|
isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
|
|
@@ -182922,6 +182964,7 @@ ${e.message}`;
|
|
|
182922
182964
|
getErrorSummaryText: () => getErrorSummaryText,
|
|
182923
182965
|
getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,
|
|
182924
182966
|
getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,
|
|
182967
|
+
getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,
|
|
182925
182968
|
getExpandoInitializer: () => getExpandoInitializer,
|
|
182926
182969
|
getExportAssignmentExpression: () => getExportAssignmentExpression,
|
|
182927
182970
|
getExportInfoMap: () => getExportInfoMap,
|
|
@@ -183214,6 +183257,7 @@ ${e.message}`;
|
|
|
183214
183257
|
getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,
|
|
183215
183258
|
getTextOfJSDocComment: () => getTextOfJSDocComment,
|
|
183216
183259
|
getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,
|
|
183260
|
+
getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,
|
|
183217
183261
|
getTextOfNode: () => getTextOfNode,
|
|
183218
183262
|
getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,
|
|
183219
183263
|
getTextOfPropertyName: () => getTextOfPropertyName,
|
|
@@ -183313,6 +183357,7 @@ ${e.message}`;
|
|
|
183313
183357
|
insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,
|
|
183314
183358
|
insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,
|
|
183315
183359
|
intersperse: () => intersperse,
|
|
183360
|
+
intrinsicTagNameToString: () => intrinsicTagNameToString,
|
|
183316
183361
|
introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,
|
|
183317
183362
|
inverseJsxOptionMap: () => inverseJsxOptionMap,
|
|
183318
183363
|
isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,
|