@typescript-deploys/pr-build 5.3.0-pr-55864-6 → 5.3.0-pr-55880-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 +64 -44
- package/lib/tsserver.js +74 -52
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +73 -52
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230926`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -10930,6 +10930,9 @@ function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
|
10930
10930
|
const kind = node.kind;
|
|
10931
10931
|
return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */;
|
|
10932
10932
|
}
|
|
10933
|
+
function isCallLikeOrFunctionLikeExpression(node) {
|
|
10934
|
+
return isCallLikeExpression(node) || isFunctionLike(node);
|
|
10935
|
+
}
|
|
10933
10936
|
function isCallLikeExpression(node) {
|
|
10934
10937
|
switch (node.kind) {
|
|
10935
10938
|
case 286 /* JsxOpeningElement */:
|
|
@@ -16473,7 +16476,7 @@ function createSymlinkCache(cwd, getCanonicalFileName) {
|
|
|
16473
16476
|
if (!containsIgnoredPath(symlinkPath)) {
|
|
16474
16477
|
symlinkPath = ensureTrailingDirectorySeparator(symlinkPath);
|
|
16475
16478
|
if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) {
|
|
16476
|
-
(symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(
|
|
16479
|
+
(symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(real.realPath, symlink);
|
|
16477
16480
|
}
|
|
16478
16481
|
(symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real);
|
|
16479
16482
|
}
|
|
@@ -16496,7 +16499,10 @@ function createSymlinkCache(cwd, getCanonicalFileName) {
|
|
|
16496
16499
|
if (commonResolved && commonOriginal) {
|
|
16497
16500
|
cache.setSymlinkedDirectory(
|
|
16498
16501
|
commonOriginal,
|
|
16499
|
-
{
|
|
16502
|
+
{
|
|
16503
|
+
real: ensureTrailingDirectorySeparator(commonResolved),
|
|
16504
|
+
realPath: ensureTrailingDirectorySeparator(toPath(commonResolved, cwd, getCanonicalFileName))
|
|
16505
|
+
}
|
|
16500
16506
|
);
|
|
16501
16507
|
}
|
|
16502
16508
|
}
|
|
@@ -43279,24 +43285,7 @@ function createTypeChecker(host) {
|
|
|
43279
43285
|
getTypeOfPropertyOfContextualType,
|
|
43280
43286
|
getFullyQualifiedName,
|
|
43281
43287
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
43282
|
-
|
|
43283
|
-
if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) {
|
|
43284
|
-
return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
43285
|
-
call,
|
|
43286
|
-
candidatesOutArray,
|
|
43287
|
-
/*argumentCount*/
|
|
43288
|
-
void 0,
|
|
43289
|
-
checkMode & ~32 /* IsForStringLiteralArgumentCompletions */
|
|
43290
|
-
));
|
|
43291
|
-
}
|
|
43292
|
-
return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
43293
|
-
call,
|
|
43294
|
-
candidatesOutArray,
|
|
43295
|
-
/*argumentCount*/
|
|
43296
|
-
void 0,
|
|
43297
|
-
checkMode & ~32 /* IsForStringLiteralArgumentCompletions */
|
|
43298
|
-
));
|
|
43299
|
-
},
|
|
43288
|
+
getCandidateSignaturesForStringLiteralCompletions,
|
|
43300
43289
|
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),
|
|
43301
43290
|
getExpandedParameters,
|
|
43302
43291
|
hasEffectiveRestParameter,
|
|
@@ -43495,32 +43484,59 @@ function createTypeChecker(host) {
|
|
|
43495
43484
|
isTypeParameterPossiblyReferenced,
|
|
43496
43485
|
typeHasCallOrConstructSignatures
|
|
43497
43486
|
};
|
|
43487
|
+
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
43488
|
+
const candidatesSet = /* @__PURE__ */ new Set();
|
|
43489
|
+
const candidates = [];
|
|
43490
|
+
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
43491
|
+
call,
|
|
43492
|
+
candidates,
|
|
43493
|
+
/*argumentCount*/
|
|
43494
|
+
void 0,
|
|
43495
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
43496
|
+
));
|
|
43497
|
+
for (const candidate of candidates) {
|
|
43498
|
+
candidatesSet.add(candidate);
|
|
43499
|
+
}
|
|
43500
|
+
candidates.length = 0;
|
|
43501
|
+
runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
43502
|
+
call,
|
|
43503
|
+
candidates,
|
|
43504
|
+
/*argumentCount*/
|
|
43505
|
+
void 0,
|
|
43506
|
+
0 /* Normal */
|
|
43507
|
+
));
|
|
43508
|
+
for (const candidate of candidates) {
|
|
43509
|
+
candidatesSet.add(candidate);
|
|
43510
|
+
}
|
|
43511
|
+
return arrayFrom(candidatesSet);
|
|
43512
|
+
}
|
|
43498
43513
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
43499
|
-
|
|
43500
|
-
|
|
43501
|
-
|
|
43502
|
-
|
|
43514
|
+
node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
|
|
43515
|
+
if (node) {
|
|
43516
|
+
const cachedResolvedSignatures = [];
|
|
43517
|
+
const cachedTypes2 = [];
|
|
43518
|
+
while (node) {
|
|
43503
43519
|
const nodeLinks2 = getNodeLinks(node);
|
|
43504
|
-
|
|
43505
|
-
cachedResolvedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
43520
|
+
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
43506
43521
|
nodeLinks2.resolvedSignature = void 0;
|
|
43522
|
+
if (isFunctionLike(node)) {
|
|
43523
|
+
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
43524
|
+
const type = symbolLinks2.type;
|
|
43525
|
+
cachedTypes2.push([symbolLinks2, type]);
|
|
43526
|
+
symbolLinks2.type = void 0;
|
|
43527
|
+
}
|
|
43528
|
+
node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
|
|
43507
43529
|
}
|
|
43508
|
-
|
|
43509
|
-
|
|
43510
|
-
|
|
43511
|
-
cachedTypes2.push([symbolLinks2, type]);
|
|
43512
|
-
symbolLinks2.type = void 0;
|
|
43530
|
+
const result = fn();
|
|
43531
|
+
for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
|
|
43532
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
43513
43533
|
}
|
|
43514
|
-
|
|
43515
|
-
|
|
43516
|
-
|
|
43517
|
-
|
|
43518
|
-
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
43519
|
-
}
|
|
43520
|
-
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
43521
|
-
symbolLinks2.type = type;
|
|
43534
|
+
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
43535
|
+
symbolLinks2.type = type;
|
|
43536
|
+
}
|
|
43537
|
+
return result;
|
|
43522
43538
|
}
|
|
43523
|
-
return
|
|
43539
|
+
return fn();
|
|
43524
43540
|
}
|
|
43525
43541
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
43526
43542
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
@@ -62046,7 +62062,7 @@ function createTypeChecker(host) {
|
|
|
62046
62062
|
sourceSignatures[i],
|
|
62047
62063
|
targetSignatures[i],
|
|
62048
62064
|
/*erase*/
|
|
62049
|
-
|
|
62065
|
+
true,
|
|
62050
62066
|
reportErrors2,
|
|
62051
62067
|
intersectionState,
|
|
62052
62068
|
incompatibleReporter(sourceSignatures[i], targetSignatures[i])
|
|
@@ -62370,7 +62386,10 @@ function createTypeChecker(host) {
|
|
|
62370
62386
|
return false;
|
|
62371
62387
|
}
|
|
62372
62388
|
function getVariances(type) {
|
|
62373
|
-
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
|
|
62389
|
+
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ || isArraySubtype(type) ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
|
|
62390
|
+
}
|
|
62391
|
+
function isArraySubtype(type) {
|
|
62392
|
+
return length(type.typeParameters) === 1 && length(getBaseTypes(type)) === 1 && isTypeReferenceWithGenericArguments(getBaseTypes(type)[0]) && getVariances(getBaseTypes(type)[0].target) === arrayVariances && length(getTypeArguments(getBaseTypes(type)[0])) === 1 && getTypeArguments(getBaseTypes(type)[0])[0] === type.typeParameters[0];
|
|
62374
62393
|
}
|
|
62375
62394
|
function getAliasVariances(symbol) {
|
|
62376
62395
|
return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters);
|
|
@@ -70234,7 +70253,7 @@ function createTypeChecker(host) {
|
|
|
70234
70253
|
}
|
|
70235
70254
|
for (let i = 0; i < argCount; i++) {
|
|
70236
70255
|
const arg = args[i];
|
|
70237
|
-
if (arg.kind !== 232 /* OmittedExpression */) {
|
|
70256
|
+
if (arg.kind !== 232 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) {
|
|
70238
70257
|
const paramType = getTypeAtPosition(signature, i);
|
|
70239
70258
|
if (couldContainTypeVariables(paramType)) {
|
|
70240
70259
|
const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode);
|
|
@@ -70837,6 +70856,7 @@ function createTypeChecker(host) {
|
|
|
70837
70856
|
const args = getEffectiveCallArguments(node);
|
|
70838
70857
|
const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
|
|
70839
70858
|
let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */;
|
|
70859
|
+
argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */;
|
|
70840
70860
|
let candidatesForArgumentError;
|
|
70841
70861
|
let candidateForArgumentArityError;
|
|
70842
70862
|
let candidateForTypeArgumentError;
|
package/lib/tsserver.js
CHANGED
|
@@ -1238,6 +1238,7 @@ __export(server_exports, {
|
|
|
1238
1238
|
isCallExpression: () => isCallExpression,
|
|
1239
1239
|
isCallExpressionTarget: () => isCallExpressionTarget,
|
|
1240
1240
|
isCallLikeExpression: () => isCallLikeExpression,
|
|
1241
|
+
isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression,
|
|
1241
1242
|
isCallOrNewExpression: () => isCallOrNewExpression,
|
|
1242
1243
|
isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget,
|
|
1243
1244
|
isCallSignatureDeclaration: () => isCallSignatureDeclaration,
|
|
@@ -2327,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2327
2328
|
|
|
2328
2329
|
// src/compiler/corePublic.ts
|
|
2329
2330
|
var versionMajorMinor = "5.3";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2331
|
+
var version = `${versionMajorMinor}.0-insiders.20230926`;
|
|
2331
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -14606,6 +14607,9 @@ function isPropertyAccessOrQualifiedName(node) {
|
|
|
14606
14607
|
const kind = node.kind;
|
|
14607
14608
|
return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */;
|
|
14608
14609
|
}
|
|
14610
|
+
function isCallLikeOrFunctionLikeExpression(node) {
|
|
14611
|
+
return isCallLikeExpression(node) || isFunctionLike(node);
|
|
14612
|
+
}
|
|
14609
14613
|
function isCallLikeExpression(node) {
|
|
14610
14614
|
switch (node.kind) {
|
|
14611
14615
|
case 286 /* JsxOpeningElement */:
|
|
@@ -20624,7 +20628,7 @@ function createSymlinkCache(cwd, getCanonicalFileName) {
|
|
|
20624
20628
|
if (!containsIgnoredPath(symlinkPath)) {
|
|
20625
20629
|
symlinkPath = ensureTrailingDirectorySeparator(symlinkPath);
|
|
20626
20630
|
if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) {
|
|
20627
|
-
(symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(
|
|
20631
|
+
(symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(real.realPath, symlink);
|
|
20628
20632
|
}
|
|
20629
20633
|
(symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real);
|
|
20630
20634
|
}
|
|
@@ -20647,7 +20651,10 @@ function createSymlinkCache(cwd, getCanonicalFileName) {
|
|
|
20647
20651
|
if (commonResolved && commonOriginal) {
|
|
20648
20652
|
cache.setSymlinkedDirectory(
|
|
20649
20653
|
commonOriginal,
|
|
20650
|
-
{
|
|
20654
|
+
{
|
|
20655
|
+
real: ensureTrailingDirectorySeparator(commonResolved),
|
|
20656
|
+
realPath: ensureTrailingDirectorySeparator(toPath(commonResolved, cwd, getCanonicalFileName))
|
|
20657
|
+
}
|
|
20651
20658
|
);
|
|
20652
20659
|
}
|
|
20653
20660
|
}
|
|
@@ -47757,7 +47764,7 @@ function createTypeChecker(host) {
|
|
|
47757
47764
|
var externalHelpersModule;
|
|
47758
47765
|
var Symbol47 = objectAllocator.getSymbolConstructor();
|
|
47759
47766
|
var Type27 = objectAllocator.getTypeConstructor();
|
|
47760
|
-
var
|
|
47767
|
+
var Signature14 = objectAllocator.getSignatureConstructor();
|
|
47761
47768
|
var typeCount = 0;
|
|
47762
47769
|
var symbolCount = 0;
|
|
47763
47770
|
var totalInstantiationCount = 0;
|
|
@@ -47983,24 +47990,7 @@ function createTypeChecker(host) {
|
|
|
47983
47990
|
getTypeOfPropertyOfContextualType,
|
|
47984
47991
|
getFullyQualifiedName,
|
|
47985
47992
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
47986
|
-
|
|
47987
|
-
if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) {
|
|
47988
|
-
return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
47989
|
-
call,
|
|
47990
|
-
candidatesOutArray,
|
|
47991
|
-
/*argumentCount*/
|
|
47992
|
-
void 0,
|
|
47993
|
-
checkMode & ~32 /* IsForStringLiteralArgumentCompletions */
|
|
47994
|
-
));
|
|
47995
|
-
}
|
|
47996
|
-
return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
47997
|
-
call,
|
|
47998
|
-
candidatesOutArray,
|
|
47999
|
-
/*argumentCount*/
|
|
48000
|
-
void 0,
|
|
48001
|
-
checkMode & ~32 /* IsForStringLiteralArgumentCompletions */
|
|
48002
|
-
));
|
|
48003
|
-
},
|
|
47993
|
+
getCandidateSignaturesForStringLiteralCompletions,
|
|
48004
47994
|
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),
|
|
48005
47995
|
getExpandedParameters,
|
|
48006
47996
|
hasEffectiveRestParameter,
|
|
@@ -48199,32 +48189,59 @@ function createTypeChecker(host) {
|
|
|
48199
48189
|
isTypeParameterPossiblyReferenced,
|
|
48200
48190
|
typeHasCallOrConstructSignatures
|
|
48201
48191
|
};
|
|
48192
|
+
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
48193
|
+
const candidatesSet = /* @__PURE__ */ new Set();
|
|
48194
|
+
const candidates = [];
|
|
48195
|
+
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
48196
|
+
call,
|
|
48197
|
+
candidates,
|
|
48198
|
+
/*argumentCount*/
|
|
48199
|
+
void 0,
|
|
48200
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
48201
|
+
));
|
|
48202
|
+
for (const candidate of candidates) {
|
|
48203
|
+
candidatesSet.add(candidate);
|
|
48204
|
+
}
|
|
48205
|
+
candidates.length = 0;
|
|
48206
|
+
runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
48207
|
+
call,
|
|
48208
|
+
candidates,
|
|
48209
|
+
/*argumentCount*/
|
|
48210
|
+
void 0,
|
|
48211
|
+
0 /* Normal */
|
|
48212
|
+
));
|
|
48213
|
+
for (const candidate of candidates) {
|
|
48214
|
+
candidatesSet.add(candidate);
|
|
48215
|
+
}
|
|
48216
|
+
return arrayFrom(candidatesSet);
|
|
48217
|
+
}
|
|
48202
48218
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
48203
|
-
|
|
48204
|
-
|
|
48205
|
-
|
|
48206
|
-
|
|
48219
|
+
node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
|
|
48220
|
+
if (node) {
|
|
48221
|
+
const cachedResolvedSignatures = [];
|
|
48222
|
+
const cachedTypes2 = [];
|
|
48223
|
+
while (node) {
|
|
48207
48224
|
const nodeLinks2 = getNodeLinks(node);
|
|
48208
|
-
|
|
48209
|
-
cachedResolvedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
48225
|
+
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
48210
48226
|
nodeLinks2.resolvedSignature = void 0;
|
|
48227
|
+
if (isFunctionLike(node)) {
|
|
48228
|
+
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
48229
|
+
const type = symbolLinks2.type;
|
|
48230
|
+
cachedTypes2.push([symbolLinks2, type]);
|
|
48231
|
+
symbolLinks2.type = void 0;
|
|
48232
|
+
}
|
|
48233
|
+
node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
|
|
48211
48234
|
}
|
|
48212
|
-
|
|
48213
|
-
|
|
48214
|
-
|
|
48215
|
-
cachedTypes2.push([symbolLinks2, type]);
|
|
48216
|
-
symbolLinks2.type = void 0;
|
|
48235
|
+
const result = fn();
|
|
48236
|
+
for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
|
|
48237
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
48217
48238
|
}
|
|
48218
|
-
|
|
48219
|
-
|
|
48220
|
-
|
|
48221
|
-
|
|
48222
|
-
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
48223
|
-
}
|
|
48224
|
-
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
48225
|
-
symbolLinks2.type = type;
|
|
48239
|
+
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
48240
|
+
symbolLinks2.type = type;
|
|
48241
|
+
}
|
|
48242
|
+
return result;
|
|
48226
48243
|
}
|
|
48227
|
-
return
|
|
48244
|
+
return fn();
|
|
48228
48245
|
}
|
|
48229
48246
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
48230
48247
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
@@ -58044,7 +58061,7 @@ function createTypeChecker(host) {
|
|
|
58044
58061
|
resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments);
|
|
58045
58062
|
}
|
|
58046
58063
|
function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) {
|
|
58047
|
-
const sig = new
|
|
58064
|
+
const sig = new Signature14(checker, flags);
|
|
58048
58065
|
sig.declaration = declaration;
|
|
58049
58066
|
sig.typeParameters = typeParameters;
|
|
58050
58067
|
sig.parameters = parameters;
|
|
@@ -66750,7 +66767,7 @@ function createTypeChecker(host) {
|
|
|
66750
66767
|
sourceSignatures[i],
|
|
66751
66768
|
targetSignatures[i],
|
|
66752
66769
|
/*erase*/
|
|
66753
|
-
|
|
66770
|
+
true,
|
|
66754
66771
|
reportErrors2,
|
|
66755
66772
|
intersectionState,
|
|
66756
66773
|
incompatibleReporter(sourceSignatures[i], targetSignatures[i])
|
|
@@ -67074,7 +67091,10 @@ function createTypeChecker(host) {
|
|
|
67074
67091
|
return false;
|
|
67075
67092
|
}
|
|
67076
67093
|
function getVariances(type) {
|
|
67077
|
-
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
|
|
67094
|
+
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ || isArraySubtype(type) ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
|
|
67095
|
+
}
|
|
67096
|
+
function isArraySubtype(type) {
|
|
67097
|
+
return length(type.typeParameters) === 1 && length(getBaseTypes(type)) === 1 && isTypeReferenceWithGenericArguments(getBaseTypes(type)[0]) && getVariances(getBaseTypes(type)[0].target) === arrayVariances && length(getTypeArguments(getBaseTypes(type)[0])) === 1 && getTypeArguments(getBaseTypes(type)[0])[0] === type.typeParameters[0];
|
|
67078
67098
|
}
|
|
67079
67099
|
function getAliasVariances(symbol) {
|
|
67080
67100
|
return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters);
|
|
@@ -74938,7 +74958,7 @@ function createTypeChecker(host) {
|
|
|
74938
74958
|
}
|
|
74939
74959
|
for (let i = 0; i < argCount; i++) {
|
|
74940
74960
|
const arg = args[i];
|
|
74941
|
-
if (arg.kind !== 232 /* OmittedExpression */) {
|
|
74961
|
+
if (arg.kind !== 232 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) {
|
|
74942
74962
|
const paramType = getTypeAtPosition(signature, i);
|
|
74943
74963
|
if (couldContainTypeVariables(paramType)) {
|
|
74944
74964
|
const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode);
|
|
@@ -75541,6 +75561,7 @@ function createTypeChecker(host) {
|
|
|
75541
75561
|
const args = getEffectiveCallArguments(node);
|
|
75542
75562
|
const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
|
|
75543
75563
|
let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */;
|
|
75564
|
+
argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */;
|
|
75544
75565
|
let candidatesForArgumentError;
|
|
75545
75566
|
let candidateForArgumentArityError;
|
|
75546
75567
|
let candidateForTypeArgumentError;
|
|
@@ -161324,7 +161345,7 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck
|
|
|
161324
161345
|
case 291 /* JsxAttribute */:
|
|
161325
161346
|
if (!isRequireCallArgument(node) && !isImportCall(parent2)) {
|
|
161326
161347
|
const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile);
|
|
161327
|
-
return argumentInfo &&
|
|
161348
|
+
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */);
|
|
161328
161349
|
}
|
|
161329
161350
|
case 272 /* ImportDeclaration */:
|
|
161330
161351
|
case 278 /* ExportDeclaration */:
|
|
@@ -161393,12 +161414,11 @@ function walkUpParentheses(node) {
|
|
|
161393
161414
|
function getAlreadyUsedTypesInStringLiteralUnion(union, current) {
|
|
161394
161415
|
return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0);
|
|
161395
161416
|
}
|
|
161396
|
-
function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker
|
|
161417
|
+
function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) {
|
|
161397
161418
|
let isNewIdentifier = false;
|
|
161398
161419
|
const uniques = /* @__PURE__ */ new Map();
|
|
161399
|
-
const candidates = [];
|
|
161400
161420
|
const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg;
|
|
161401
|
-
checker.
|
|
161421
|
+
const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument);
|
|
161402
161422
|
const types = flatMap(candidates, (candidate) => {
|
|
161403
161423
|
if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
161404
161424
|
return;
|
|
@@ -173840,6 +173860,7 @@ __export(ts_exports2, {
|
|
|
173840
173860
|
isCallExpression: () => isCallExpression,
|
|
173841
173861
|
isCallExpressionTarget: () => isCallExpressionTarget,
|
|
173842
173862
|
isCallLikeExpression: () => isCallLikeExpression,
|
|
173863
|
+
isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression,
|
|
173843
173864
|
isCallOrNewExpression: () => isCallOrNewExpression,
|
|
173844
173865
|
isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget,
|
|
173845
173866
|
isCallSignatureDeclaration: () => isCallSignatureDeclaration,
|
|
@@ -178482,8 +178503,8 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
178482
178503
|
const isSymlink = realPath2 && realPath2 !== hostProject.toPath(packageJson.packageDirectory);
|
|
178483
178504
|
if (isSymlink) {
|
|
178484
178505
|
symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
|
|
178485
|
-
real,
|
|
178486
|
-
realPath: realPath2
|
|
178506
|
+
real: ensureTrailingDirectorySeparator(real),
|
|
178507
|
+
realPath: ensureTrailingDirectorySeparator(realPath2)
|
|
178487
178508
|
});
|
|
178488
178509
|
}
|
|
178489
178510
|
return mapDefined(entrypoints, (entrypoint) => {
|
|
@@ -188518,6 +188539,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188518
188539
|
isCallExpression,
|
|
188519
188540
|
isCallExpressionTarget,
|
|
188520
188541
|
isCallLikeExpression,
|
|
188542
|
+
isCallLikeOrFunctionLikeExpression,
|
|
188521
188543
|
isCallOrNewExpression,
|
|
188522
188544
|
isCallOrNewExpressionTarget,
|
|
188523
188545
|
isCallSignatureDeclaration,
|
package/lib/typescript.d.ts
CHANGED
|
@@ -4889,7 +4889,7 @@ declare namespace ts {
|
|
|
4889
4889
|
type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | EnumMember;
|
|
4890
4890
|
type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration;
|
|
4891
4891
|
type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration;
|
|
4892
|
-
interface NodeArray<
|
|
4892
|
+
interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
|
|
4893
4893
|
readonly hasTrailingComma: boolean;
|
|
4894
4894
|
}
|
|
4895
4895
|
interface Token<TKind extends SyntaxKind> extends Node {
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230926`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -12396,6 +12396,9 @@ ${lanes.join("\n")}
|
|
|
12396
12396
|
const kind = node.kind;
|
|
12397
12397
|
return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */;
|
|
12398
12398
|
}
|
|
12399
|
+
function isCallLikeOrFunctionLikeExpression(node) {
|
|
12400
|
+
return isCallLikeExpression(node) || isFunctionLike(node);
|
|
12401
|
+
}
|
|
12399
12402
|
function isCallLikeExpression(node) {
|
|
12400
12403
|
switch (node.kind) {
|
|
12401
12404
|
case 286 /* JsxOpeningElement */:
|
|
@@ -17913,7 +17916,7 @@ ${lanes.join("\n")}
|
|
|
17913
17916
|
if (!containsIgnoredPath(symlinkPath)) {
|
|
17914
17917
|
symlinkPath = ensureTrailingDirectorySeparator(symlinkPath);
|
|
17915
17918
|
if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) {
|
|
17916
|
-
(symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(
|
|
17919
|
+
(symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(real.realPath, symlink);
|
|
17917
17920
|
}
|
|
17918
17921
|
(symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real);
|
|
17919
17922
|
}
|
|
@@ -17936,7 +17939,10 @@ ${lanes.join("\n")}
|
|
|
17936
17939
|
if (commonResolved && commonOriginal) {
|
|
17937
17940
|
cache.setSymlinkedDirectory(
|
|
17938
17941
|
commonOriginal,
|
|
17939
|
-
{
|
|
17942
|
+
{
|
|
17943
|
+
real: ensureTrailingDirectorySeparator(commonResolved),
|
|
17944
|
+
realPath: ensureTrailingDirectorySeparator(toPath(commonResolved, cwd, getCanonicalFileName))
|
|
17945
|
+
}
|
|
17940
17946
|
);
|
|
17941
17947
|
}
|
|
17942
17948
|
}
|
|
@@ -45524,7 +45530,7 @@ ${lanes.join("\n")}
|
|
|
45524
45530
|
var externalHelpersModule;
|
|
45525
45531
|
var Symbol47 = objectAllocator.getSymbolConstructor();
|
|
45526
45532
|
var Type27 = objectAllocator.getTypeConstructor();
|
|
45527
|
-
var
|
|
45533
|
+
var Signature14 = objectAllocator.getSignatureConstructor();
|
|
45528
45534
|
var typeCount = 0;
|
|
45529
45535
|
var symbolCount = 0;
|
|
45530
45536
|
var totalInstantiationCount = 0;
|
|
@@ -45750,24 +45756,7 @@ ${lanes.join("\n")}
|
|
|
45750
45756
|
getTypeOfPropertyOfContextualType,
|
|
45751
45757
|
getFullyQualifiedName,
|
|
45752
45758
|
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),
|
|
45753
|
-
|
|
45754
|
-
if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) {
|
|
45755
|
-
return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
45756
|
-
call,
|
|
45757
|
-
candidatesOutArray,
|
|
45758
|
-
/*argumentCount*/
|
|
45759
|
-
void 0,
|
|
45760
|
-
checkMode & ~32 /* IsForStringLiteralArgumentCompletions */
|
|
45761
|
-
));
|
|
45762
|
-
}
|
|
45763
|
-
return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
45764
|
-
call,
|
|
45765
|
-
candidatesOutArray,
|
|
45766
|
-
/*argumentCount*/
|
|
45767
|
-
void 0,
|
|
45768
|
-
checkMode & ~32 /* IsForStringLiteralArgumentCompletions */
|
|
45769
|
-
));
|
|
45770
|
-
},
|
|
45759
|
+
getCandidateSignaturesForStringLiteralCompletions,
|
|
45771
45760
|
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),
|
|
45772
45761
|
getExpandedParameters,
|
|
45773
45762
|
hasEffectiveRestParameter,
|
|
@@ -45966,32 +45955,59 @@ ${lanes.join("\n")}
|
|
|
45966
45955
|
isTypeParameterPossiblyReferenced,
|
|
45967
45956
|
typeHasCallOrConstructSignatures
|
|
45968
45957
|
};
|
|
45958
|
+
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
45959
|
+
const candidatesSet = /* @__PURE__ */ new Set();
|
|
45960
|
+
const candidates = [];
|
|
45961
|
+
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
45962
|
+
call,
|
|
45963
|
+
candidates,
|
|
45964
|
+
/*argumentCount*/
|
|
45965
|
+
void 0,
|
|
45966
|
+
32 /* IsForStringLiteralArgumentCompletions */
|
|
45967
|
+
));
|
|
45968
|
+
for (const candidate of candidates) {
|
|
45969
|
+
candidatesSet.add(candidate);
|
|
45970
|
+
}
|
|
45971
|
+
candidates.length = 0;
|
|
45972
|
+
runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(
|
|
45973
|
+
call,
|
|
45974
|
+
candidates,
|
|
45975
|
+
/*argumentCount*/
|
|
45976
|
+
void 0,
|
|
45977
|
+
0 /* Normal */
|
|
45978
|
+
));
|
|
45979
|
+
for (const candidate of candidates) {
|
|
45980
|
+
candidatesSet.add(candidate);
|
|
45981
|
+
}
|
|
45982
|
+
return arrayFrom(candidatesSet);
|
|
45983
|
+
}
|
|
45969
45984
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
45970
|
-
|
|
45971
|
-
|
|
45972
|
-
|
|
45973
|
-
|
|
45985
|
+
node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
|
|
45986
|
+
if (node) {
|
|
45987
|
+
const cachedResolvedSignatures = [];
|
|
45988
|
+
const cachedTypes2 = [];
|
|
45989
|
+
while (node) {
|
|
45974
45990
|
const nodeLinks2 = getNodeLinks(node);
|
|
45975
|
-
|
|
45976
|
-
cachedResolvedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
45991
|
+
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
45977
45992
|
nodeLinks2.resolvedSignature = void 0;
|
|
45993
|
+
if (isFunctionLike(node)) {
|
|
45994
|
+
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
45995
|
+
const type = symbolLinks2.type;
|
|
45996
|
+
cachedTypes2.push([symbolLinks2, type]);
|
|
45997
|
+
symbolLinks2.type = void 0;
|
|
45998
|
+
}
|
|
45999
|
+
node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
|
|
45978
46000
|
}
|
|
45979
|
-
|
|
45980
|
-
|
|
45981
|
-
|
|
45982
|
-
cachedTypes2.push([symbolLinks2, type]);
|
|
45983
|
-
symbolLinks2.type = void 0;
|
|
46001
|
+
const result = fn();
|
|
46002
|
+
for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
|
|
46003
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
45984
46004
|
}
|
|
45985
|
-
|
|
45986
|
-
|
|
45987
|
-
|
|
45988
|
-
|
|
45989
|
-
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
45990
|
-
}
|
|
45991
|
-
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
45992
|
-
symbolLinks2.type = type;
|
|
46005
|
+
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
46006
|
+
symbolLinks2.type = type;
|
|
46007
|
+
}
|
|
46008
|
+
return result;
|
|
45993
46009
|
}
|
|
45994
|
-
return
|
|
46010
|
+
return fn();
|
|
45995
46011
|
}
|
|
45996
46012
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
45997
46013
|
const containingCall = findAncestor(node, isCallLikeExpression);
|
|
@@ -55811,7 +55827,7 @@ ${lanes.join("\n")}
|
|
|
55811
55827
|
resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments);
|
|
55812
55828
|
}
|
|
55813
55829
|
function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) {
|
|
55814
|
-
const sig = new
|
|
55830
|
+
const sig = new Signature14(checker, flags);
|
|
55815
55831
|
sig.declaration = declaration;
|
|
55816
55832
|
sig.typeParameters = typeParameters;
|
|
55817
55833
|
sig.parameters = parameters;
|
|
@@ -64517,7 +64533,7 @@ ${lanes.join("\n")}
|
|
|
64517
64533
|
sourceSignatures[i],
|
|
64518
64534
|
targetSignatures[i],
|
|
64519
64535
|
/*erase*/
|
|
64520
|
-
|
|
64536
|
+
true,
|
|
64521
64537
|
reportErrors2,
|
|
64522
64538
|
intersectionState,
|
|
64523
64539
|
incompatibleReporter(sourceSignatures[i], targetSignatures[i])
|
|
@@ -64841,7 +64857,10 @@ ${lanes.join("\n")}
|
|
|
64841
64857
|
return false;
|
|
64842
64858
|
}
|
|
64843
64859
|
function getVariances(type) {
|
|
64844
|
-
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
|
|
64860
|
+
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ || isArraySubtype(type) ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
|
|
64861
|
+
}
|
|
64862
|
+
function isArraySubtype(type) {
|
|
64863
|
+
return length(type.typeParameters) === 1 && length(getBaseTypes(type)) === 1 && isTypeReferenceWithGenericArguments(getBaseTypes(type)[0]) && getVariances(getBaseTypes(type)[0].target) === arrayVariances && length(getTypeArguments(getBaseTypes(type)[0])) === 1 && getTypeArguments(getBaseTypes(type)[0])[0] === type.typeParameters[0];
|
|
64845
64864
|
}
|
|
64846
64865
|
function getAliasVariances(symbol) {
|
|
64847
64866
|
return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters);
|
|
@@ -72705,7 +72724,7 @@ ${lanes.join("\n")}
|
|
|
72705
72724
|
}
|
|
72706
72725
|
for (let i = 0; i < argCount; i++) {
|
|
72707
72726
|
const arg = args[i];
|
|
72708
|
-
if (arg.kind !== 232 /* OmittedExpression */) {
|
|
72727
|
+
if (arg.kind !== 232 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) {
|
|
72709
72728
|
const paramType = getTypeAtPosition(signature, i);
|
|
72710
72729
|
if (couldContainTypeVariables(paramType)) {
|
|
72711
72730
|
const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode);
|
|
@@ -73308,6 +73327,7 @@ ${lanes.join("\n")}
|
|
|
73308
73327
|
const args = getEffectiveCallArguments(node);
|
|
73309
73328
|
const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
|
|
73310
73329
|
let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */;
|
|
73330
|
+
argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */;
|
|
73311
73331
|
let candidatesForArgumentError;
|
|
73312
73332
|
let candidateForArgumentArityError;
|
|
73313
73333
|
let candidateForTypeArgumentError;
|
|
@@ -160600,7 +160620,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160600
160620
|
case 291 /* JsxAttribute */:
|
|
160601
160621
|
if (!isRequireCallArgument(node) && !isImportCall(parent2)) {
|
|
160602
160622
|
const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile);
|
|
160603
|
-
return argumentInfo &&
|
|
160623
|
+
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */);
|
|
160604
160624
|
}
|
|
160605
160625
|
case 272 /* ImportDeclaration */:
|
|
160606
160626
|
case 278 /* ExportDeclaration */:
|
|
@@ -160669,12 +160689,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160669
160689
|
function getAlreadyUsedTypesInStringLiteralUnion(union, current) {
|
|
160670
160690
|
return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0);
|
|
160671
160691
|
}
|
|
160672
|
-
function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker
|
|
160692
|
+
function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) {
|
|
160673
160693
|
let isNewIdentifier = false;
|
|
160674
160694
|
const uniques = /* @__PURE__ */ new Map();
|
|
160675
|
-
const candidates = [];
|
|
160676
160695
|
const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg;
|
|
160677
|
-
checker.
|
|
160696
|
+
const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument);
|
|
160678
160697
|
const types = flatMap(candidates, (candidate) => {
|
|
160679
160698
|
if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
160680
160699
|
return;
|
|
@@ -175799,8 +175818,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
175799
175818
|
const isSymlink = realPath2 && realPath2 !== hostProject.toPath(packageJson.packageDirectory);
|
|
175800
175819
|
if (isSymlink) {
|
|
175801
175820
|
symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
|
|
175802
|
-
real,
|
|
175803
|
-
realPath: realPath2
|
|
175821
|
+
real: ensureTrailingDirectorySeparator(real),
|
|
175822
|
+
realPath: ensureTrailingDirectorySeparator(realPath2)
|
|
175804
175823
|
});
|
|
175805
175824
|
}
|
|
175806
175825
|
return mapDefined(entrypoints, (entrypoint) => {
|
|
@@ -185142,6 +185161,7 @@ ${e.message}`;
|
|
|
185142
185161
|
isCallExpression: () => isCallExpression,
|
|
185143
185162
|
isCallExpressionTarget: () => isCallExpressionTarget,
|
|
185144
185163
|
isCallLikeExpression: () => isCallLikeExpression,
|
|
185164
|
+
isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression,
|
|
185145
185165
|
isCallOrNewExpression: () => isCallOrNewExpression,
|
|
185146
185166
|
isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget,
|
|
185147
185167
|
isCallSignatureDeclaration: () => isCallSignatureDeclaration,
|
|
@@ -187548,6 +187568,7 @@ ${e.message}`;
|
|
|
187548
187568
|
isCallExpression: () => isCallExpression,
|
|
187549
187569
|
isCallExpressionTarget: () => isCallExpressionTarget,
|
|
187550
187570
|
isCallLikeExpression: () => isCallLikeExpression,
|
|
187571
|
+
isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression,
|
|
187551
187572
|
isCallOrNewExpression: () => isCallOrNewExpression,
|
|
187552
187573
|
isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget,
|
|
187553
187574
|
isCallSignatureDeclaration: () => isCallSignatureDeclaration,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230926`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
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.3.0-pr-
|
|
5
|
+
"version": "5.3.0-pr-55880-5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "a43926edc4795ed1c258cbc67f257a144fcc2e7f"
|
|
118
118
|
}
|