@typescript-deploys/pr-build 5.5.0-pr-57465-44 → 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 +17 -39
- package/lib/tsserver.js +17 -39
- package/lib/typescript.js +17 -39
- 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 = [];
|
|
@@ -74444,6 +74444,7 @@ function createTypeChecker(host) {
|
|
|
74444
74444
|
if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
|
|
74445
74445
|
return void 0;
|
|
74446
74446
|
let singleReturn;
|
|
74447
|
+
let singleReturnStatement;
|
|
74447
74448
|
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
74448
74449
|
singleReturn = func.body;
|
|
74449
74450
|
} else {
|
|
@@ -74452,13 +74453,12 @@ function createTypeChecker(host) {
|
|
|
74452
74453
|
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
74453
74454
|
if (singleReturn || !returnStatement.expression)
|
|
74454
74455
|
return true;
|
|
74456
|
+
singleReturnStatement = returnStatement;
|
|
74455
74457
|
singleReturn = returnStatement.expression;
|
|
74456
74458
|
});
|
|
74457
74459
|
if (bailedEarly || !singleReturn)
|
|
74458
74460
|
return void 0;
|
|
74459
74461
|
}
|
|
74460
|
-
if (isTriviallyNonBoolean(singleReturn))
|
|
74461
|
-
return void 0;
|
|
74462
74462
|
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
74463
74463
|
if (predicate) {
|
|
74464
74464
|
const [i, type] = predicate;
|
|
@@ -74474,36 +74474,21 @@ function createTypeChecker(host) {
|
|
|
74474
74474
|
/*excludeJSDocTypeAssertions*/
|
|
74475
74475
|
true
|
|
74476
74476
|
);
|
|
74477
|
-
const type = checkExpressionCached(expr
|
|
74478
|
-
if (type !== booleanType
|
|
74477
|
+
const type = checkExpressionCached(expr);
|
|
74478
|
+
if (type !== booleanType)
|
|
74479
74479
|
return void 0;
|
|
74480
74480
|
return forEach(func.parameters, (param, i) => {
|
|
74481
74481
|
const initType = getSymbolLinks(param.symbol).type;
|
|
74482
74482
|
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
74483
74483
|
return;
|
|
74484
74484
|
}
|
|
74485
|
-
const trueType2 = checkIfExpressionRefinesParameter(
|
|
74486
|
-
expr,
|
|
74487
|
-
param,
|
|
74488
|
-
initType,
|
|
74489
|
-
/*forceFullCheck*/
|
|
74490
|
-
false
|
|
74491
|
-
);
|
|
74485
|
+
const trueType2 = checkIfExpressionRefinesParameter(expr, param, initType);
|
|
74492
74486
|
if (trueType2) {
|
|
74493
|
-
|
|
74494
|
-
expr,
|
|
74495
|
-
param,
|
|
74496
|
-
trueType2,
|
|
74497
|
-
/*forceFullCheck*/
|
|
74498
|
-
true
|
|
74499
|
-
);
|
|
74500
|
-
if (trueSubtype) {
|
|
74501
|
-
return [i, trueType2];
|
|
74502
|
-
}
|
|
74487
|
+
return [i, trueType2];
|
|
74503
74488
|
}
|
|
74504
74489
|
});
|
|
74505
74490
|
}
|
|
74506
|
-
function checkIfExpressionRefinesParameter(expr, param, initType
|
|
74491
|
+
function checkIfExpressionRefinesParameter(expr, param, initType) {
|
|
74507
74492
|
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
74508
74493
|
const trueCondition = {
|
|
74509
74494
|
flags: 32 /* TrueCondition */,
|
|
@@ -74511,29 +74496,22 @@ function createTypeChecker(host) {
|
|
|
74511
74496
|
antecedent
|
|
74512
74497
|
};
|
|
74513
74498
|
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
74514
|
-
if (trueType2 === initType
|
|
74499
|
+
if (trueType2 === initType)
|
|
74515
74500
|
return void 0;
|
|
74516
74501
|
const falseCondition = {
|
|
74517
74502
|
...trueCondition,
|
|
74518
74503
|
flags: 64 /* FalseCondition */
|
|
74519
74504
|
};
|
|
74520
|
-
const
|
|
74521
|
-
|
|
74522
|
-
|
|
74523
|
-
|
|
74524
|
-
|
|
74525
|
-
|
|
74526
|
-
|
|
74527
|
-
if (isLiteralExpression(expr) || isLiteralExpressionOfObject(expr)) {
|
|
74528
|
-
return true;
|
|
74529
|
-
}
|
|
74530
|
-
if (isIdentifier(expr)) {
|
|
74531
|
-
const sym = getResolvedSymbol(expr);
|
|
74532
|
-
if (sym.flags & (32 /* Class */ | 4096 /* ObjectLiteral */ | 16 /* Function */ | 384 /* Enum */ | 8 /* EnumMember */)) {
|
|
74533
|
-
return true;
|
|
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;
|
|
74534
74512
|
}
|
|
74535
74513
|
}
|
|
74536
|
-
return
|
|
74514
|
+
return trueType2;
|
|
74537
74515
|
}
|
|
74538
74516
|
}
|
|
74539
74517
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
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";
|
|
@@ -79189,6 +79189,7 @@ function createTypeChecker(host) {
|
|
|
79189
79189
|
if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
|
|
79190
79190
|
return void 0;
|
|
79191
79191
|
let singleReturn;
|
|
79192
|
+
let singleReturnStatement;
|
|
79192
79193
|
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
79193
79194
|
singleReturn = func.body;
|
|
79194
79195
|
} else {
|
|
@@ -79197,13 +79198,12 @@ function createTypeChecker(host) {
|
|
|
79197
79198
|
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
79198
79199
|
if (singleReturn || !returnStatement.expression)
|
|
79199
79200
|
return true;
|
|
79201
|
+
singleReturnStatement = returnStatement;
|
|
79200
79202
|
singleReturn = returnStatement.expression;
|
|
79201
79203
|
});
|
|
79202
79204
|
if (bailedEarly || !singleReturn)
|
|
79203
79205
|
return void 0;
|
|
79204
79206
|
}
|
|
79205
|
-
if (isTriviallyNonBoolean(singleReturn))
|
|
79206
|
-
return void 0;
|
|
79207
79207
|
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
79208
79208
|
if (predicate) {
|
|
79209
79209
|
const [i, type] = predicate;
|
|
@@ -79219,36 +79219,21 @@ function createTypeChecker(host) {
|
|
|
79219
79219
|
/*excludeJSDocTypeAssertions*/
|
|
79220
79220
|
true
|
|
79221
79221
|
);
|
|
79222
|
-
const type = checkExpressionCached(expr
|
|
79223
|
-
if (type !== booleanType
|
|
79222
|
+
const type = checkExpressionCached(expr);
|
|
79223
|
+
if (type !== booleanType)
|
|
79224
79224
|
return void 0;
|
|
79225
79225
|
return forEach(func.parameters, (param, i) => {
|
|
79226
79226
|
const initType = getSymbolLinks(param.symbol).type;
|
|
79227
79227
|
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
79228
79228
|
return;
|
|
79229
79229
|
}
|
|
79230
|
-
const trueType2 = checkIfExpressionRefinesParameter(
|
|
79231
|
-
expr,
|
|
79232
|
-
param,
|
|
79233
|
-
initType,
|
|
79234
|
-
/*forceFullCheck*/
|
|
79235
|
-
false
|
|
79236
|
-
);
|
|
79230
|
+
const trueType2 = checkIfExpressionRefinesParameter(expr, param, initType);
|
|
79237
79231
|
if (trueType2) {
|
|
79238
|
-
|
|
79239
|
-
expr,
|
|
79240
|
-
param,
|
|
79241
|
-
trueType2,
|
|
79242
|
-
/*forceFullCheck*/
|
|
79243
|
-
true
|
|
79244
|
-
);
|
|
79245
|
-
if (trueSubtype) {
|
|
79246
|
-
return [i, trueType2];
|
|
79247
|
-
}
|
|
79232
|
+
return [i, trueType2];
|
|
79248
79233
|
}
|
|
79249
79234
|
});
|
|
79250
79235
|
}
|
|
79251
|
-
function checkIfExpressionRefinesParameter(expr, param, initType
|
|
79236
|
+
function checkIfExpressionRefinesParameter(expr, param, initType) {
|
|
79252
79237
|
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
79253
79238
|
const trueCondition = {
|
|
79254
79239
|
flags: 32 /* TrueCondition */,
|
|
@@ -79256,29 +79241,22 @@ function createTypeChecker(host) {
|
|
|
79256
79241
|
antecedent
|
|
79257
79242
|
};
|
|
79258
79243
|
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
79259
|
-
if (trueType2 === initType
|
|
79244
|
+
if (trueType2 === initType)
|
|
79260
79245
|
return void 0;
|
|
79261
79246
|
const falseCondition = {
|
|
79262
79247
|
...trueCondition,
|
|
79263
79248
|
flags: 64 /* FalseCondition */
|
|
79264
79249
|
};
|
|
79265
|
-
const
|
|
79266
|
-
|
|
79267
|
-
|
|
79268
|
-
|
|
79269
|
-
|
|
79270
|
-
|
|
79271
|
-
|
|
79272
|
-
if (isLiteralExpression(expr) || isLiteralExpressionOfObject(expr)) {
|
|
79273
|
-
return true;
|
|
79274
|
-
}
|
|
79275
|
-
if (isIdentifier(expr)) {
|
|
79276
|
-
const sym = getResolvedSymbol(expr);
|
|
79277
|
-
if (sym.flags & (32 /* Class */ | 4096 /* ObjectLiteral */ | 16 /* Function */ | 384 /* Enum */ | 8 /* EnumMember */)) {
|
|
79278
|
-
return true;
|
|
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;
|
|
79279
79257
|
}
|
|
79280
79258
|
}
|
|
79281
|
-
return
|
|
79259
|
+
return trueType2;
|
|
79282
79260
|
}
|
|
79283
79261
|
}
|
|
79284
79262
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
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";
|
|
@@ -76943,6 +76943,7 @@ ${lanes.join("\n")}
|
|
|
76943
76943
|
if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
|
|
76944
76944
|
return void 0;
|
|
76945
76945
|
let singleReturn;
|
|
76946
|
+
let singleReturnStatement;
|
|
76946
76947
|
if (func.body && func.body.kind !== 241 /* Block */) {
|
|
76947
76948
|
singleReturn = func.body;
|
|
76948
76949
|
} else {
|
|
@@ -76951,13 +76952,12 @@ ${lanes.join("\n")}
|
|
|
76951
76952
|
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
76952
76953
|
if (singleReturn || !returnStatement.expression)
|
|
76953
76954
|
return true;
|
|
76955
|
+
singleReturnStatement = returnStatement;
|
|
76954
76956
|
singleReturn = returnStatement.expression;
|
|
76955
76957
|
});
|
|
76956
76958
|
if (bailedEarly || !singleReturn)
|
|
76957
76959
|
return void 0;
|
|
76958
76960
|
}
|
|
76959
|
-
if (isTriviallyNonBoolean(singleReturn))
|
|
76960
|
-
return void 0;
|
|
76961
76961
|
const predicate = checkIfExpressionRefinesAnyParameter(singleReturn);
|
|
76962
76962
|
if (predicate) {
|
|
76963
76963
|
const [i, type] = predicate;
|
|
@@ -76973,36 +76973,21 @@ ${lanes.join("\n")}
|
|
|
76973
76973
|
/*excludeJSDocTypeAssertions*/
|
|
76974
76974
|
true
|
|
76975
76975
|
);
|
|
76976
|
-
const type = checkExpressionCached(expr
|
|
76977
|
-
if (type !== booleanType
|
|
76976
|
+
const type = checkExpressionCached(expr);
|
|
76977
|
+
if (type !== booleanType)
|
|
76978
76978
|
return void 0;
|
|
76979
76979
|
return forEach(func.parameters, (param, i) => {
|
|
76980
76980
|
const initType = getSymbolLinks(param.symbol).type;
|
|
76981
76981
|
if (!initType || initType === booleanType || isSymbolAssigned(param.symbol)) {
|
|
76982
76982
|
return;
|
|
76983
76983
|
}
|
|
76984
|
-
const trueType2 = checkIfExpressionRefinesParameter(
|
|
76985
|
-
expr,
|
|
76986
|
-
param,
|
|
76987
|
-
initType,
|
|
76988
|
-
/*forceFullCheck*/
|
|
76989
|
-
false
|
|
76990
|
-
);
|
|
76984
|
+
const trueType2 = checkIfExpressionRefinesParameter(expr, param, initType);
|
|
76991
76985
|
if (trueType2) {
|
|
76992
|
-
|
|
76993
|
-
expr,
|
|
76994
|
-
param,
|
|
76995
|
-
trueType2,
|
|
76996
|
-
/*forceFullCheck*/
|
|
76997
|
-
true
|
|
76998
|
-
);
|
|
76999
|
-
if (trueSubtype) {
|
|
77000
|
-
return [i, trueType2];
|
|
77001
|
-
}
|
|
76986
|
+
return [i, trueType2];
|
|
77002
76987
|
}
|
|
77003
76988
|
});
|
|
77004
76989
|
}
|
|
77005
|
-
function checkIfExpressionRefinesParameter(expr, param, initType
|
|
76990
|
+
function checkIfExpressionRefinesParameter(expr, param, initType) {
|
|
77006
76991
|
const antecedent = expr.flowNode ?? { flags: 2 /* Start */ };
|
|
77007
76992
|
const trueCondition = {
|
|
77008
76993
|
flags: 32 /* TrueCondition */,
|
|
@@ -77010,29 +76995,22 @@ ${lanes.join("\n")}
|
|
|
77010
76995
|
antecedent
|
|
77011
76996
|
};
|
|
77012
76997
|
const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
|
|
77013
|
-
if (trueType2 === initType
|
|
76998
|
+
if (trueType2 === initType)
|
|
77014
76999
|
return void 0;
|
|
77015
77000
|
const falseCondition = {
|
|
77016
77001
|
...trueCondition,
|
|
77017
77002
|
flags: 64 /* FalseCondition */
|
|
77018
77003
|
};
|
|
77019
|
-
const
|
|
77020
|
-
|
|
77021
|
-
|
|
77022
|
-
|
|
77023
|
-
|
|
77024
|
-
|
|
77025
|
-
|
|
77026
|
-
if (isLiteralExpression(expr) || isLiteralExpressionOfObject(expr)) {
|
|
77027
|
-
return true;
|
|
77028
|
-
}
|
|
77029
|
-
if (isIdentifier(expr)) {
|
|
77030
|
-
const sym = getResolvedSymbol(expr);
|
|
77031
|
-
if (sym.flags & (32 /* Class */ | 4096 /* ObjectLiteral */ | 16 /* Function */ | 384 /* Enum */ | 8 /* EnumMember */)) {
|
|
77032
|
-
return true;
|
|
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;
|
|
77033
77011
|
}
|
|
77034
77012
|
}
|
|
77035
|
-
return
|
|
77013
|
+
return trueType2;
|
|
77036
77014
|
}
|
|
77037
77015
|
}
|
|
77038
77016
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
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-57465-
|
|
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
|
}
|