@typescript-deploys/pr-build 5.2.0-pr-55267-8 → 5.3.0-pr-55319-8
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 +144 -93
- package/lib/tsserver.js +165 -114
- package/lib/tsserverlibrary.d.ts +7 -3
- package/lib/tsserverlibrary.js +165 -114
- package/lib/typescript.d.ts +4 -2
- package/lib/typescript.js +156 -104
- package/lib/typingsInstaller.js +5 -3
- package/package.json +3 -3
package/lib/tsserverlibrary.js
CHANGED
|
@@ -34,8 +34,8 @@ var ts = (() => {
|
|
|
34
34
|
var init_corePublic = __esm({
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
|
-
versionMajorMinor = "5.
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
37
|
+
versionMajorMinor = "5.3";
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230809`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -4387,15 +4387,13 @@ ${lanes.join("\n")}
|
|
|
4387
4387
|
NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
|
|
4388
4388
|
NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
|
|
4389
4389
|
NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
|
|
4390
|
-
NodeCheckFlags2[NodeCheckFlags2["
|
|
4391
|
-
NodeCheckFlags2[NodeCheckFlags2["
|
|
4392
|
-
NodeCheckFlags2[NodeCheckFlags2["
|
|
4393
|
-
NodeCheckFlags2[NodeCheckFlags2["
|
|
4394
|
-
NodeCheckFlags2[NodeCheckFlags2["
|
|
4395
|
-
NodeCheckFlags2[NodeCheckFlags2["
|
|
4396
|
-
NodeCheckFlags2[NodeCheckFlags2["
|
|
4397
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 8388608] = "ContainsSuperPropertyInStaticInitializer";
|
|
4398
|
-
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 16777216] = "InCheckIdentifier";
|
|
4390
|
+
NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter";
|
|
4391
|
+
NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 131072] = "AssignmentsMarked";
|
|
4392
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference";
|
|
4393
|
+
NodeCheckFlags2[NodeCheckFlags2["ConstructorReference"] = 536870912] = "ConstructorReference";
|
|
4394
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers";
|
|
4395
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer";
|
|
4396
|
+
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 4194304] = "InCheckIdentifier";
|
|
4399
4397
|
return NodeCheckFlags2;
|
|
4400
4398
|
})(NodeCheckFlags || {});
|
|
4401
4399
|
TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
@@ -20746,8 +20744,10 @@ ${lanes.join("\n")}
|
|
|
20746
20744
|
return update(updated, original);
|
|
20747
20745
|
}
|
|
20748
20746
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
20747
|
+
const text = typeof value === "number" ? value + "" : value;
|
|
20748
|
+
Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
|
|
20749
20749
|
const node = createBaseDeclaration(9 /* NumericLiteral */);
|
|
20750
|
-
node.text =
|
|
20750
|
+
node.text = text;
|
|
20751
20751
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
20752
20752
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
20753
20753
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
@@ -27672,7 +27672,7 @@ ${lanes.join("\n")}
|
|
|
27672
27672
|
initializer
|
|
27673
27673
|
);
|
|
27674
27674
|
}
|
|
27675
|
-
function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) {
|
|
27675
|
+
function createAccessorPropertyGetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) {
|
|
27676
27676
|
return factory2.createGetAccessorDeclaration(
|
|
27677
27677
|
modifiers,
|
|
27678
27678
|
name,
|
|
@@ -27682,7 +27682,7 @@ ${lanes.join("\n")}
|
|
|
27682
27682
|
factory2.createBlock([
|
|
27683
27683
|
factory2.createReturnStatement(
|
|
27684
27684
|
factory2.createPropertyAccessExpression(
|
|
27685
|
-
|
|
27685
|
+
receiver,
|
|
27686
27686
|
factory2.getGeneratedPrivateNameForNode(
|
|
27687
27687
|
node.name,
|
|
27688
27688
|
/*prefix*/
|
|
@@ -27694,7 +27694,7 @@ ${lanes.join("\n")}
|
|
|
27694
27694
|
])
|
|
27695
27695
|
);
|
|
27696
27696
|
}
|
|
27697
|
-
function createAccessorPropertySetRedirector(factory2, node, modifiers, name) {
|
|
27697
|
+
function createAccessorPropertySetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) {
|
|
27698
27698
|
return factory2.createSetAccessorDeclaration(
|
|
27699
27699
|
modifiers,
|
|
27700
27700
|
name,
|
|
@@ -27709,7 +27709,7 @@ ${lanes.join("\n")}
|
|
|
27709
27709
|
factory2.createExpressionStatement(
|
|
27710
27710
|
factory2.createAssignment(
|
|
27711
27711
|
factory2.createPropertyAccessExpression(
|
|
27712
|
-
|
|
27712
|
+
receiver,
|
|
27713
27713
|
factory2.getGeneratedPrivateNameForNode(
|
|
27714
27714
|
node.name,
|
|
27715
27715
|
/*prefix*/
|
|
@@ -51635,7 +51635,7 @@ ${lanes.join("\n")}
|
|
|
51635
51635
|
return factory.createStringLiteral(name, !!singleQuote);
|
|
51636
51636
|
}
|
|
51637
51637
|
if (isNumericLiteralName(name) && startsWith(name, "-")) {
|
|
51638
|
-
return factory.createComputedPropertyName(factory.createNumericLiteral(+name));
|
|
51638
|
+
return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(Math.abs(+name))));
|
|
51639
51639
|
}
|
|
51640
51640
|
return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions));
|
|
51641
51641
|
}
|
|
@@ -62302,6 +62302,7 @@ ${lanes.join("\n")}
|
|
|
62302
62302
|
let expandingFlags = 0 /* None */;
|
|
62303
62303
|
let overflow = false;
|
|
62304
62304
|
let overrideNextErrorInfo = 0;
|
|
62305
|
+
let skipParentCounter = 0;
|
|
62305
62306
|
let lastSkippedInfo;
|
|
62306
62307
|
let incompatibleStack;
|
|
62307
62308
|
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
|
@@ -62367,6 +62368,7 @@ ${lanes.join("\n")}
|
|
|
62367
62368
|
lastSkippedInfo = saved.lastSkippedInfo;
|
|
62368
62369
|
incompatibleStack = saved.incompatibleStack;
|
|
62369
62370
|
overrideNextErrorInfo = saved.overrideNextErrorInfo;
|
|
62371
|
+
skipParentCounter = saved.skipParentCounter;
|
|
62370
62372
|
relatedInfo = saved.relatedInfo;
|
|
62371
62373
|
}
|
|
62372
62374
|
function captureErrorCalculationState() {
|
|
@@ -62375,6 +62377,7 @@ ${lanes.join("\n")}
|
|
|
62375
62377
|
lastSkippedInfo,
|
|
62376
62378
|
incompatibleStack: incompatibleStack == null ? void 0 : incompatibleStack.slice(),
|
|
62377
62379
|
overrideNextErrorInfo,
|
|
62380
|
+
skipParentCounter,
|
|
62378
62381
|
relatedInfo: relatedInfo == null ? void 0 : relatedInfo.slice()
|
|
62379
62382
|
};
|
|
62380
62383
|
}
|
|
@@ -62479,7 +62482,15 @@ ${lanes.join("\n")}
|
|
|
62479
62482
|
reportIncompatibleStack();
|
|
62480
62483
|
if (message.elidedInCompatabilityPyramid)
|
|
62481
62484
|
return;
|
|
62482
|
-
|
|
62485
|
+
if (skipParentCounter === 0) {
|
|
62486
|
+
errorInfo = chainDiagnosticMessages(errorInfo, message, ...args);
|
|
62487
|
+
} else {
|
|
62488
|
+
skipParentCounter--;
|
|
62489
|
+
}
|
|
62490
|
+
}
|
|
62491
|
+
function reportParentSkippedError(message, ...args) {
|
|
62492
|
+
reportError(message, ...args);
|
|
62493
|
+
skipParentCounter++;
|
|
62483
62494
|
}
|
|
62484
62495
|
function associateRelatedInfo(info) {
|
|
62485
62496
|
Debug.assert(!!errorInfo);
|
|
@@ -62816,14 +62827,14 @@ ${lanes.join("\n")}
|
|
|
62816
62827
|
}
|
|
62817
62828
|
}
|
|
62818
62829
|
if (suggestion !== void 0) {
|
|
62819
|
-
|
|
62830
|
+
reportParentSkippedError(
|
|
62820
62831
|
Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,
|
|
62821
62832
|
symbolToString(prop),
|
|
62822
62833
|
typeToString(errorTarget),
|
|
62823
62834
|
suggestion
|
|
62824
62835
|
);
|
|
62825
62836
|
} else {
|
|
62826
|
-
|
|
62837
|
+
reportParentSkippedError(
|
|
62827
62838
|
Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,
|
|
62828
62839
|
symbolToString(prop),
|
|
62829
62840
|
typeToString(errorTarget)
|
|
@@ -68621,8 +68632,8 @@ ${lanes.join("\n")}
|
|
|
68621
68632
|
}
|
|
68622
68633
|
const parent2 = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
68623
68634
|
const links = getNodeLinks(parent2);
|
|
68624
|
-
if (!(links.flags &
|
|
68625
|
-
links.flags |=
|
|
68635
|
+
if (!(links.flags & 131072 /* AssignmentsMarked */)) {
|
|
68636
|
+
links.flags |= 131072 /* AssignmentsMarked */;
|
|
68626
68637
|
if (!hasParentWithAssignmentsMarked(parent2)) {
|
|
68627
68638
|
markNodeAssignments(parent2);
|
|
68628
68639
|
}
|
|
@@ -68630,7 +68641,7 @@ ${lanes.join("\n")}
|
|
|
68630
68641
|
return symbol.isAssigned || false;
|
|
68631
68642
|
}
|
|
68632
68643
|
function hasParentWithAssignmentsMarked(node) {
|
|
68633
|
-
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags &
|
|
68644
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */));
|
|
68634
68645
|
}
|
|
68635
68646
|
function markNodeAssignments(node) {
|
|
68636
68647
|
if (node.kind === 80 /* Identifier */) {
|
|
@@ -68736,11 +68747,11 @@ ${lanes.join("\n")}
|
|
|
68736
68747
|
const parent2 = declaration.parent.parent;
|
|
68737
68748
|
if (parent2.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || parent2.kind === 169 /* Parameter */) {
|
|
68738
68749
|
const links = getNodeLinks(parent2);
|
|
68739
|
-
if (!(links.flags &
|
|
68740
|
-
links.flags |=
|
|
68750
|
+
if (!(links.flags & 4194304 /* InCheckIdentifier */)) {
|
|
68751
|
+
links.flags |= 4194304 /* InCheckIdentifier */;
|
|
68741
68752
|
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
68742
68753
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
68743
|
-
links.flags &= ~
|
|
68754
|
+
links.flags &= ~4194304 /* InCheckIdentifier */;
|
|
68744
68755
|
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
68745
68756
|
const pattern = declaration.parent;
|
|
68746
68757
|
const narrowedType = getFlowTypeOfReference(
|
|
@@ -68817,17 +68828,7 @@ ${lanes.join("\n")}
|
|
|
68817
68828
|
}
|
|
68818
68829
|
let declaration = localOrExportSymbol.valueDeclaration;
|
|
68819
68830
|
if (declaration && localOrExportSymbol.flags & 32 /* Class */) {
|
|
68820
|
-
if (declaration
|
|
68821
|
-
let container = getContainingClass(node);
|
|
68822
|
-
while (container !== void 0) {
|
|
68823
|
-
if (container === declaration && container.name !== node) {
|
|
68824
|
-
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
68825
|
-
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
68826
|
-
break;
|
|
68827
|
-
}
|
|
68828
|
-
container = getContainingClass(container);
|
|
68829
|
-
}
|
|
68830
|
-
} else if (declaration.kind === 231 /* ClassExpression */) {
|
|
68831
|
+
if (isClassLike(declaration) && declaration.name !== node) {
|
|
68831
68832
|
let container = getThisContainer(
|
|
68832
68833
|
node,
|
|
68833
68834
|
/*includeArrowFunctions*/
|
|
@@ -68835,14 +68836,7 @@ ${lanes.join("\n")}
|
|
|
68835
68836
|
/*includeClassComputedPropertyName*/
|
|
68836
68837
|
false
|
|
68837
68838
|
);
|
|
68838
|
-
while (container.kind !== 312 /* SourceFile */) {
|
|
68839
|
-
if (container.parent === declaration) {
|
|
68840
|
-
if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) {
|
|
68841
|
-
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
68842
|
-
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
68843
|
-
}
|
|
68844
|
-
break;
|
|
68845
|
-
}
|
|
68839
|
+
while (container.kind !== 312 /* SourceFile */ && container.parent !== declaration) {
|
|
68846
68840
|
container = getThisContainer(
|
|
68847
68841
|
container,
|
|
68848
68842
|
/*includeArrowFunctions*/
|
|
@@ -68851,6 +68845,11 @@ ${lanes.join("\n")}
|
|
|
68851
68845
|
false
|
|
68852
68846
|
);
|
|
68853
68847
|
}
|
|
68848
|
+
if (container.kind !== 312 /* SourceFile */) {
|
|
68849
|
+
getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */;
|
|
68850
|
+
getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */;
|
|
68851
|
+
getNodeLinks(node).flags |= 536870912 /* ConstructorReference */;
|
|
68852
|
+
}
|
|
68854
68853
|
}
|
|
68855
68854
|
}
|
|
68856
68855
|
checkNestedBlockScopedBinding(node, symbol);
|
|
@@ -68981,7 +68980,7 @@ ${lanes.join("\n")}
|
|
|
68981
68980
|
if (isForStatement(container)) {
|
|
68982
68981
|
const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */);
|
|
68983
68982
|
if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {
|
|
68984
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
68983
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */;
|
|
68985
68984
|
}
|
|
68986
68985
|
}
|
|
68987
68986
|
getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
@@ -69259,7 +69258,7 @@ ${lanes.join("\n")}
|
|
|
69259
69258
|
if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) {
|
|
69260
69259
|
forEachEnclosingBlockScopeContainer(node.parent, (current) => {
|
|
69261
69260
|
if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) {
|
|
69262
|
-
getNodeLinks(current).flags |=
|
|
69261
|
+
getNodeLinks(current).flags |= 2097152 /* ContainsSuperPropertyInStaticInitializer */;
|
|
69263
69262
|
}
|
|
69264
69263
|
});
|
|
69265
69264
|
}
|
|
@@ -69786,7 +69785,7 @@ ${lanes.join("\n")}
|
|
|
69786
69785
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
69787
69786
|
const prop = getPropertyOfType(t, name);
|
|
69788
69787
|
if (prop) {
|
|
69789
|
-
return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
|
|
69788
|
+
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */));
|
|
69790
69789
|
}
|
|
69791
69790
|
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
69792
69791
|
const restType = getElementTypeOfSliceOfTupleType(
|
|
@@ -69871,7 +69870,7 @@ ${lanes.join("\n")}
|
|
|
69871
69870
|
(t) => {
|
|
69872
69871
|
if (isTupleType(t)) {
|
|
69873
69872
|
if ((firstSpreadIndex === void 0 || index < firstSpreadIndex) && index < t.target.fixedLength) {
|
|
69874
|
-
return getTypeArguments(t)[index];
|
|
69873
|
+
return removeMissingType(getTypeArguments(t)[index], !!(t.target.elementFlags[index] && 2 /* Optional */));
|
|
69875
69874
|
}
|
|
69876
69875
|
const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0;
|
|
69877
69876
|
const fixedEndLength = offset > 0 && t.target.hasRestElement ? getEndElementCount(t.target, 3 /* Fixed */) : 0;
|
|
@@ -71032,13 +71031,18 @@ ${lanes.join("\n")}
|
|
|
71032
71031
|
if (!isErrorType(intrinsicElementsType)) {
|
|
71033
71032
|
if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName))
|
|
71034
71033
|
return Debug.fail();
|
|
71035
|
-
const
|
|
71034
|
+
const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText;
|
|
71035
|
+
const intrinsicProp = getPropertyOfType(intrinsicElementsType, propName);
|
|
71036
71036
|
if (intrinsicProp) {
|
|
71037
71037
|
links.jsxFlags |= 1 /* IntrinsicNamedElement */;
|
|
71038
71038
|
return links.resolvedSymbol = intrinsicProp;
|
|
71039
71039
|
}
|
|
71040
|
-
const
|
|
71041
|
-
if (
|
|
71040
|
+
const indexSymbol = getApplicableIndexSymbol(intrinsicElementsType, getStringLiteralType(unescapeLeadingUnderscores(propName)));
|
|
71041
|
+
if (indexSymbol) {
|
|
71042
|
+
links.jsxFlags |= 2 /* IntrinsicIndexedElement */;
|
|
71043
|
+
return links.resolvedSymbol = indexSymbol;
|
|
71044
|
+
}
|
|
71045
|
+
if (getTypeOfPropertyOrIndexSignatureOfType(intrinsicElementsType, propName)) {
|
|
71042
71046
|
links.jsxFlags |= 2 /* IntrinsicIndexedElement */;
|
|
71043
71047
|
return links.resolvedSymbol = intrinsicElementsType.symbol;
|
|
71044
71048
|
}
|
|
@@ -71216,6 +71220,7 @@ ${lanes.join("\n")}
|
|
|
71216
71220
|
}
|
|
71217
71221
|
}
|
|
71218
71222
|
function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {
|
|
71223
|
+
var _a;
|
|
71219
71224
|
Debug.assert(isJsxIntrinsicTagName(node.tagName));
|
|
71220
71225
|
const links = getNodeLinks(node);
|
|
71221
71226
|
if (!links.resolvedJsxElementAttributesType) {
|
|
@@ -71223,7 +71228,8 @@ ${lanes.join("\n")}
|
|
|
71223
71228
|
if (links.jsxFlags & 1 /* IntrinsicNamedElement */) {
|
|
71224
71229
|
return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType;
|
|
71225
71230
|
} else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) {
|
|
71226
|
-
|
|
71231
|
+
const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText;
|
|
71232
|
+
return links.resolvedJsxElementAttributesType = ((_a = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a.type) || errorType;
|
|
71227
71233
|
} else {
|
|
71228
71234
|
return links.resolvedJsxElementAttributesType = errorType;
|
|
71229
71235
|
}
|
|
@@ -72801,7 +72807,7 @@ ${lanes.join("\n")}
|
|
|
72801
72807
|
}
|
|
72802
72808
|
}
|
|
72803
72809
|
function getThisArgumentOfCall(node) {
|
|
72804
|
-
const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : void 0;
|
|
72810
|
+
const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0;
|
|
72805
72811
|
if (expression) {
|
|
72806
72812
|
const callee = skipOuterExpressions(expression);
|
|
72807
72813
|
if (isAccessExpression(callee)) {
|
|
@@ -76303,6 +76309,11 @@ ${lanes.join("\n")}
|
|
|
76303
76309
|
}
|
|
76304
76310
|
leftType = checkNonNullType(leftType, left);
|
|
76305
76311
|
rightType = checkNonNullType(rightType, right);
|
|
76312
|
+
if (leftType.flags & rightType.flags & 1024 /* EnumLiteral */) {
|
|
76313
|
+
if (getBaseTypeOfEnumLikeType(leftType).symbol !== getBaseTypeOfEnumLikeType(rightType).symbol) {
|
|
76314
|
+
error2(errorNode, Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations);
|
|
76315
|
+
}
|
|
76316
|
+
}
|
|
76306
76317
|
let suggestedOperator;
|
|
76307
76318
|
if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) {
|
|
76308
76319
|
error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator));
|
|
@@ -77206,9 +77217,14 @@ ${lanes.join("\n")}
|
|
|
77206
77217
|
case 15 /* NoSubstitutionTemplateLiteral */:
|
|
77207
77218
|
case 11 /* StringLiteral */:
|
|
77208
77219
|
return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
|
|
77209
|
-
case 9 /* NumericLiteral */:
|
|
77220
|
+
case 9 /* NumericLiteral */: {
|
|
77210
77221
|
checkGrammarNumericLiteral(node);
|
|
77211
|
-
|
|
77222
|
+
const value = +node.text;
|
|
77223
|
+
if (!isFinite(value)) {
|
|
77224
|
+
return numberType;
|
|
77225
|
+
}
|
|
77226
|
+
return getFreshTypeOfLiteralType(getNumberLiteralType(value));
|
|
77227
|
+
}
|
|
77212
77228
|
case 10 /* BigIntLiteral */:
|
|
77213
77229
|
checkGrammarBigIntLiteral(node);
|
|
77214
77230
|
return getFreshTypeOfLiteralType(getBigIntLiteralType({
|
|
@@ -77708,7 +77724,7 @@ ${lanes.join("\n")}
|
|
|
77708
77724
|
function setNodeLinksForPrivateIdentifierScope(node) {
|
|
77709
77725
|
if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) {
|
|
77710
77726
|
for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) {
|
|
77711
|
-
getNodeLinks(lexicalScope).flags |=
|
|
77727
|
+
getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */;
|
|
77712
77728
|
}
|
|
77713
77729
|
if (isClassExpression(node.parent)) {
|
|
77714
77730
|
const enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
|
|
@@ -79461,7 +79477,7 @@ ${lanes.join("\n")}
|
|
|
79461
79477
|
}
|
|
79462
79478
|
function checkWeakMapSetCollision(node) {
|
|
79463
79479
|
const enclosingBlockScope = getEnclosingBlockScopeContainer(node);
|
|
79464
|
-
if (getNodeCheckFlags(enclosingBlockScope) &
|
|
79480
|
+
if (getNodeCheckFlags(enclosingBlockScope) & 1048576 /* ContainsClassWithPrivateIdentifiers */) {
|
|
79465
79481
|
Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier");
|
|
79466
79482
|
errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);
|
|
79467
79483
|
}
|
|
@@ -79475,18 +79491,18 @@ ${lanes.join("\n")}
|
|
|
79475
79491
|
let hasCollision = false;
|
|
79476
79492
|
if (isClassExpression(node)) {
|
|
79477
79493
|
for (const member of node.members) {
|
|
79478
|
-
if (getNodeCheckFlags(member) &
|
|
79494
|
+
if (getNodeCheckFlags(member) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
79479
79495
|
hasCollision = true;
|
|
79480
79496
|
break;
|
|
79481
79497
|
}
|
|
79482
79498
|
}
|
|
79483
79499
|
} else if (isFunctionExpression(node)) {
|
|
79484
|
-
if (getNodeCheckFlags(node) &
|
|
79500
|
+
if (getNodeCheckFlags(node) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
79485
79501
|
hasCollision = true;
|
|
79486
79502
|
}
|
|
79487
79503
|
} else {
|
|
79488
79504
|
const container = getEnclosingBlockScopeContainer(node);
|
|
79489
|
-
if (container && getNodeCheckFlags(container) &
|
|
79505
|
+
if (container && getNodeCheckFlags(container) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
79490
79506
|
hasCollision = true;
|
|
79491
79507
|
}
|
|
79492
79508
|
}
|
|
@@ -83340,31 +83356,7 @@ ${lanes.join("\n")}
|
|
|
83340
83356
|
if (name.kind === 211 /* PropertyAccessExpression */) {
|
|
83341
83357
|
checkPropertyAccessExpression(name, 0 /* Normal */);
|
|
83342
83358
|
if (!links.resolvedSymbol) {
|
|
83343
|
-
|
|
83344
|
-
const infos = getApplicableIndexInfos(expressionType, getLiteralTypeFromPropertyName(name.name));
|
|
83345
|
-
if (infos.length && expressionType.members) {
|
|
83346
|
-
const resolved = resolveStructuredTypeMembers(expressionType);
|
|
83347
|
-
const symbol = resolved.members.get("__index" /* Index */);
|
|
83348
|
-
if (infos === getIndexInfosOfType(expressionType)) {
|
|
83349
|
-
links.resolvedSymbol = symbol;
|
|
83350
|
-
} else if (symbol) {
|
|
83351
|
-
const symbolLinks2 = getSymbolLinks(symbol);
|
|
83352
|
-
const declarationList = mapDefined(infos, (i) => i.declaration);
|
|
83353
|
-
const nodeListId = map(declarationList, getNodeId).join(",");
|
|
83354
|
-
if (!symbolLinks2.filteredIndexSymbolCache) {
|
|
83355
|
-
symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map();
|
|
83356
|
-
}
|
|
83357
|
-
if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) {
|
|
83358
|
-
links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId);
|
|
83359
|
-
} else {
|
|
83360
|
-
const copy = createSymbol(131072 /* Signature */, "__index" /* Index */);
|
|
83361
|
-
copy.declarations = mapDefined(infos, (i) => i.declaration);
|
|
83362
|
-
copy.parent = expressionType.aliasSymbol ? expressionType.aliasSymbol : expressionType.symbol ? expressionType.symbol : getSymbolAtLocation(copy.declarations[0].parent);
|
|
83363
|
-
symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy);
|
|
83364
|
-
links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId);
|
|
83365
|
-
}
|
|
83366
|
-
}
|
|
83367
|
-
}
|
|
83359
|
+
links.resolvedSymbol = getApplicableIndexSymbol(checkExpressionCached(name.expression), getLiteralTypeFromPropertyName(name.name));
|
|
83368
83360
|
}
|
|
83369
83361
|
} else {
|
|
83370
83362
|
checkQualifiedName(name, 0 /* Normal */);
|
|
@@ -83397,6 +83389,31 @@ ${lanes.join("\n")}
|
|
|
83397
83389
|
}
|
|
83398
83390
|
return void 0;
|
|
83399
83391
|
}
|
|
83392
|
+
function getApplicableIndexSymbol(type, keyType) {
|
|
83393
|
+
const infos = getApplicableIndexInfos(type, keyType);
|
|
83394
|
+
if (infos.length && type.members) {
|
|
83395
|
+
const symbol = getIndexSymbolFromSymbolTable(resolveStructuredTypeMembers(type).members);
|
|
83396
|
+
if (infos === getIndexInfosOfType(type)) {
|
|
83397
|
+
return symbol;
|
|
83398
|
+
} else if (symbol) {
|
|
83399
|
+
const symbolLinks2 = getSymbolLinks(symbol);
|
|
83400
|
+
const declarationList = mapDefined(infos, (i) => i.declaration);
|
|
83401
|
+
const nodeListId = map(declarationList, getNodeId).join(",");
|
|
83402
|
+
if (!symbolLinks2.filteredIndexSymbolCache) {
|
|
83403
|
+
symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map();
|
|
83404
|
+
}
|
|
83405
|
+
if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) {
|
|
83406
|
+
return symbolLinks2.filteredIndexSymbolCache.get(nodeListId);
|
|
83407
|
+
} else {
|
|
83408
|
+
const copy = createSymbol(131072 /* Signature */, "__index" /* Index */);
|
|
83409
|
+
copy.declarations = mapDefined(infos, (i) => i.declaration);
|
|
83410
|
+
copy.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy.declarations[0].parent);
|
|
83411
|
+
symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy);
|
|
83412
|
+
return copy;
|
|
83413
|
+
}
|
|
83414
|
+
}
|
|
83415
|
+
}
|
|
83416
|
+
}
|
|
83400
83417
|
function resolveJSDocMemberName(name, ignoreErrors, container) {
|
|
83401
83418
|
if (isEntityName(name)) {
|
|
83402
83419
|
const meaning = 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */;
|
|
@@ -84225,7 +84242,7 @@ ${lanes.join("\n")}
|
|
|
84225
84242
|
if (enumResult)
|
|
84226
84243
|
return enumResult;
|
|
84227
84244
|
const literalValue = type.value;
|
|
84228
|
-
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "
|
|
84245
|
+
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "string" ? factory.createStringLiteral(literalValue) : literalValue < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(Math.abs(literalValue))) : factory.createNumericLiteral(literalValue);
|
|
84229
84246
|
}
|
|
84230
84247
|
function createLiteralConstValue(node, tracker) {
|
|
84231
84248
|
const type = getTypeOfSymbol(getSymbolOfDeclaration(node));
|
|
@@ -91002,7 +91019,7 @@ ${lanes.join("\n")}
|
|
|
91002
91019
|
function transformEnumMemberDeclarationValue(member) {
|
|
91003
91020
|
const value = resolver.getConstantValue(member);
|
|
91004
91021
|
if (value !== void 0) {
|
|
91005
|
-
return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value);
|
|
91022
|
+
return typeof value === "string" ? factory2.createStringLiteral(value) : value < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(value))) : factory2.createNumericLiteral(value);
|
|
91006
91023
|
} else {
|
|
91007
91024
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
91008
91025
|
if (member.initializer) {
|
|
@@ -91965,6 +91982,11 @@ ${lanes.join("\n")}
|
|
|
91965
91982
|
}
|
|
91966
91983
|
}
|
|
91967
91984
|
}
|
|
91985
|
+
function getClassThis() {
|
|
91986
|
+
const lex = getClassLexicalEnvironment();
|
|
91987
|
+
const classThis = lex.classThis ?? lex.classConstructor ?? (currentClassContainer == null ? void 0 : currentClassContainer.name);
|
|
91988
|
+
return Debug.checkDefined(classThis);
|
|
91989
|
+
}
|
|
91968
91990
|
function transformAutoAccessor(node) {
|
|
91969
91991
|
const commentRange = getCommentRange(node);
|
|
91970
91992
|
const sourceMapRange = getSourceMapRange(node);
|
|
@@ -91991,11 +92013,13 @@ ${lanes.join("\n")}
|
|
|
91991
92013
|
setOriginalNode(backingField, node);
|
|
91992
92014
|
setEmitFlags(backingField, 3072 /* NoComments */);
|
|
91993
92015
|
setSourceMapRange(backingField, sourceMapRange);
|
|
91994
|
-
const
|
|
92016
|
+
const receiver = isStatic(node) ? getClassThis() : factory2.createThis();
|
|
92017
|
+
const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName, receiver);
|
|
91995
92018
|
setOriginalNode(getter, node);
|
|
91996
92019
|
setCommentRange(getter, commentRange);
|
|
91997
92020
|
setSourceMapRange(getter, sourceMapRange);
|
|
91998
|
-
const
|
|
92021
|
+
const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers));
|
|
92022
|
+
const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver);
|
|
91999
92023
|
setOriginalNode(setter, node);
|
|
92000
92024
|
setEmitFlags(setter, 3072 /* NoComments */);
|
|
92001
92025
|
setSourceMapRange(setter, sourceMapRange);
|
|
@@ -92552,6 +92576,7 @@ ${lanes.join("\n")}
|
|
|
92552
92576
|
return filter(node.members, isNonStaticMethodOrAccessorWithPrivateName);
|
|
92553
92577
|
}
|
|
92554
92578
|
function getClassFacts(node) {
|
|
92579
|
+
var _a;
|
|
92555
92580
|
let facts = 0 /* None */;
|
|
92556
92581
|
const original = getOriginalNode(node);
|
|
92557
92582
|
if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) {
|
|
@@ -92568,6 +92593,8 @@ ${lanes.join("\n")}
|
|
|
92568
92593
|
if (isStatic(member)) {
|
|
92569
92594
|
if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) {
|
|
92570
92595
|
facts |= 2 /* NeedsClassConstructorReference */;
|
|
92596
|
+
} else if (isAutoAccessorPropertyDeclaration(member) && shouldTransformAutoAccessors === -1 /* True */ && !node.name && !((_a = node.emitNode) == null ? void 0 : _a.classThis)) {
|
|
92597
|
+
facts |= 2 /* NeedsClassConstructorReference */;
|
|
92571
92598
|
}
|
|
92572
92599
|
if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) {
|
|
92573
92600
|
if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) {
|
|
@@ -92588,6 +92615,9 @@ ${lanes.join("\n")}
|
|
|
92588
92615
|
containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member));
|
|
92589
92616
|
} else if (isPrivateIdentifierClassElementDeclaration(member)) {
|
|
92590
92617
|
containsInstancePrivateElements = true;
|
|
92618
|
+
if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) {
|
|
92619
|
+
facts |= 2 /* NeedsClassConstructorReference */;
|
|
92620
|
+
}
|
|
92591
92621
|
} else if (isPropertyDeclaration(member)) {
|
|
92592
92622
|
containsPublicInstanceFields = true;
|
|
92593
92623
|
containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer);
|
|
@@ -92688,10 +92718,11 @@ ${lanes.join("\n")}
|
|
|
92688
92718
|
getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp);
|
|
92689
92719
|
pendingClassReferenceAssignment = factory2.createAssignment(temp, factory2.getInternalName(node));
|
|
92690
92720
|
}
|
|
92691
|
-
if ((_b = node.emitNode) == null ? void 0 : _b.classThis) {
|
|
92692
|
-
getClassLexicalEnvironment().classThis = node.emitNode.classThis;
|
|
92693
|
-
}
|
|
92694
92721
|
}
|
|
92722
|
+
if ((_b = node.emitNode) == null ? void 0 : _b.classThis) {
|
|
92723
|
+
getClassLexicalEnvironment().classThis = node.emitNode.classThis;
|
|
92724
|
+
}
|
|
92725
|
+
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */;
|
|
92695
92726
|
const isExport = hasSyntacticModifier(node, 1 /* Export */);
|
|
92696
92727
|
const isDefault = hasSyntacticModifier(node, 1024 /* Default */);
|
|
92697
92728
|
let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);
|
|
@@ -92726,6 +92757,11 @@ ${lanes.join("\n")}
|
|
|
92726
92757
|
)
|
|
92727
92758
|
));
|
|
92728
92759
|
}
|
|
92760
|
+
const alias = getClassLexicalEnvironment().classConstructor;
|
|
92761
|
+
if (isClassWithConstructorReference && alias) {
|
|
92762
|
+
enableSubstitutionForClassAliases();
|
|
92763
|
+
classAliases[getOriginalNodeId(node)] = alias;
|
|
92764
|
+
}
|
|
92729
92765
|
const classDecl = factory2.updateClassDeclaration(
|
|
92730
92766
|
node,
|
|
92731
92767
|
modifiers,
|
|
@@ -92748,14 +92784,14 @@ ${lanes.join("\n")}
|
|
|
92748
92784
|
var _a, _b, _c;
|
|
92749
92785
|
const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
|
|
92750
92786
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
92751
|
-
const
|
|
92787
|
+
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
92788
|
+
const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */;
|
|
92752
92789
|
let temp;
|
|
92753
92790
|
function createClassTempVar() {
|
|
92754
92791
|
var _a2;
|
|
92755
92792
|
if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) {
|
|
92756
92793
|
return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis;
|
|
92757
92794
|
}
|
|
92758
|
-
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
92759
92795
|
const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
|
|
92760
92796
|
const temp2 = factory2.createTempVariable(
|
|
92761
92797
|
requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration,
|
|
@@ -93722,7 +93758,7 @@ ${lanes.join("\n")}
|
|
|
93722
93758
|
}
|
|
93723
93759
|
function trySubstituteClassAlias(node) {
|
|
93724
93760
|
if (enabledSubstitutions & 1 /* ClassAliases */) {
|
|
93725
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
93761
|
+
if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
|
|
93726
93762
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
93727
93763
|
if (declaration) {
|
|
93728
93764
|
const classAlias = classAliases[declaration.id];
|
|
@@ -94588,7 +94624,7 @@ ${lanes.join("\n")}
|
|
|
94588
94624
|
}
|
|
94589
94625
|
}
|
|
94590
94626
|
function getClassAliasIfNeeded(node) {
|
|
94591
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
94627
|
+
if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) {
|
|
94592
94628
|
enableSubstitutionForClassAliases();
|
|
94593
94629
|
const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
|
|
94594
94630
|
classAliases[getOriginalNodeId(node)] = classAlias;
|
|
@@ -94621,7 +94657,7 @@ ${lanes.join("\n")}
|
|
|
94621
94657
|
}
|
|
94622
94658
|
function trySubstituteClassAlias(node) {
|
|
94623
94659
|
if (classAliases) {
|
|
94624
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
94660
|
+
if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
|
|
94625
94661
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
94626
94662
|
if (declaration) {
|
|
94627
94663
|
const classAlias = classAliases[declaration.id];
|
|
@@ -94653,6 +94689,7 @@ ${lanes.join("\n")}
|
|
|
94653
94689
|
endLexicalEnvironment,
|
|
94654
94690
|
hoistVariableDeclaration
|
|
94655
94691
|
} = context;
|
|
94692
|
+
const languageVersion = getEmitScriptTarget(context.getCompilerOptions());
|
|
94656
94693
|
let top;
|
|
94657
94694
|
let classInfo;
|
|
94658
94695
|
let classThis;
|
|
@@ -96154,6 +96191,17 @@ ${lanes.join("\n")}
|
|
|
96154
96191
|
function transformDecorator(decorator) {
|
|
96155
96192
|
const expression = visitNode(decorator.expression, visitor, isExpression);
|
|
96156
96193
|
setEmitFlags(expression, 3072 /* NoComments */);
|
|
96194
|
+
const innerExpression = skipOuterExpressions(expression);
|
|
96195
|
+
if (isAccessExpression(innerExpression)) {
|
|
96196
|
+
const { target, thisArg } = factory2.createCallBinding(
|
|
96197
|
+
expression,
|
|
96198
|
+
hoistVariableDeclaration,
|
|
96199
|
+
languageVersion,
|
|
96200
|
+
/*cacheIdentifiers*/
|
|
96201
|
+
true
|
|
96202
|
+
);
|
|
96203
|
+
return factory2.restoreOuterExpressions(expression, factory2.createFunctionBindCall(target, thisArg, []));
|
|
96204
|
+
}
|
|
96157
96205
|
return expression;
|
|
96158
96206
|
}
|
|
96159
96207
|
function createDescriptorMethod(original, name, modifiers, asteriskToken, kind, parameters, body) {
|
|
@@ -102852,10 +102900,10 @@ ${lanes.join("\n")}
|
|
|
102852
102900
|
name
|
|
102853
102901
|
));
|
|
102854
102902
|
const checkFlags = resolver.getNodeCheckFlags(decl);
|
|
102855
|
-
if (checkFlags &
|
|
102903
|
+
if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
|
|
102856
102904
|
const outParamName = factory2.createUniqueName("out_" + idText(name));
|
|
102857
102905
|
let flags = 0 /* None */;
|
|
102858
|
-
if (checkFlags &
|
|
102906
|
+
if (checkFlags & 65536 /* NeedsLoopOutParameter */) {
|
|
102859
102907
|
flags |= 1 /* Body */;
|
|
102860
102908
|
}
|
|
102861
102909
|
if (isForStatement(container)) {
|
|
@@ -105075,7 +105123,7 @@ ${lanes.join("\n")}
|
|
|
105075
105123
|
if (labelExpressions === void 0) {
|
|
105076
105124
|
labelExpressions = [];
|
|
105077
105125
|
}
|
|
105078
|
-
const expression = factory2.createNumericLiteral(
|
|
105126
|
+
const expression = factory2.createNumericLiteral(Number.MAX_SAFE_INTEGER);
|
|
105079
105127
|
if (labelExpressions[label] === void 0) {
|
|
105080
105128
|
labelExpressions[label] = [expression];
|
|
105081
105129
|
} else {
|
|
@@ -110969,7 +111017,8 @@ ${lanes.join("\n")}
|
|
|
110969
111017
|
if (shouldStripInternal(m))
|
|
110970
111018
|
return;
|
|
110971
111019
|
const constValue = resolver.getConstantValue(m);
|
|
110972
|
-
|
|
111020
|
+
const newInitializer = constValue === void 0 ? void 0 : typeof constValue === "string" ? factory2.createStringLiteral(constValue) : constValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constValue))) : factory2.createNumericLiteral(constValue);
|
|
111021
|
+
return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);
|
|
110973
111022
|
}))));
|
|
110974
111023
|
}
|
|
110975
111024
|
}
|
|
@@ -164093,8 +164142,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164093
164142
|
}
|
|
164094
164143
|
function addParameterHints(text, parameter, position, isFirstVariadicArgument, sourceFile) {
|
|
164095
164144
|
let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`;
|
|
164145
|
+
let displayParts;
|
|
164096
164146
|
if (shouldUseInteractiveInlayHints(preferences)) {
|
|
164097
|
-
|
|
164147
|
+
displayParts = [getNodeDisplayPart(hintText, parameter, sourceFile), { text: ":" }];
|
|
164148
|
+
hintText = "";
|
|
164098
164149
|
} else {
|
|
164099
164150
|
hintText += ":";
|
|
164100
164151
|
}
|
|
@@ -164102,7 +164153,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164102
164153
|
text: hintText,
|
|
164103
164154
|
position,
|
|
164104
164155
|
kind: "Parameter" /* Parameter */,
|
|
164105
|
-
whitespaceAfter: true
|
|
164156
|
+
whitespaceAfter: true,
|
|
164157
|
+
displayParts
|
|
164106
164158
|
});
|
|
164107
164159
|
}
|
|
164108
164160
|
function addTypeHints(text, position) {
|
|
@@ -181049,19 +181101,18 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
181049
181101
|
const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);
|
|
181050
181102
|
const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file));
|
|
181051
181103
|
return hints.map((hint) => {
|
|
181052
|
-
const {
|
|
181053
|
-
const hintText = typeof text === "string" ? text : text.map(({ text: text2, span, file: file2 }) => ({
|
|
181054
|
-
text: text2,
|
|
181055
|
-
span: span && {
|
|
181056
|
-
start: scriptInfo.positionToLineOffset(span.start),
|
|
181057
|
-
end: scriptInfo.positionToLineOffset(span.start + span.length),
|
|
181058
|
-
file: file2
|
|
181059
|
-
}
|
|
181060
|
-
}));
|
|
181104
|
+
const { position, displayParts } = hint;
|
|
181061
181105
|
return {
|
|
181062
181106
|
...hint,
|
|
181063
181107
|
position: scriptInfo.positionToLineOffset(position),
|
|
181064
|
-
text:
|
|
181108
|
+
displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => ({
|
|
181109
|
+
text,
|
|
181110
|
+
span: span && {
|
|
181111
|
+
start: scriptInfo.positionToLineOffset(span.start),
|
|
181112
|
+
end: scriptInfo.positionToLineOffset(span.start + span.length),
|
|
181113
|
+
file: file2
|
|
181114
|
+
}
|
|
181115
|
+
}))
|
|
181065
181116
|
};
|
|
181066
181117
|
});
|
|
181067
181118
|
}
|