@typescript-deploys/pr-build 5.5.0-pr-57480-2 → 5.5.0-pr-57465-61
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 +91 -2
- package/lib/tsserver.js +97 -8
- package/lib/typescript.js +97 -8
- 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.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240226`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -56016,7 +56016,15 @@ function createTypeChecker(host) {
|
|
|
56016
56016
|
jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
|
|
56017
56017
|
}
|
|
56018
56018
|
}
|
|
56019
|
-
|
|
56019
|
+
if (type || jsdocPredicate) {
|
|
56020
|
+
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
|
|
56021
|
+
} else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType === booleanType)) {
|
|
56022
|
+
const { declaration } = signature;
|
|
56023
|
+
signature.resolvedTypePredicate = noTypePredicate;
|
|
56024
|
+
signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
|
|
56025
|
+
} else {
|
|
56026
|
+
signature.resolvedTypePredicate = noTypePredicate;
|
|
56027
|
+
}
|
|
56020
56028
|
}
|
|
56021
56029
|
Debug.assert(!!signature.resolvedTypePredicate);
|
|
56022
56030
|
}
|
|
@@ -74425,6 +74433,87 @@ function createTypeChecker(host) {
|
|
|
74425
74433
|
return false;
|
|
74426
74434
|
}
|
|
74427
74435
|
}
|
|
74436
|
+
function getTypePredicateFromBody(func) {
|
|
74437
|
+
switch (func.kind) {
|
|
74438
|
+
case 176 /* Constructor */:
|
|
74439
|
+
case 177 /* GetAccessor */:
|
|
74440
|
+
case 178 /* SetAccessor */:
|
|
74441
|
+
return void 0;
|
|
74442
|
+
}
|
|
74443
|
+
const functionFlags = getFunctionFlags(func);
|
|
74444
|
+
if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
|
|
74445
|
+
return void 0;
|
|
74446
|
+
let singleReturn;
|
|
74447
|
+
let singleReturnStatement;
|
|
74448
|
+
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
74449
|
+
singleReturn = func.body;
|
|
74450
|
+
} else {
|
|
74451
|
+
if (functionHasImplicitReturn(func))
|
|
74452
|
+
return void 0;
|
|
74453
|
+
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
74454
|
+
if (singleReturn || !returnStatement.expression)
|
|
74455
|
+
return true;
|
|
74456
|
+
singleReturnStatement = returnStatement;
|
|
74457
|
+
singleReturn = returnStatement.expression;
|
|
74458
|
+
});
|
|
74459
|
+
if (bailedEarly || !singleReturn)
|
|
74460
|
+
return void 0;
|
|
74461
|
+
}
|
|
74462
|
+
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
74463
|
+
if (predicate) {
|
|
74464
|
+
const [i, type] = predicate;
|
|
74465
|
+
const param = func.parameters[i];
|
|
74466
|
+
if (isIdentifier(param.name)) {
|
|
74467
|
+
return createTypePredicate(1 /* Identifier */, param.name.escapedText, i, type);
|
|
74468
|
+
}
|
|
74469
|
+
}
|
|
74470
|
+
return void 0;
|
|
74471
|
+
function checkIfExpressionRefinesAnyParameter(expr) {
|
|
74472
|
+
expr = skipParentheses(
|
|
74473
|
+
expr,
|
|
74474
|
+
/*excludeJSDocTypeAssertions*/
|
|
74475
|
+
true
|
|
74476
|
+
);
|
|
74477
|
+
const type = checkExpressionCached(expr);
|
|
74478
|
+
if (type !== booleanType)
|
|
74479
|
+
return void 0;
|
|
74480
|
+
return forEach(func.parameters, (param, i) => {
|
|
74481
|
+
const initType = getSymbolLinks(param.symbol).type;
|
|
74482
|
+
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
74483
|
+
return;
|
|
74484
|
+
}
|
|
74485
|
+
const trueType2 = checkIfExpressionRefinesParameter(expr, param, initType);
|
|
74486
|
+
if (trueType2) {
|
|
74487
|
+
return [i, trueType2];
|
|
74488
|
+
}
|
|
74489
|
+
});
|
|
74490
|
+
}
|
|
74491
|
+
function checkIfExpressionRefinesParameter(expr, param, initType) {
|
|
74492
|
+
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
74493
|
+
const trueCondition = {
|
|
74494
|
+
flags: 32 /* TrueCondition */,
|
|
74495
|
+
node: expr,
|
|
74496
|
+
antecedent
|
|
74497
|
+
};
|
|
74498
|
+
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
74499
|
+
if (trueType2 === initType)
|
|
74500
|
+
return void 0;
|
|
74501
|
+
const falseCondition = {
|
|
74502
|
+
...trueCondition,
|
|
74503
|
+
flags: 64 /* FalseCondition */
|
|
74504
|
+
};
|
|
74505
|
+
const falseSubtype = getFlowTypeOfReference(param.name, trueType2, trueType2, func, falseCondition);
|
|
74506
|
+
if (!isTypeIdenticalTo(falseSubtype, neverType))
|
|
74507
|
+
return void 0;
|
|
74508
|
+
if (singleReturnStatement == null ? void 0 : singleReturnStatement.flowNode) {
|
|
74509
|
+
const typeAtReturn = getFlowTypeOfReference(param.name, initType, initType, func, singleReturnStatement == null ? void 0 : singleReturnStatement.flowNode);
|
|
74510
|
+
if (typeAtReturn !== initType) {
|
|
74511
|
+
return void 0;
|
|
74512
|
+
}
|
|
74513
|
+
}
|
|
74514
|
+
return trueType2;
|
|
74515
|
+
}
|
|
74516
|
+
}
|
|
74428
74517
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
|
74429
74518
|
addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
|
|
74430
74519
|
return;
|
package/lib/tsserver.js
CHANGED
|
@@ -2341,7 +2341,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2341
2341
|
|
|
2342
2342
|
// src/compiler/corePublic.ts
|
|
2343
2343
|
var versionMajorMinor = "5.5";
|
|
2344
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2344
|
+
var version = `${versionMajorMinor}.0-insiders.20240226`;
|
|
2345
2345
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2346
2346
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2347
2347
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -60761,7 +60761,15 @@ function createTypeChecker(host) {
|
|
|
60761
60761
|
jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
|
|
60762
60762
|
}
|
|
60763
60763
|
}
|
|
60764
|
-
|
|
60764
|
+
if (type || jsdocPredicate) {
|
|
60765
|
+
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
|
|
60766
|
+
} else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType === booleanType)) {
|
|
60767
|
+
const { declaration } = signature;
|
|
60768
|
+
signature.resolvedTypePredicate = noTypePredicate;
|
|
60769
|
+
signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
|
|
60770
|
+
} else {
|
|
60771
|
+
signature.resolvedTypePredicate = noTypePredicate;
|
|
60772
|
+
}
|
|
60765
60773
|
}
|
|
60766
60774
|
Debug.assert(!!signature.resolvedTypePredicate);
|
|
60767
60775
|
}
|
|
@@ -79170,6 +79178,87 @@ function createTypeChecker(host) {
|
|
|
79170
79178
|
return false;
|
|
79171
79179
|
}
|
|
79172
79180
|
}
|
|
79181
|
+
function getTypePredicateFromBody(func) {
|
|
79182
|
+
switch (func.kind) {
|
|
79183
|
+
case 176 /* Constructor */:
|
|
79184
|
+
case 177 /* GetAccessor */:
|
|
79185
|
+
case 178 /* SetAccessor */:
|
|
79186
|
+
return void 0;
|
|
79187
|
+
}
|
|
79188
|
+
const functionFlags = getFunctionFlags(func);
|
|
79189
|
+
if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
|
|
79190
|
+
return void 0;
|
|
79191
|
+
let singleReturn;
|
|
79192
|
+
let singleReturnStatement;
|
|
79193
|
+
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
79194
|
+
singleReturn = func.body;
|
|
79195
|
+
} else {
|
|
79196
|
+
if (functionHasImplicitReturn(func))
|
|
79197
|
+
return void 0;
|
|
79198
|
+
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
79199
|
+
if (singleReturn || !returnStatement.expression)
|
|
79200
|
+
return true;
|
|
79201
|
+
singleReturnStatement = returnStatement;
|
|
79202
|
+
singleReturn = returnStatement.expression;
|
|
79203
|
+
});
|
|
79204
|
+
if (bailedEarly || !singleReturn)
|
|
79205
|
+
return void 0;
|
|
79206
|
+
}
|
|
79207
|
+
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
79208
|
+
if (predicate) {
|
|
79209
|
+
const [i, type] = predicate;
|
|
79210
|
+
const param = func.parameters[i];
|
|
79211
|
+
if (isIdentifier(param.name)) {
|
|
79212
|
+
return createTypePredicate(1 /* Identifier */, param.name.escapedText, i, type);
|
|
79213
|
+
}
|
|
79214
|
+
}
|
|
79215
|
+
return void 0;
|
|
79216
|
+
function checkIfExpressionRefinesAnyParameter(expr) {
|
|
79217
|
+
expr = skipParentheses(
|
|
79218
|
+
expr,
|
|
79219
|
+
/*excludeJSDocTypeAssertions*/
|
|
79220
|
+
true
|
|
79221
|
+
);
|
|
79222
|
+
const type = checkExpressionCached(expr);
|
|
79223
|
+
if (type !== booleanType)
|
|
79224
|
+
return void 0;
|
|
79225
|
+
return forEach(func.parameters, (param, i) => {
|
|
79226
|
+
const initType = getSymbolLinks(param.symbol).type;
|
|
79227
|
+
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
79228
|
+
return;
|
|
79229
|
+
}
|
|
79230
|
+
const trueType2 = checkIfExpressionRefinesParameter(expr, param, initType);
|
|
79231
|
+
if (trueType2) {
|
|
79232
|
+
return [i, trueType2];
|
|
79233
|
+
}
|
|
79234
|
+
});
|
|
79235
|
+
}
|
|
79236
|
+
function checkIfExpressionRefinesParameter(expr, param, initType) {
|
|
79237
|
+
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
79238
|
+
const trueCondition = {
|
|
79239
|
+
flags: 32 /* TrueCondition */,
|
|
79240
|
+
node: expr,
|
|
79241
|
+
antecedent
|
|
79242
|
+
};
|
|
79243
|
+
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
79244
|
+
if (trueType2 === initType)
|
|
79245
|
+
return void 0;
|
|
79246
|
+
const falseCondition = {
|
|
79247
|
+
...trueCondition,
|
|
79248
|
+
flags: 64 /* FalseCondition */
|
|
79249
|
+
};
|
|
79250
|
+
const falseSubtype = getFlowTypeOfReference(param.name, trueType2, trueType2, func, falseCondition);
|
|
79251
|
+
if (!isTypeIdenticalTo(falseSubtype, neverType))
|
|
79252
|
+
return void 0;
|
|
79253
|
+
if (singleReturnStatement == null ? void 0 : singleReturnStatement.flowNode) {
|
|
79254
|
+
const typeAtReturn = getFlowTypeOfReference(param.name, initType, initType, func, singleReturnStatement == null ? void 0 : singleReturnStatement.flowNode);
|
|
79255
|
+
if (typeAtReturn !== initType) {
|
|
79256
|
+
return void 0;
|
|
79257
|
+
}
|
|
79258
|
+
}
|
|
79259
|
+
return trueType2;
|
|
79260
|
+
}
|
|
79261
|
+
}
|
|
79173
79262
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
|
79174
79263
|
addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
|
|
79175
79264
|
return;
|
|
@@ -159781,7 +159870,7 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken,
|
|
|
159781
159870
|
let importAdder;
|
|
159782
159871
|
const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext);
|
|
159783
159872
|
if (memberCompletionEntry) {
|
|
159784
|
-
({ insertText, filterText, isSnippet, importAdder
|
|
159873
|
+
({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry);
|
|
159785
159874
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
159786
159875
|
hasAction = true;
|
|
159787
159876
|
source = "ClassMemberSnippet/" /* ClassMemberSnippet */;
|
|
@@ -159969,7 +160058,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
|
|
|
159969
160058
|
);
|
|
159970
160059
|
}
|
|
159971
160060
|
}
|
|
159972
|
-
return { insertText, filterText, isSnippet, importAdder,
|
|
160061
|
+
return { insertText, filterText, isSnippet, importAdder, eraseRange };
|
|
159973
160062
|
}
|
|
159974
160063
|
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
159975
160064
|
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
@@ -160621,7 +160710,7 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo
|
|
|
160621
160710
|
}
|
|
160622
160711
|
}
|
|
160623
160712
|
if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) {
|
|
160624
|
-
const { importAdder,
|
|
160713
|
+
const { importAdder, eraseRange } = getEntryForMemberCompletion(
|
|
160625
160714
|
host,
|
|
160626
160715
|
program,
|
|
160627
160716
|
compilerOptions,
|
|
@@ -160633,15 +160722,15 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo
|
|
|
160633
160722
|
contextToken,
|
|
160634
160723
|
formatContext
|
|
160635
160724
|
);
|
|
160636
|
-
if (importAdder ||
|
|
160725
|
+
if (importAdder || eraseRange) {
|
|
160637
160726
|
const changes = ts_textChanges_exports.ChangeTracker.with(
|
|
160638
160727
|
{ host, formatContext, preferences },
|
|
160639
160728
|
(tracker) => {
|
|
160640
160729
|
if (importAdder) {
|
|
160641
160730
|
importAdder.writeFixes(tracker);
|
|
160642
160731
|
}
|
|
160643
|
-
if (
|
|
160644
|
-
tracker.deleteRange(sourceFile,
|
|
160732
|
+
if (eraseRange) {
|
|
160733
|
+
tracker.deleteRange(sourceFile, eraseRange);
|
|
160645
160734
|
}
|
|
160646
160735
|
}
|
|
160647
160736
|
);
|
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.5";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20240226`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -58515,7 +58515,15 @@ ${lanes.join("\n")}
|
|
|
58515
58515
|
jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
|
|
58516
58516
|
}
|
|
58517
58517
|
}
|
|
58518
|
-
|
|
58518
|
+
if (type || jsdocPredicate) {
|
|
58519
|
+
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
|
|
58520
|
+
} else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType === booleanType)) {
|
|
58521
|
+
const { declaration } = signature;
|
|
58522
|
+
signature.resolvedTypePredicate = noTypePredicate;
|
|
58523
|
+
signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
|
|
58524
|
+
} else {
|
|
58525
|
+
signature.resolvedTypePredicate = noTypePredicate;
|
|
58526
|
+
}
|
|
58519
58527
|
}
|
|
58520
58528
|
Debug.assert(!!signature.resolvedTypePredicate);
|
|
58521
58529
|
}
|
|
@@ -76924,6 +76932,87 @@ ${lanes.join("\n")}
|
|
|
76924
76932
|
return false;
|
|
76925
76933
|
}
|
|
76926
76934
|
}
|
|
76935
|
+
function getTypePredicateFromBody(func) {
|
|
76936
|
+
switch (func.kind) {
|
|
76937
|
+
case 176 /* Constructor */:
|
|
76938
|
+
case 177 /* GetAccessor */:
|
|
76939
|
+
case 178 /* SetAccessor */:
|
|
76940
|
+
return void 0;
|
|
76941
|
+
}
|
|
76942
|
+
const functionFlags = getFunctionFlags(func);
|
|
76943
|
+
if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
|
|
76944
|
+
return void 0;
|
|
76945
|
+
let singleReturn;
|
|
76946
|
+
let singleReturnStatement;
|
|
76947
|
+
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
76948
|
+
singleReturn = func.body;
|
|
76949
|
+
} else {
|
|
76950
|
+
if (functionHasImplicitReturn(func))
|
|
76951
|
+
return void 0;
|
|
76952
|
+
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
76953
|
+
if (singleReturn || !returnStatement.expression)
|
|
76954
|
+
return true;
|
|
76955
|
+
singleReturnStatement = returnStatement;
|
|
76956
|
+
singleReturn = returnStatement.expression;
|
|
76957
|
+
});
|
|
76958
|
+
if (bailedEarly || !singleReturn)
|
|
76959
|
+
return void 0;
|
|
76960
|
+
}
|
|
76961
|
+
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
76962
|
+
if (predicate) {
|
|
76963
|
+
const [i, type] = predicate;
|
|
76964
|
+
const param = func.parameters[i];
|
|
76965
|
+
if (isIdentifier(param.name)) {
|
|
76966
|
+
return createTypePredicate(1 /* Identifier */, param.name.escapedText, i, type);
|
|
76967
|
+
}
|
|
76968
|
+
}
|
|
76969
|
+
return void 0;
|
|
76970
|
+
function checkIfExpressionRefinesAnyParameter(expr) {
|
|
76971
|
+
expr = skipParentheses(
|
|
76972
|
+
expr,
|
|
76973
|
+
/*excludeJSDocTypeAssertions*/
|
|
76974
|
+
true
|
|
76975
|
+
);
|
|
76976
|
+
const type = checkExpressionCached(expr);
|
|
76977
|
+
if (type !== booleanType)
|
|
76978
|
+
return void 0;
|
|
76979
|
+
return forEach(func.parameters, (param, i) => {
|
|
76980
|
+
const initType = getSymbolLinks(param.symbol).type;
|
|
76981
|
+
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
76982
|
+
return;
|
|
76983
|
+
}
|
|
76984
|
+
const trueType2 = checkIfExpressionRefinesParameter(expr, param, initType);
|
|
76985
|
+
if (trueType2) {
|
|
76986
|
+
return [i, trueType2];
|
|
76987
|
+
}
|
|
76988
|
+
});
|
|
76989
|
+
}
|
|
76990
|
+
function checkIfExpressionRefinesParameter(expr, param, initType) {
|
|
76991
|
+
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
76992
|
+
const trueCondition = {
|
|
76993
|
+
flags: 32 /* TrueCondition */,
|
|
76994
|
+
node: expr,
|
|
76995
|
+
antecedent
|
|
76996
|
+
};
|
|
76997
|
+
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
76998
|
+
if (trueType2 === initType)
|
|
76999
|
+
return void 0;
|
|
77000
|
+
const falseCondition = {
|
|
77001
|
+
...trueCondition,
|
|
77002
|
+
flags: 64 /* FalseCondition */
|
|
77003
|
+
};
|
|
77004
|
+
const falseSubtype = getFlowTypeOfReference(param.name, trueType2, trueType2, func, falseCondition);
|
|
77005
|
+
if (!isTypeIdenticalTo(falseSubtype, neverType))
|
|
77006
|
+
return void 0;
|
|
77007
|
+
if (singleReturnStatement == null ? void 0 : singleReturnStatement.flowNode) {
|
|
77008
|
+
const typeAtReturn = getFlowTypeOfReference(param.name, initType, initType, func, singleReturnStatement == null ? void 0 : singleReturnStatement.flowNode);
|
|
77009
|
+
if (typeAtReturn !== initType) {
|
|
77010
|
+
return void 0;
|
|
77011
|
+
}
|
|
77012
|
+
}
|
|
77013
|
+
return trueType2;
|
|
77014
|
+
}
|
|
77015
|
+
}
|
|
76927
77016
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
|
76928
77017
|
addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
|
|
76929
77018
|
return;
|
|
@@ -159003,7 +159092,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159003
159092
|
let importAdder;
|
|
159004
159093
|
const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext);
|
|
159005
159094
|
if (memberCompletionEntry) {
|
|
159006
|
-
({ insertText, filterText, isSnippet, importAdder
|
|
159095
|
+
({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry);
|
|
159007
159096
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
159008
159097
|
hasAction = true;
|
|
159009
159098
|
source = "ClassMemberSnippet/" /* ClassMemberSnippet */;
|
|
@@ -159191,7 +159280,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159191
159280
|
);
|
|
159192
159281
|
}
|
|
159193
159282
|
}
|
|
159194
|
-
return { insertText, filterText, isSnippet, importAdder,
|
|
159283
|
+
return { insertText, filterText, isSnippet, importAdder, eraseRange };
|
|
159195
159284
|
}
|
|
159196
159285
|
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
159197
159286
|
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
@@ -159843,7 +159932,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159843
159932
|
}
|
|
159844
159933
|
}
|
|
159845
159934
|
if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) {
|
|
159846
|
-
const { importAdder,
|
|
159935
|
+
const { importAdder, eraseRange } = getEntryForMemberCompletion(
|
|
159847
159936
|
host,
|
|
159848
159937
|
program,
|
|
159849
159938
|
compilerOptions,
|
|
@@ -159855,15 +159944,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159855
159944
|
contextToken,
|
|
159856
159945
|
formatContext
|
|
159857
159946
|
);
|
|
159858
|
-
if (importAdder ||
|
|
159947
|
+
if (importAdder || eraseRange) {
|
|
159859
159948
|
const changes = ts_textChanges_exports.ChangeTracker.with(
|
|
159860
159949
|
{ host, formatContext, preferences },
|
|
159861
159950
|
(tracker) => {
|
|
159862
159951
|
if (importAdder) {
|
|
159863
159952
|
importAdder.writeFixes(tracker);
|
|
159864
159953
|
}
|
|
159865
|
-
if (
|
|
159866
|
-
tracker.deleteRange(sourceFile,
|
|
159954
|
+
if (eraseRange) {
|
|
159955
|
+
tracker.deleteRange(sourceFile, eraseRange);
|
|
159867
159956
|
}
|
|
159868
159957
|
}
|
|
159869
159958
|
);
|
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.5";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20240226`;
|
|
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.5.0-pr-
|
|
5
|
+
"version": "5.5.0-pr-57465-61",
|
|
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": "e0aafed543a12f997ca524e0c08c1797d6be4ca7"
|
|
118
118
|
}
|