@typescript-deploys/pr-build 5.1.0-pr-53938-7 → 5.1.0-pr-54121-5
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 +57 -38
- package/lib/tsserver.js +60 -42
- package/lib/tsserverlibrary.js +60 -42
- package/lib/typescript.js +60 -42
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -42861,13 +42861,7 @@ function createTypeChecker(host) {
|
|
|
42861
42861
|
getTypeOfPropertyOfContextualType,
|
|
42862
42862
|
getFullyQualifiedName,
|
|
42863
42863
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
42864
|
-
|
|
42865
|
-
call,
|
|
42866
|
-
candidatesOutArray,
|
|
42867
|
-
/*argumentCount*/
|
|
42868
|
-
void 0,
|
|
42869
|
-
32 /* IsForStringLiteralArgumentCompletions */
|
|
42870
|
-
)),
|
|
42864
|
+
getCandidateSignaturesForStringLiteralCompletions,
|
|
42871
42865
|
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),
|
|
42872
42866
|
getExpandedParameters,
|
|
42873
42867
|
hasEffectiveRestParameter,
|
|
@@ -43066,17 +43060,44 @@ function createTypeChecker(host) {
|
|
|
43066
43060
|
isTypeParameterPossiblyReferenced,
|
|
43067
43061
|
typeHasCallOrConstructSignatures
|
|
43068
43062
|
};
|
|
43063
|
+
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
43064
|
+
const candidatesSet = /* @__PURE__ */ new Set();
|
|
43065
|
+
const candidates = [];
|
|
43066
|
+
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
43067
|
+
call,
|
|
43068
|
+
candidates,
|
|
43069
|
+
/*argumentCount*/
|
|
43070
|
+
void 0,
|
|
43071
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
43072
|
+
));
|
|
43073
|
+
for (const candidate of candidates) {
|
|
43074
|
+
candidatesSet.add(candidate);
|
|
43075
|
+
}
|
|
43076
|
+
candidates.length = 0;
|
|
43077
|
+
runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
43078
|
+
call,
|
|
43079
|
+
candidates,
|
|
43080
|
+
/*argumentCount*/
|
|
43081
|
+
void 0,
|
|
43082
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
43083
|
+
));
|
|
43084
|
+
for (const candidate of candidates) {
|
|
43085
|
+
candidatesSet.add(candidate);
|
|
43086
|
+
}
|
|
43087
|
+
return arrayFrom(candidatesSet);
|
|
43088
|
+
}
|
|
43069
43089
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
43070
43090
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
43071
|
-
const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature;
|
|
43072
|
-
if (containingCall) {
|
|
43073
|
-
getNodeLinks(containingCall).resolvedSignature = void 0;
|
|
43074
|
-
}
|
|
43075
|
-
const result = fn();
|
|
43076
43091
|
if (containingCall) {
|
|
43077
|
-
getNodeLinks(containingCall)
|
|
43092
|
+
const links = getNodeLinks(containingCall);
|
|
43093
|
+
const containingCallResolvedSignature = links.resolvedSignature;
|
|
43094
|
+
links.resolvedSignature = void 0;
|
|
43095
|
+
const result = fn();
|
|
43096
|
+
links.resolvedSignature = containingCallResolvedSignature;
|
|
43097
|
+
return result;
|
|
43098
|
+
} else {
|
|
43099
|
+
return fn();
|
|
43078
43100
|
}
|
|
43079
|
-
return result;
|
|
43080
43101
|
}
|
|
43081
43102
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
43082
43103
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
@@ -47865,34 +47886,32 @@ function createTypeChecker(host) {
|
|
|
47865
47886
|
const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken });
|
|
47866
47887
|
typeElements.push(preserveCommentsOn(methodDeclaration));
|
|
47867
47888
|
}
|
|
47868
|
-
if (signatures.length || !optionalToken) {
|
|
47869
|
-
return;
|
|
47870
|
-
}
|
|
47871
|
-
}
|
|
47872
|
-
let propertyTypeNode;
|
|
47873
|
-
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
47874
|
-
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
47875
47889
|
} else {
|
|
47876
|
-
|
|
47877
|
-
|
|
47878
|
-
context
|
|
47890
|
+
let propertyTypeNode;
|
|
47891
|
+
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
47892
|
+
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
47893
|
+
} else {
|
|
47894
|
+
if (propertyIsReverseMapped) {
|
|
47895
|
+
context.reverseMappedStack || (context.reverseMappedStack = []);
|
|
47896
|
+
context.reverseMappedStack.push(propertySymbol);
|
|
47897
|
+
}
|
|
47898
|
+
propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
47899
|
+
if (propertyIsReverseMapped) {
|
|
47900
|
+
context.reverseMappedStack.pop();
|
|
47901
|
+
}
|
|
47879
47902
|
}
|
|
47880
|
-
|
|
47881
|
-
if (
|
|
47882
|
-
context.
|
|
47903
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
47904
|
+
if (modifiers) {
|
|
47905
|
+
context.approximateLength += 9;
|
|
47883
47906
|
}
|
|
47907
|
+
const propertySignature = factory.createPropertySignature(
|
|
47908
|
+
modifiers,
|
|
47909
|
+
propertyName,
|
|
47910
|
+
optionalToken,
|
|
47911
|
+
propertyTypeNode
|
|
47912
|
+
);
|
|
47913
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
47884
47914
|
}
|
|
47885
|
-
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
47886
|
-
if (modifiers) {
|
|
47887
|
-
context.approximateLength += 9;
|
|
47888
|
-
}
|
|
47889
|
-
const propertySignature = factory.createPropertySignature(
|
|
47890
|
-
modifiers,
|
|
47891
|
-
propertyName,
|
|
47892
|
-
optionalToken,
|
|
47893
|
-
propertyTypeNode
|
|
47894
|
-
);
|
|
47895
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
47896
47915
|
function preserveCommentsOn(node) {
|
|
47897
47916
|
var _a2;
|
|
47898
47917
|
if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) {
|
package/lib/tsserver.js
CHANGED
|
@@ -47290,7 +47290,7 @@ function createTypeChecker(host) {
|
|
|
47290
47290
|
var externalHelpersModule;
|
|
47291
47291
|
var Symbol47 = objectAllocator.getSymbolConstructor();
|
|
47292
47292
|
var Type27 = objectAllocator.getTypeConstructor();
|
|
47293
|
-
var
|
|
47293
|
+
var Signature14 = objectAllocator.getSignatureConstructor();
|
|
47294
47294
|
var typeCount = 0;
|
|
47295
47295
|
var symbolCount = 0;
|
|
47296
47296
|
var totalInstantiationCount = 0;
|
|
@@ -47511,13 +47511,7 @@ function createTypeChecker(host) {
|
|
|
47511
47511
|
getTypeOfPropertyOfContextualType,
|
|
47512
47512
|
getFullyQualifiedName,
|
|
47513
47513
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
47514
|
-
|
|
47515
|
-
call,
|
|
47516
|
-
candidatesOutArray,
|
|
47517
|
-
/*argumentCount*/
|
|
47518
|
-
void 0,
|
|
47519
|
-
32 /* IsForStringLiteralArgumentCompletions */
|
|
47520
|
-
)),
|
|
47514
|
+
getCandidateSignaturesForStringLiteralCompletions,
|
|
47521
47515
|
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),
|
|
47522
47516
|
getExpandedParameters,
|
|
47523
47517
|
hasEffectiveRestParameter,
|
|
@@ -47716,17 +47710,44 @@ function createTypeChecker(host) {
|
|
|
47716
47710
|
isTypeParameterPossiblyReferenced,
|
|
47717
47711
|
typeHasCallOrConstructSignatures
|
|
47718
47712
|
};
|
|
47713
|
+
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
47714
|
+
const candidatesSet = /* @__PURE__ */ new Set();
|
|
47715
|
+
const candidates = [];
|
|
47716
|
+
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
47717
|
+
call,
|
|
47718
|
+
candidates,
|
|
47719
|
+
/*argumentCount*/
|
|
47720
|
+
void 0,
|
|
47721
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
47722
|
+
));
|
|
47723
|
+
for (const candidate of candidates) {
|
|
47724
|
+
candidatesSet.add(candidate);
|
|
47725
|
+
}
|
|
47726
|
+
candidates.length = 0;
|
|
47727
|
+
runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
47728
|
+
call,
|
|
47729
|
+
candidates,
|
|
47730
|
+
/*argumentCount*/
|
|
47731
|
+
void 0,
|
|
47732
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
47733
|
+
));
|
|
47734
|
+
for (const candidate of candidates) {
|
|
47735
|
+
candidatesSet.add(candidate);
|
|
47736
|
+
}
|
|
47737
|
+
return arrayFrom(candidatesSet);
|
|
47738
|
+
}
|
|
47719
47739
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
47720
47740
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
47721
|
-
const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature;
|
|
47722
47741
|
if (containingCall) {
|
|
47723
|
-
getNodeLinks(containingCall)
|
|
47724
|
-
|
|
47725
|
-
|
|
47726
|
-
|
|
47727
|
-
|
|
47742
|
+
const links = getNodeLinks(containingCall);
|
|
47743
|
+
const containingCallResolvedSignature = links.resolvedSignature;
|
|
47744
|
+
links.resolvedSignature = void 0;
|
|
47745
|
+
const result = fn();
|
|
47746
|
+
links.resolvedSignature = containingCallResolvedSignature;
|
|
47747
|
+
return result;
|
|
47748
|
+
} else {
|
|
47749
|
+
return fn();
|
|
47728
47750
|
}
|
|
47729
|
-
return result;
|
|
47730
47751
|
}
|
|
47731
47752
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
47732
47753
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
@@ -52515,34 +52536,32 @@ function createTypeChecker(host) {
|
|
|
52515
52536
|
const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken });
|
|
52516
52537
|
typeElements.push(preserveCommentsOn(methodDeclaration));
|
|
52517
52538
|
}
|
|
52518
|
-
if (signatures.length || !optionalToken) {
|
|
52519
|
-
return;
|
|
52520
|
-
}
|
|
52521
|
-
}
|
|
52522
|
-
let propertyTypeNode;
|
|
52523
|
-
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
52524
|
-
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
52525
52539
|
} else {
|
|
52526
|
-
|
|
52527
|
-
|
|
52528
|
-
context
|
|
52540
|
+
let propertyTypeNode;
|
|
52541
|
+
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
52542
|
+
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
52543
|
+
} else {
|
|
52544
|
+
if (propertyIsReverseMapped) {
|
|
52545
|
+
context.reverseMappedStack || (context.reverseMappedStack = []);
|
|
52546
|
+
context.reverseMappedStack.push(propertySymbol);
|
|
52547
|
+
}
|
|
52548
|
+
propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
52549
|
+
if (propertyIsReverseMapped) {
|
|
52550
|
+
context.reverseMappedStack.pop();
|
|
52551
|
+
}
|
|
52529
52552
|
}
|
|
52530
|
-
|
|
52531
|
-
if (
|
|
52532
|
-
context.
|
|
52553
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
52554
|
+
if (modifiers) {
|
|
52555
|
+
context.approximateLength += 9;
|
|
52533
52556
|
}
|
|
52557
|
+
const propertySignature = factory.createPropertySignature(
|
|
52558
|
+
modifiers,
|
|
52559
|
+
propertyName,
|
|
52560
|
+
optionalToken,
|
|
52561
|
+
propertyTypeNode
|
|
52562
|
+
);
|
|
52563
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
52534
52564
|
}
|
|
52535
|
-
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
52536
|
-
if (modifiers) {
|
|
52537
|
-
context.approximateLength += 9;
|
|
52538
|
-
}
|
|
52539
|
-
const propertySignature = factory.createPropertySignature(
|
|
52540
|
-
modifiers,
|
|
52541
|
-
propertyName,
|
|
52542
|
-
optionalToken,
|
|
52543
|
-
propertyTypeNode
|
|
52544
|
-
);
|
|
52545
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
52546
52565
|
function preserveCommentsOn(node) {
|
|
52547
52566
|
var _a2;
|
|
52548
52567
|
if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) {
|
|
@@ -57332,7 +57351,7 @@ function createTypeChecker(host) {
|
|
|
57332
57351
|
resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments);
|
|
57333
57352
|
}
|
|
57334
57353
|
function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) {
|
|
57335
|
-
const sig = new
|
|
57354
|
+
const sig = new Signature14(checker, flags);
|
|
57336
57355
|
sig.declaration = declaration;
|
|
57337
57356
|
sig.typeParameters = typeParameters;
|
|
57338
57357
|
sig.parameters = parameters;
|
|
@@ -158642,9 +158661,8 @@ function getAlreadyUsedTypesInStringLiteralUnion(union, current) {
|
|
|
158642
158661
|
function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) {
|
|
158643
158662
|
let isNewIdentifier = false;
|
|
158644
158663
|
const uniques = /* @__PURE__ */ new Map();
|
|
158645
|
-
const candidates = [];
|
|
158646
158664
|
const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg;
|
|
158647
|
-
checker.
|
|
158665
|
+
const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument);
|
|
158648
158666
|
const types = flatMap(candidates, (candidate) => {
|
|
158649
158667
|
if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
158650
158668
|
return;
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -45082,7 +45082,7 @@ ${lanes.join("\n")}
|
|
|
45082
45082
|
var externalHelpersModule;
|
|
45083
45083
|
var Symbol47 = objectAllocator.getSymbolConstructor();
|
|
45084
45084
|
var Type27 = objectAllocator.getTypeConstructor();
|
|
45085
|
-
var
|
|
45085
|
+
var Signature14 = objectAllocator.getSignatureConstructor();
|
|
45086
45086
|
var typeCount = 0;
|
|
45087
45087
|
var symbolCount = 0;
|
|
45088
45088
|
var totalInstantiationCount = 0;
|
|
@@ -45303,13 +45303,7 @@ ${lanes.join("\n")}
|
|
|
45303
45303
|
getTypeOfPropertyOfContextualType,
|
|
45304
45304
|
getFullyQualifiedName,
|
|
45305
45305
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
45306
|
-
|
|
45307
|
-
call,
|
|
45308
|
-
candidatesOutArray,
|
|
45309
|
-
/*argumentCount*/
|
|
45310
|
-
void 0,
|
|
45311
|
-
32 /* IsForStringLiteralArgumentCompletions */
|
|
45312
|
-
)),
|
|
45306
|
+
getCandidateSignaturesForStringLiteralCompletions,
|
|
45313
45307
|
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),
|
|
45314
45308
|
getExpandedParameters,
|
|
45315
45309
|
hasEffectiveRestParameter,
|
|
@@ -45508,17 +45502,44 @@ ${lanes.join("\n")}
|
|
|
45508
45502
|
isTypeParameterPossiblyReferenced,
|
|
45509
45503
|
typeHasCallOrConstructSignatures
|
|
45510
45504
|
};
|
|
45505
|
+
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
45506
|
+
const candidatesSet = /* @__PURE__ */ new Set();
|
|
45507
|
+
const candidates = [];
|
|
45508
|
+
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
45509
|
+
call,
|
|
45510
|
+
candidates,
|
|
45511
|
+
/*argumentCount*/
|
|
45512
|
+
void 0,
|
|
45513
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
45514
|
+
));
|
|
45515
|
+
for (const candidate of candidates) {
|
|
45516
|
+
candidatesSet.add(candidate);
|
|
45517
|
+
}
|
|
45518
|
+
candidates.length = 0;
|
|
45519
|
+
runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
45520
|
+
call,
|
|
45521
|
+
candidates,
|
|
45522
|
+
/*argumentCount*/
|
|
45523
|
+
void 0,
|
|
45524
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
45525
|
+
));
|
|
45526
|
+
for (const candidate of candidates) {
|
|
45527
|
+
candidatesSet.add(candidate);
|
|
45528
|
+
}
|
|
45529
|
+
return arrayFrom(candidatesSet);
|
|
45530
|
+
}
|
|
45511
45531
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
45512
45532
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
45513
|
-
const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature;
|
|
45514
|
-
if (containingCall) {
|
|
45515
|
-
getNodeLinks(containingCall).resolvedSignature = void 0;
|
|
45516
|
-
}
|
|
45517
|
-
const result = fn();
|
|
45518
45533
|
if (containingCall) {
|
|
45519
|
-
getNodeLinks(containingCall)
|
|
45534
|
+
const links = getNodeLinks(containingCall);
|
|
45535
|
+
const containingCallResolvedSignature = links.resolvedSignature;
|
|
45536
|
+
links.resolvedSignature = void 0;
|
|
45537
|
+
const result = fn();
|
|
45538
|
+
links.resolvedSignature = containingCallResolvedSignature;
|
|
45539
|
+
return result;
|
|
45540
|
+
} else {
|
|
45541
|
+
return fn();
|
|
45520
45542
|
}
|
|
45521
|
-
return result;
|
|
45522
45543
|
}
|
|
45523
45544
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
45524
45545
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
@@ -50307,34 +50328,32 @@ ${lanes.join("\n")}
|
|
|
50307
50328
|
const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken });
|
|
50308
50329
|
typeElements.push(preserveCommentsOn(methodDeclaration));
|
|
50309
50330
|
}
|
|
50310
|
-
if (signatures.length || !optionalToken) {
|
|
50311
|
-
return;
|
|
50312
|
-
}
|
|
50313
|
-
}
|
|
50314
|
-
let propertyTypeNode;
|
|
50315
|
-
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
50316
|
-
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
50317
50331
|
} else {
|
|
50318
|
-
|
|
50319
|
-
|
|
50320
|
-
context
|
|
50332
|
+
let propertyTypeNode;
|
|
50333
|
+
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
50334
|
+
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
50335
|
+
} else {
|
|
50336
|
+
if (propertyIsReverseMapped) {
|
|
50337
|
+
context.reverseMappedStack || (context.reverseMappedStack = []);
|
|
50338
|
+
context.reverseMappedStack.push(propertySymbol);
|
|
50339
|
+
}
|
|
50340
|
+
propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
50341
|
+
if (propertyIsReverseMapped) {
|
|
50342
|
+
context.reverseMappedStack.pop();
|
|
50343
|
+
}
|
|
50321
50344
|
}
|
|
50322
|
-
|
|
50323
|
-
if (
|
|
50324
|
-
context.
|
|
50345
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
50346
|
+
if (modifiers) {
|
|
50347
|
+
context.approximateLength += 9;
|
|
50325
50348
|
}
|
|
50349
|
+
const propertySignature = factory.createPropertySignature(
|
|
50350
|
+
modifiers,
|
|
50351
|
+
propertyName,
|
|
50352
|
+
optionalToken,
|
|
50353
|
+
propertyTypeNode
|
|
50354
|
+
);
|
|
50355
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50326
50356
|
}
|
|
50327
|
-
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
50328
|
-
if (modifiers) {
|
|
50329
|
-
context.approximateLength += 9;
|
|
50330
|
-
}
|
|
50331
|
-
const propertySignature = factory.createPropertySignature(
|
|
50332
|
-
modifiers,
|
|
50333
|
-
propertyName,
|
|
50334
|
-
optionalToken,
|
|
50335
|
-
propertyTypeNode
|
|
50336
|
-
);
|
|
50337
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50338
50357
|
function preserveCommentsOn(node) {
|
|
50339
50358
|
var _a2;
|
|
50340
50359
|
if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) {
|
|
@@ -55124,7 +55143,7 @@ ${lanes.join("\n")}
|
|
|
55124
55143
|
resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments);
|
|
55125
55144
|
}
|
|
55126
55145
|
function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) {
|
|
55127
|
-
const sig = new
|
|
55146
|
+
const sig = new Signature14(checker, flags);
|
|
55128
55147
|
sig.declaration = declaration;
|
|
55129
55148
|
sig.typeParameters = typeParameters;
|
|
55130
55149
|
sig.parameters = parameters;
|
|
@@ -157918,9 +157937,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
157918
157937
|
function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) {
|
|
157919
157938
|
let isNewIdentifier = false;
|
|
157920
157939
|
const uniques = /* @__PURE__ */ new Map();
|
|
157921
|
-
const candidates = [];
|
|
157922
157940
|
const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg;
|
|
157923
|
-
checker.
|
|
157941
|
+
const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument);
|
|
157924
157942
|
const types = flatMap(candidates, (candidate) => {
|
|
157925
157943
|
if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
157926
157944
|
return;
|
package/lib/typescript.js
CHANGED
|
@@ -45082,7 +45082,7 @@ ${lanes.join("\n")}
|
|
|
45082
45082
|
var externalHelpersModule;
|
|
45083
45083
|
var Symbol47 = objectAllocator.getSymbolConstructor();
|
|
45084
45084
|
var Type27 = objectAllocator.getTypeConstructor();
|
|
45085
|
-
var
|
|
45085
|
+
var Signature14 = objectAllocator.getSignatureConstructor();
|
|
45086
45086
|
var typeCount = 0;
|
|
45087
45087
|
var symbolCount = 0;
|
|
45088
45088
|
var totalInstantiationCount = 0;
|
|
@@ -45303,13 +45303,7 @@ ${lanes.join("\n")}
|
|
|
45303
45303
|
getTypeOfPropertyOfContextualType,
|
|
45304
45304
|
getFullyQualifiedName,
|
|
45305
45305
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
45306
|
-
|
|
45307
|
-
call,
|
|
45308
|
-
candidatesOutArray,
|
|
45309
|
-
/*argumentCount*/
|
|
45310
|
-
void 0,
|
|
45311
|
-
32 /* IsForStringLiteralArgumentCompletions */
|
|
45312
|
-
)),
|
|
45306
|
+
getCandidateSignaturesForStringLiteralCompletions,
|
|
45313
45307
|
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),
|
|
45314
45308
|
getExpandedParameters,
|
|
45315
45309
|
hasEffectiveRestParameter,
|
|
@@ -45508,17 +45502,44 @@ ${lanes.join("\n")}
|
|
|
45508
45502
|
isTypeParameterPossiblyReferenced,
|
|
45509
45503
|
typeHasCallOrConstructSignatures
|
|
45510
45504
|
};
|
|
45505
|
+
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
45506
|
+
const candidatesSet = /* @__PURE__ */ new Set();
|
|
45507
|
+
const candidates = [];
|
|
45508
|
+
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
45509
|
+
call,
|
|
45510
|
+
candidates,
|
|
45511
|
+
/*argumentCount*/
|
|
45512
|
+
void 0,
|
|
45513
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
45514
|
+
));
|
|
45515
|
+
for (const candidate of candidates) {
|
|
45516
|
+
candidatesSet.add(candidate);
|
|
45517
|
+
}
|
|
45518
|
+
candidates.length = 0;
|
|
45519
|
+
runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
45520
|
+
call,
|
|
45521
|
+
candidates,
|
|
45522
|
+
/*argumentCount*/
|
|
45523
|
+
void 0,
|
|
45524
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
45525
|
+
));
|
|
45526
|
+
for (const candidate of candidates) {
|
|
45527
|
+
candidatesSet.add(candidate);
|
|
45528
|
+
}
|
|
45529
|
+
return arrayFrom(candidatesSet);
|
|
45530
|
+
}
|
|
45511
45531
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
45512
45532
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
45513
|
-
const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature;
|
|
45514
|
-
if (containingCall) {
|
|
45515
|
-
getNodeLinks(containingCall).resolvedSignature = void 0;
|
|
45516
|
-
}
|
|
45517
|
-
const result = fn();
|
|
45518
45533
|
if (containingCall) {
|
|
45519
|
-
getNodeLinks(containingCall)
|
|
45534
|
+
const links = getNodeLinks(containingCall);
|
|
45535
|
+
const containingCallResolvedSignature = links.resolvedSignature;
|
|
45536
|
+
links.resolvedSignature = void 0;
|
|
45537
|
+
const result = fn();
|
|
45538
|
+
links.resolvedSignature = containingCallResolvedSignature;
|
|
45539
|
+
return result;
|
|
45540
|
+
} else {
|
|
45541
|
+
return fn();
|
|
45520
45542
|
}
|
|
45521
|
-
return result;
|
|
45522
45543
|
}
|
|
45523
45544
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
45524
45545
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
@@ -50307,34 +50328,32 @@ ${lanes.join("\n")}
|
|
|
50307
50328
|
const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken });
|
|
50308
50329
|
typeElements.push(preserveCommentsOn(methodDeclaration));
|
|
50309
50330
|
}
|
|
50310
|
-
if (signatures.length || !optionalToken) {
|
|
50311
|
-
return;
|
|
50312
|
-
}
|
|
50313
|
-
}
|
|
50314
|
-
let propertyTypeNode;
|
|
50315
|
-
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
50316
|
-
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
50317
50331
|
} else {
|
|
50318
|
-
|
|
50319
|
-
|
|
50320
|
-
context
|
|
50332
|
+
let propertyTypeNode;
|
|
50333
|
+
if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
|
|
50334
|
+
propertyTypeNode = createElidedInformationPlaceholder(context);
|
|
50335
|
+
} else {
|
|
50336
|
+
if (propertyIsReverseMapped) {
|
|
50337
|
+
context.reverseMappedStack || (context.reverseMappedStack = []);
|
|
50338
|
+
context.reverseMappedStack.push(propertySymbol);
|
|
50339
|
+
}
|
|
50340
|
+
propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
50341
|
+
if (propertyIsReverseMapped) {
|
|
50342
|
+
context.reverseMappedStack.pop();
|
|
50343
|
+
}
|
|
50321
50344
|
}
|
|
50322
|
-
|
|
50323
|
-
if (
|
|
50324
|
-
context.
|
|
50345
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
50346
|
+
if (modifiers) {
|
|
50347
|
+
context.approximateLength += 9;
|
|
50325
50348
|
}
|
|
50349
|
+
const propertySignature = factory.createPropertySignature(
|
|
50350
|
+
modifiers,
|
|
50351
|
+
propertyName,
|
|
50352
|
+
optionalToken,
|
|
50353
|
+
propertyTypeNode
|
|
50354
|
+
);
|
|
50355
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50326
50356
|
}
|
|
50327
|
-
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
50328
|
-
if (modifiers) {
|
|
50329
|
-
context.approximateLength += 9;
|
|
50330
|
-
}
|
|
50331
|
-
const propertySignature = factory.createPropertySignature(
|
|
50332
|
-
modifiers,
|
|
50333
|
-
propertyName,
|
|
50334
|
-
optionalToken,
|
|
50335
|
-
propertyTypeNode
|
|
50336
|
-
);
|
|
50337
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50338
50357
|
function preserveCommentsOn(node) {
|
|
50339
50358
|
var _a2;
|
|
50340
50359
|
if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) {
|
|
@@ -55124,7 +55143,7 @@ ${lanes.join("\n")}
|
|
|
55124
55143
|
resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments);
|
|
55125
55144
|
}
|
|
55126
55145
|
function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) {
|
|
55127
|
-
const sig = new
|
|
55146
|
+
const sig = new Signature14(checker, flags);
|
|
55128
55147
|
sig.declaration = declaration;
|
|
55129
55148
|
sig.typeParameters = typeParameters;
|
|
55130
55149
|
sig.parameters = parameters;
|
|
@@ -157933,9 +157952,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
157933
157952
|
function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) {
|
|
157934
157953
|
let isNewIdentifier = false;
|
|
157935
157954
|
const uniques = /* @__PURE__ */ new Map();
|
|
157936
|
-
const candidates = [];
|
|
157937
157955
|
const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg;
|
|
157938
|
-
checker.
|
|
157956
|
+
const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument);
|
|
157939
157957
|
const types = flatMap(candidates, (candidate) => {
|
|
157940
157958
|
if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
157941
157959
|
return;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-54121-5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"node": "14.21.1",
|
|
117
117
|
"npm": "8.19.3"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "6fb2754a018b2bb92b34162d004fa87c6818f514"
|
|
120
120
|
}
|