@typescript-deploys/pr-build 5.5.0-pr-57465-17 → 5.5.0-pr-57480-2
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 +2 -93
- package/lib/tsserver.js +15 -100
- package/lib/typescript.js +15 -100
- 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.20240223`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -56016,15 +56016,7 @@ function createTypeChecker(host) {
|
|
|
56016
56016
|
jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
|
|
56017
56017
|
}
|
|
56018
56018
|
}
|
|
56019
|
-
|
|
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, signature) || noTypePredicate;
|
|
56025
|
-
} else {
|
|
56026
|
-
signature.resolvedTypePredicate = noTypePredicate;
|
|
56027
|
-
}
|
|
56019
|
+
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
|
|
56028
56020
|
}
|
|
56029
56021
|
Debug.assert(!!signature.resolvedTypePredicate);
|
|
56030
56022
|
}
|
|
@@ -74433,89 +74425,6 @@ function createTypeChecker(host) {
|
|
|
74433
74425
|
return false;
|
|
74434
74426
|
}
|
|
74435
74427
|
}
|
|
74436
|
-
function getTypePredicateFromBody(func, _sig) {
|
|
74437
|
-
const functionFlags = getFunctionFlags(func);
|
|
74438
|
-
if (functionFlags !== 0 /* Normal */)
|
|
74439
|
-
return void 0;
|
|
74440
|
-
let singleReturn;
|
|
74441
|
-
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
74442
|
-
singleReturn = func.body;
|
|
74443
|
-
} else {
|
|
74444
|
-
if (functionHasImplicitReturn(func))
|
|
74445
|
-
return void 0;
|
|
74446
|
-
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
74447
|
-
if (singleReturn || !returnStatement.expression)
|
|
74448
|
-
return true;
|
|
74449
|
-
singleReturn = returnStatement.expression;
|
|
74450
|
-
});
|
|
74451
|
-
if (bailedEarly || !singleReturn)
|
|
74452
|
-
return void 0;
|
|
74453
|
-
}
|
|
74454
|
-
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
74455
|
-
if (predicate) {
|
|
74456
|
-
const [i, type] = predicate;
|
|
74457
|
-
const param = func.parameters[i];
|
|
74458
|
-
if (isIdentifier(param.name)) {
|
|
74459
|
-
return createTypePredicate(1 /* Identifier */, param.name.escapedText, i, type);
|
|
74460
|
-
}
|
|
74461
|
-
}
|
|
74462
|
-
return void 0;
|
|
74463
|
-
function checkIfExpressionRefinesAnyParameter(expr) {
|
|
74464
|
-
expr = skipParentheses(
|
|
74465
|
-
expr,
|
|
74466
|
-
/*excludeJSDocTypeAssertions*/
|
|
74467
|
-
true
|
|
74468
|
-
);
|
|
74469
|
-
const type = checkExpressionCached(expr, 64 /* TypeOnly */);
|
|
74470
|
-
if (type !== booleanType || !func.body)
|
|
74471
|
-
return void 0;
|
|
74472
|
-
return forEach(func.parameters, (param, i) => {
|
|
74473
|
-
const initType = getSymbolLinks(param.symbol).type;
|
|
74474
|
-
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
74475
|
-
return;
|
|
74476
|
-
}
|
|
74477
|
-
const trueType2 = checkIfExpressionRefinesParameter(
|
|
74478
|
-
expr,
|
|
74479
|
-
param,
|
|
74480
|
-
initType,
|
|
74481
|
-
/*forceFullCheck*/
|
|
74482
|
-
false
|
|
74483
|
-
);
|
|
74484
|
-
if (trueType2) {
|
|
74485
|
-
const trueSubtype = checkIfExpressionRefinesParameter(
|
|
74486
|
-
expr,
|
|
74487
|
-
param,
|
|
74488
|
-
trueType2,
|
|
74489
|
-
/*forceFullCheck*/
|
|
74490
|
-
true
|
|
74491
|
-
);
|
|
74492
|
-
if (trueSubtype) {
|
|
74493
|
-
return [i, trueType2];
|
|
74494
|
-
}
|
|
74495
|
-
}
|
|
74496
|
-
});
|
|
74497
|
-
}
|
|
74498
|
-
function checkIfExpressionRefinesParameter(expr, param, initType, forceFullCheck) {
|
|
74499
|
-
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
74500
|
-
const trueCondition = {
|
|
74501
|
-
flags: 32 /* TrueCondition */,
|
|
74502
|
-
node: expr,
|
|
74503
|
-
antecedent
|
|
74504
|
-
};
|
|
74505
|
-
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
74506
|
-
if (trueType2 === initType && !forceFullCheck)
|
|
74507
|
-
return void 0;
|
|
74508
|
-
const falseCondition = {
|
|
74509
|
-
...trueCondition,
|
|
74510
|
-
flags: 64 /* FalseCondition */
|
|
74511
|
-
};
|
|
74512
|
-
const falseType2 = getFlowTypeOfReference(param.name, initType, initType, func, falseCondition);
|
|
74513
|
-
const candidateFalse = filterType(initType, (t) => !isTypeSubtypeOf(t, trueType2));
|
|
74514
|
-
if (isTypeIdenticalTo(candidateFalse, falseType2)) {
|
|
74515
|
-
return trueType2;
|
|
74516
|
-
}
|
|
74517
|
-
}
|
|
74518
|
-
}
|
|
74519
74428
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
|
74520
74429
|
addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
|
|
74521
74430
|
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.20240223`;
|
|
2345
2345
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2346
2346
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2347
2347
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -60761,15 +60761,7 @@ function createTypeChecker(host) {
|
|
|
60761
60761
|
jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
|
|
60762
60762
|
}
|
|
60763
60763
|
}
|
|
60764
|
-
|
|
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, signature) || noTypePredicate;
|
|
60770
|
-
} else {
|
|
60771
|
-
signature.resolvedTypePredicate = noTypePredicate;
|
|
60772
|
-
}
|
|
60764
|
+
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
|
|
60773
60765
|
}
|
|
60774
60766
|
Debug.assert(!!signature.resolvedTypePredicate);
|
|
60775
60767
|
}
|
|
@@ -79178,89 +79170,6 @@ function createTypeChecker(host) {
|
|
|
79178
79170
|
return false;
|
|
79179
79171
|
}
|
|
79180
79172
|
}
|
|
79181
|
-
function getTypePredicateFromBody(func, _sig) {
|
|
79182
|
-
const functionFlags = getFunctionFlags(func);
|
|
79183
|
-
if (functionFlags !== 0 /* Normal */)
|
|
79184
|
-
return void 0;
|
|
79185
|
-
let singleReturn;
|
|
79186
|
-
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
79187
|
-
singleReturn = func.body;
|
|
79188
|
-
} else {
|
|
79189
|
-
if (functionHasImplicitReturn(func))
|
|
79190
|
-
return void 0;
|
|
79191
|
-
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
79192
|
-
if (singleReturn || !returnStatement.expression)
|
|
79193
|
-
return true;
|
|
79194
|
-
singleReturn = returnStatement.expression;
|
|
79195
|
-
});
|
|
79196
|
-
if (bailedEarly || !singleReturn)
|
|
79197
|
-
return void 0;
|
|
79198
|
-
}
|
|
79199
|
-
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
79200
|
-
if (predicate) {
|
|
79201
|
-
const [i, type] = predicate;
|
|
79202
|
-
const param = func.parameters[i];
|
|
79203
|
-
if (isIdentifier(param.name)) {
|
|
79204
|
-
return createTypePredicate(1 /* Identifier */, param.name.escapedText, i, type);
|
|
79205
|
-
}
|
|
79206
|
-
}
|
|
79207
|
-
return void 0;
|
|
79208
|
-
function checkIfExpressionRefinesAnyParameter(expr) {
|
|
79209
|
-
expr = skipParentheses(
|
|
79210
|
-
expr,
|
|
79211
|
-
/*excludeJSDocTypeAssertions*/
|
|
79212
|
-
true
|
|
79213
|
-
);
|
|
79214
|
-
const type = checkExpressionCached(expr, 64 /* TypeOnly */);
|
|
79215
|
-
if (type !== booleanType || !func.body)
|
|
79216
|
-
return void 0;
|
|
79217
|
-
return forEach(func.parameters, (param, i) => {
|
|
79218
|
-
const initType = getSymbolLinks(param.symbol).type;
|
|
79219
|
-
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
79220
|
-
return;
|
|
79221
|
-
}
|
|
79222
|
-
const trueType2 = checkIfExpressionRefinesParameter(
|
|
79223
|
-
expr,
|
|
79224
|
-
param,
|
|
79225
|
-
initType,
|
|
79226
|
-
/*forceFullCheck*/
|
|
79227
|
-
false
|
|
79228
|
-
);
|
|
79229
|
-
if (trueType2) {
|
|
79230
|
-
const trueSubtype = checkIfExpressionRefinesParameter(
|
|
79231
|
-
expr,
|
|
79232
|
-
param,
|
|
79233
|
-
trueType2,
|
|
79234
|
-
/*forceFullCheck*/
|
|
79235
|
-
true
|
|
79236
|
-
);
|
|
79237
|
-
if (trueSubtype) {
|
|
79238
|
-
return [i, trueType2];
|
|
79239
|
-
}
|
|
79240
|
-
}
|
|
79241
|
-
});
|
|
79242
|
-
}
|
|
79243
|
-
function checkIfExpressionRefinesParameter(expr, param, initType, forceFullCheck) {
|
|
79244
|
-
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
79245
|
-
const trueCondition = {
|
|
79246
|
-
flags: 32 /* TrueCondition */,
|
|
79247
|
-
node: expr,
|
|
79248
|
-
antecedent
|
|
79249
|
-
};
|
|
79250
|
-
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
79251
|
-
if (trueType2 === initType && !forceFullCheck)
|
|
79252
|
-
return void 0;
|
|
79253
|
-
const falseCondition = {
|
|
79254
|
-
...trueCondition,
|
|
79255
|
-
flags: 64 /* FalseCondition */
|
|
79256
|
-
};
|
|
79257
|
-
const falseType2 = getFlowTypeOfReference(param.name, initType, initType, func, falseCondition);
|
|
79258
|
-
const candidateFalse = filterType(initType, (t) => !isTypeSubtypeOf(t, trueType2));
|
|
79259
|
-
if (isTypeIdenticalTo(candidateFalse, falseType2)) {
|
|
79260
|
-
return trueType2;
|
|
79261
|
-
}
|
|
79262
|
-
}
|
|
79263
|
-
}
|
|
79264
79173
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
|
79265
79174
|
addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
|
|
79266
79175
|
return;
|
|
@@ -138410,7 +138319,13 @@ function getSourceMapper(host) {
|
|
|
138410
138319
|
const currentDirectory = host.getCurrentDirectory();
|
|
138411
138320
|
const sourceFileLike = /* @__PURE__ */ new Map();
|
|
138412
138321
|
const documentPositionMappers = /* @__PURE__ */ new Map();
|
|
138413
|
-
return {
|
|
138322
|
+
return {
|
|
138323
|
+
tryGetSourcePosition,
|
|
138324
|
+
tryGetGeneratedPosition,
|
|
138325
|
+
toLineColumnOffset,
|
|
138326
|
+
clearCache,
|
|
138327
|
+
documentPositionMappers
|
|
138328
|
+
};
|
|
138414
138329
|
function toPath3(fileName) {
|
|
138415
138330
|
return toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
138416
138331
|
}
|
|
@@ -159866,7 +159781,7 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken,
|
|
|
159866
159781
|
let importAdder;
|
|
159867
159782
|
const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext);
|
|
159868
159783
|
if (memberCompletionEntry) {
|
|
159869
|
-
({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry);
|
|
159784
|
+
({ insertText, filterText, isSnippet, importAdder, replacementSpan } = memberCompletionEntry);
|
|
159870
159785
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
159871
159786
|
hasAction = true;
|
|
159872
159787
|
source = "ClassMemberSnippet/" /* ClassMemberSnippet */;
|
|
@@ -160054,7 +159969,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
|
|
|
160054
159969
|
);
|
|
160055
159970
|
}
|
|
160056
159971
|
}
|
|
160057
|
-
return { insertText, filterText, isSnippet, importAdder, eraseRange };
|
|
159972
|
+
return { insertText, filterText, isSnippet, importAdder, replacementSpan: eraseRange && createTextSpanFromBounds(eraseRange.pos, eraseRange.end) };
|
|
160058
159973
|
}
|
|
160059
159974
|
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
160060
159975
|
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
@@ -160706,7 +160621,7 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo
|
|
|
160706
160621
|
}
|
|
160707
160622
|
}
|
|
160708
160623
|
if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) {
|
|
160709
|
-
const { importAdder,
|
|
160624
|
+
const { importAdder, replacementSpan } = getEntryForMemberCompletion(
|
|
160710
160625
|
host,
|
|
160711
160626
|
program,
|
|
160712
160627
|
compilerOptions,
|
|
@@ -160718,15 +160633,15 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo
|
|
|
160718
160633
|
contextToken,
|
|
160719
160634
|
formatContext
|
|
160720
160635
|
);
|
|
160721
|
-
if (importAdder ||
|
|
160636
|
+
if (importAdder || replacementSpan) {
|
|
160722
160637
|
const changes = ts_textChanges_exports.ChangeTracker.with(
|
|
160723
160638
|
{ host, formatContext, preferences },
|
|
160724
160639
|
(tracker) => {
|
|
160725
160640
|
if (importAdder) {
|
|
160726
160641
|
importAdder.writeFixes(tracker);
|
|
160727
160642
|
}
|
|
160728
|
-
if (
|
|
160729
|
-
tracker.deleteRange(sourceFile,
|
|
160643
|
+
if (replacementSpan) {
|
|
160644
|
+
tracker.deleteRange(sourceFile, { pos: replacementSpan.start, end: replacementSpan.start + replacementSpan.length });
|
|
160730
160645
|
}
|
|
160731
160646
|
}
|
|
160732
160647
|
);
|
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.20240223`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -58515,15 +58515,7 @@ ${lanes.join("\n")}
|
|
|
58515
58515
|
jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
|
|
58516
58516
|
}
|
|
58517
58517
|
}
|
|
58518
|
-
|
|
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, signature) || noTypePredicate;
|
|
58524
|
-
} else {
|
|
58525
|
-
signature.resolvedTypePredicate = noTypePredicate;
|
|
58526
|
-
}
|
|
58518
|
+
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
|
|
58527
58519
|
}
|
|
58528
58520
|
Debug.assert(!!signature.resolvedTypePredicate);
|
|
58529
58521
|
}
|
|
@@ -76932,89 +76924,6 @@ ${lanes.join("\n")}
|
|
|
76932
76924
|
return false;
|
|
76933
76925
|
}
|
|
76934
76926
|
}
|
|
76935
|
-
function getTypePredicateFromBody(func, _sig) {
|
|
76936
|
-
const functionFlags = getFunctionFlags(func);
|
|
76937
|
-
if (functionFlags !== 0 /* Normal */)
|
|
76938
|
-
return void 0;
|
|
76939
|
-
let singleReturn;
|
|
76940
|
-
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
76941
|
-
singleReturn = func.body;
|
|
76942
|
-
} else {
|
|
76943
|
-
if (functionHasImplicitReturn(func))
|
|
76944
|
-
return void 0;
|
|
76945
|
-
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
76946
|
-
if (singleReturn || !returnStatement.expression)
|
|
76947
|
-
return true;
|
|
76948
|
-
singleReturn = returnStatement.expression;
|
|
76949
|
-
});
|
|
76950
|
-
if (bailedEarly || !singleReturn)
|
|
76951
|
-
return void 0;
|
|
76952
|
-
}
|
|
76953
|
-
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
76954
|
-
if (predicate) {
|
|
76955
|
-
const [i, type] = predicate;
|
|
76956
|
-
const param = func.parameters[i];
|
|
76957
|
-
if (isIdentifier(param.name)) {
|
|
76958
|
-
return createTypePredicate(1 /* Identifier */, param.name.escapedText, i, type);
|
|
76959
|
-
}
|
|
76960
|
-
}
|
|
76961
|
-
return void 0;
|
|
76962
|
-
function checkIfExpressionRefinesAnyParameter(expr) {
|
|
76963
|
-
expr = skipParentheses(
|
|
76964
|
-
expr,
|
|
76965
|
-
/*excludeJSDocTypeAssertions*/
|
|
76966
|
-
true
|
|
76967
|
-
);
|
|
76968
|
-
const type = checkExpressionCached(expr, 64 /* TypeOnly */);
|
|
76969
|
-
if (type !== booleanType || !func.body)
|
|
76970
|
-
return void 0;
|
|
76971
|
-
return forEach(func.parameters, (param, i) => {
|
|
76972
|
-
const initType = getSymbolLinks(param.symbol).type;
|
|
76973
|
-
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
76974
|
-
return;
|
|
76975
|
-
}
|
|
76976
|
-
const trueType2 = checkIfExpressionRefinesParameter(
|
|
76977
|
-
expr,
|
|
76978
|
-
param,
|
|
76979
|
-
initType,
|
|
76980
|
-
/*forceFullCheck*/
|
|
76981
|
-
false
|
|
76982
|
-
);
|
|
76983
|
-
if (trueType2) {
|
|
76984
|
-
const trueSubtype = checkIfExpressionRefinesParameter(
|
|
76985
|
-
expr,
|
|
76986
|
-
param,
|
|
76987
|
-
trueType2,
|
|
76988
|
-
/*forceFullCheck*/
|
|
76989
|
-
true
|
|
76990
|
-
);
|
|
76991
|
-
if (trueSubtype) {
|
|
76992
|
-
return [i, trueType2];
|
|
76993
|
-
}
|
|
76994
|
-
}
|
|
76995
|
-
});
|
|
76996
|
-
}
|
|
76997
|
-
function checkIfExpressionRefinesParameter(expr, param, initType, forceFullCheck) {
|
|
76998
|
-
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
76999
|
-
const trueCondition = {
|
|
77000
|
-
flags: 32 /* TrueCondition */,
|
|
77001
|
-
node: expr,
|
|
77002
|
-
antecedent
|
|
77003
|
-
};
|
|
77004
|
-
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
77005
|
-
if (trueType2 === initType && !forceFullCheck)
|
|
77006
|
-
return void 0;
|
|
77007
|
-
const falseCondition = {
|
|
77008
|
-
...trueCondition,
|
|
77009
|
-
flags: 64 /* FalseCondition */
|
|
77010
|
-
};
|
|
77011
|
-
const falseType2 = getFlowTypeOfReference(param.name, initType, initType, func, falseCondition);
|
|
77012
|
-
const candidateFalse = filterType(initType, (t) => !isTypeSubtypeOf(t, trueType2));
|
|
77013
|
-
if (isTypeIdenticalTo(candidateFalse, falseType2)) {
|
|
77014
|
-
return trueType2;
|
|
77015
|
-
}
|
|
77016
|
-
}
|
|
77017
|
-
}
|
|
77018
76927
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
|
77019
76928
|
addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
|
|
77020
76929
|
return;
|
|
@@ -136757,7 +136666,13 @@ ${lanes.join("\n")}
|
|
|
136757
136666
|
const currentDirectory = host.getCurrentDirectory();
|
|
136758
136667
|
const sourceFileLike = /* @__PURE__ */ new Map();
|
|
136759
136668
|
const documentPositionMappers = /* @__PURE__ */ new Map();
|
|
136760
|
-
return {
|
|
136669
|
+
return {
|
|
136670
|
+
tryGetSourcePosition,
|
|
136671
|
+
tryGetGeneratedPosition,
|
|
136672
|
+
toLineColumnOffset,
|
|
136673
|
+
clearCache,
|
|
136674
|
+
documentPositionMappers
|
|
136675
|
+
};
|
|
136761
136676
|
function toPath3(fileName) {
|
|
136762
136677
|
return toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
136763
136678
|
}
|
|
@@ -159088,7 +159003,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159088
159003
|
let importAdder;
|
|
159089
159004
|
const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext);
|
|
159090
159005
|
if (memberCompletionEntry) {
|
|
159091
|
-
({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry);
|
|
159006
|
+
({ insertText, filterText, isSnippet, importAdder, replacementSpan } = memberCompletionEntry);
|
|
159092
159007
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
159093
159008
|
hasAction = true;
|
|
159094
159009
|
source = "ClassMemberSnippet/" /* ClassMemberSnippet */;
|
|
@@ -159276,7 +159191,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159276
159191
|
);
|
|
159277
159192
|
}
|
|
159278
159193
|
}
|
|
159279
|
-
return { insertText, filterText, isSnippet, importAdder, eraseRange };
|
|
159194
|
+
return { insertText, filterText, isSnippet, importAdder, replacementSpan: eraseRange && createTextSpanFromBounds(eraseRange.pos, eraseRange.end) };
|
|
159280
159195
|
}
|
|
159281
159196
|
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
159282
159197
|
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
@@ -159928,7 +159843,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159928
159843
|
}
|
|
159929
159844
|
}
|
|
159930
159845
|
if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) {
|
|
159931
|
-
const { importAdder,
|
|
159846
|
+
const { importAdder, replacementSpan } = getEntryForMemberCompletion(
|
|
159932
159847
|
host,
|
|
159933
159848
|
program,
|
|
159934
159849
|
compilerOptions,
|
|
@@ -159940,15 +159855,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159940
159855
|
contextToken,
|
|
159941
159856
|
formatContext
|
|
159942
159857
|
);
|
|
159943
|
-
if (importAdder ||
|
|
159858
|
+
if (importAdder || replacementSpan) {
|
|
159944
159859
|
const changes = ts_textChanges_exports.ChangeTracker.with(
|
|
159945
159860
|
{ host, formatContext, preferences },
|
|
159946
159861
|
(tracker) => {
|
|
159947
159862
|
if (importAdder) {
|
|
159948
159863
|
importAdder.writeFixes(tracker);
|
|
159949
159864
|
}
|
|
159950
|
-
if (
|
|
159951
|
-
tracker.deleteRange(sourceFile,
|
|
159865
|
+
if (replacementSpan) {
|
|
159866
|
+
tracker.deleteRange(sourceFile, { pos: replacementSpan.start, end: replacementSpan.start + replacementSpan.length });
|
|
159952
159867
|
}
|
|
159953
159868
|
}
|
|
159954
159869
|
);
|
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.20240223`;
|
|
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-57480-2",
|
|
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": "f882d281482b734527fece6d31cfff99a8813730"
|
|
118
118
|
}
|