@typescript-deploys/pr-build 5.3.0-pr-54960-7 → 5.3.0-pr-55291-6
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 +12 -7
- package/lib/tsserver.js +12 -7
- package/lib/typescript.js +12 -7
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -64463,7 +64463,7 @@ function createTypeChecker(host) {
|
|
|
64463
64463
|
const resolved = resolveStructuredTypeMembers(type);
|
|
64464
64464
|
return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
|
|
64465
64465
|
}
|
|
64466
|
-
function getTypeFacts(type) {
|
|
64466
|
+
function getTypeFacts(type, strictTruthy) {
|
|
64467
64467
|
if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
|
|
64468
64468
|
type = getBaseConstraintOfType(type) || unknownType;
|
|
64469
64469
|
}
|
|
@@ -64493,7 +64493,7 @@ function createTypeChecker(host) {
|
|
|
64493
64493
|
return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */;
|
|
64494
64494
|
}
|
|
64495
64495
|
if (flags & 528 /* BooleanLike */) {
|
|
64496
|
-
return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
|
|
64496
|
+
return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : strictTruthy ? 16774920 /* TrueFacts */ & ~8388608 /* Falsy */ : 16774920 /* TrueFacts */;
|
|
64497
64497
|
}
|
|
64498
64498
|
if (flags & 524288 /* Object */) {
|
|
64499
64499
|
return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
|
|
@@ -64517,7 +64517,7 @@ function createTypeChecker(host) {
|
|
|
64517
64517
|
return 0 /* None */;
|
|
64518
64518
|
}
|
|
64519
64519
|
if (flags & 1048576 /* Union */) {
|
|
64520
|
-
return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
|
|
64520
|
+
return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t, strictTruthy), 0 /* None */);
|
|
64521
64521
|
}
|
|
64522
64522
|
if (flags & 2097152 /* Intersection */) {
|
|
64523
64523
|
return getIntersectionTypeFacts(type);
|
|
@@ -64537,8 +64537,8 @@ function createTypeChecker(host) {
|
|
|
64537
64537
|
}
|
|
64538
64538
|
return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
|
|
64539
64539
|
}
|
|
64540
|
-
function getTypeWithFacts(type, include) {
|
|
64541
|
-
return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
|
|
64540
|
+
function getTypeWithFacts(type, include, strictTruthy) {
|
|
64541
|
+
return filterType(type, (t) => (getTypeFacts(t, strictTruthy) & include) !== 0);
|
|
64542
64542
|
}
|
|
64543
64543
|
function getAdjustedTypeWithFacts(type, facts) {
|
|
64544
64544
|
const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
|
|
@@ -65598,7 +65598,12 @@ function createTypeChecker(host) {
|
|
|
65598
65598
|
}
|
|
65599
65599
|
const access = getDiscriminantPropertyAccess(expr, type);
|
|
65600
65600
|
if (access) {
|
|
65601
|
-
return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
|
|
65601
|
+
return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
|
|
65602
|
+
t,
|
|
65603
|
+
assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */,
|
|
65604
|
+
/*strictTruthy*/
|
|
65605
|
+
true
|
|
65606
|
+
));
|
|
65602
65607
|
}
|
|
65603
65608
|
return type;
|
|
65604
65609
|
}
|
|
@@ -72043,7 +72048,7 @@ function createTypeChecker(host) {
|
|
|
72043
72048
|
const type = getTypeOfSymbol(symbol);
|
|
72044
72049
|
if (strictNullChecks) {
|
|
72045
72050
|
const declaration = symbol.valueDeclaration;
|
|
72046
|
-
if (declaration &&
|
|
72051
|
+
if (declaration && hasInitializer(declaration)) {
|
|
72047
72052
|
return getOptionalType(type);
|
|
72048
72053
|
}
|
|
72049
72054
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -69171,7 +69171,7 @@ function createTypeChecker(host) {
|
|
|
69171
69171
|
const resolved = resolveStructuredTypeMembers(type);
|
|
69172
69172
|
return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
|
|
69173
69173
|
}
|
|
69174
|
-
function getTypeFacts(type) {
|
|
69174
|
+
function getTypeFacts(type, strictTruthy) {
|
|
69175
69175
|
if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
|
|
69176
69176
|
type = getBaseConstraintOfType(type) || unknownType;
|
|
69177
69177
|
}
|
|
@@ -69201,7 +69201,7 @@ function createTypeChecker(host) {
|
|
|
69201
69201
|
return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */;
|
|
69202
69202
|
}
|
|
69203
69203
|
if (flags & 528 /* BooleanLike */) {
|
|
69204
|
-
return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
|
|
69204
|
+
return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : strictTruthy ? 16774920 /* TrueFacts */ & ~8388608 /* Falsy */ : 16774920 /* TrueFacts */;
|
|
69205
69205
|
}
|
|
69206
69206
|
if (flags & 524288 /* Object */) {
|
|
69207
69207
|
return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
|
|
@@ -69225,7 +69225,7 @@ function createTypeChecker(host) {
|
|
|
69225
69225
|
return 0 /* None */;
|
|
69226
69226
|
}
|
|
69227
69227
|
if (flags & 1048576 /* Union */) {
|
|
69228
|
-
return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
|
|
69228
|
+
return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t, strictTruthy), 0 /* None */);
|
|
69229
69229
|
}
|
|
69230
69230
|
if (flags & 2097152 /* Intersection */) {
|
|
69231
69231
|
return getIntersectionTypeFacts(type);
|
|
@@ -69245,8 +69245,8 @@ function createTypeChecker(host) {
|
|
|
69245
69245
|
}
|
|
69246
69246
|
return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
|
|
69247
69247
|
}
|
|
69248
|
-
function getTypeWithFacts(type, include) {
|
|
69249
|
-
return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
|
|
69248
|
+
function getTypeWithFacts(type, include, strictTruthy) {
|
|
69249
|
+
return filterType(type, (t) => (getTypeFacts(t, strictTruthy) & include) !== 0);
|
|
69250
69250
|
}
|
|
69251
69251
|
function getAdjustedTypeWithFacts(type, facts) {
|
|
69252
69252
|
const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
|
|
@@ -70306,7 +70306,12 @@ function createTypeChecker(host) {
|
|
|
70306
70306
|
}
|
|
70307
70307
|
const access = getDiscriminantPropertyAccess(expr, type);
|
|
70308
70308
|
if (access) {
|
|
70309
|
-
return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
|
|
70309
|
+
return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
|
|
70310
|
+
t,
|
|
70311
|
+
assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */,
|
|
70312
|
+
/*strictTruthy*/
|
|
70313
|
+
true
|
|
70314
|
+
));
|
|
70310
70315
|
}
|
|
70311
70316
|
return type;
|
|
70312
70317
|
}
|
|
@@ -76751,7 +76756,7 @@ function createTypeChecker(host) {
|
|
|
76751
76756
|
const type = getTypeOfSymbol(symbol);
|
|
76752
76757
|
if (strictNullChecks) {
|
|
76753
76758
|
const declaration = symbol.valueDeclaration;
|
|
76754
|
-
if (declaration &&
|
|
76759
|
+
if (declaration && hasInitializer(declaration)) {
|
|
76755
76760
|
return getOptionalType(type);
|
|
76756
76761
|
}
|
|
76757
76762
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -66932,7 +66932,7 @@ ${lanes.join("\n")}
|
|
|
66932
66932
|
const resolved = resolveStructuredTypeMembers(type);
|
|
66933
66933
|
return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
|
|
66934
66934
|
}
|
|
66935
|
-
function getTypeFacts(type) {
|
|
66935
|
+
function getTypeFacts(type, strictTruthy) {
|
|
66936
66936
|
if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
|
|
66937
66937
|
type = getBaseConstraintOfType(type) || unknownType;
|
|
66938
66938
|
}
|
|
@@ -66962,7 +66962,7 @@ ${lanes.join("\n")}
|
|
|
66962
66962
|
return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */;
|
|
66963
66963
|
}
|
|
66964
66964
|
if (flags & 528 /* BooleanLike */) {
|
|
66965
|
-
return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
|
|
66965
|
+
return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : strictTruthy ? 16774920 /* TrueFacts */ & ~8388608 /* Falsy */ : 16774920 /* TrueFacts */;
|
|
66966
66966
|
}
|
|
66967
66967
|
if (flags & 524288 /* Object */) {
|
|
66968
66968
|
return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
|
|
@@ -66986,7 +66986,7 @@ ${lanes.join("\n")}
|
|
|
66986
66986
|
return 0 /* None */;
|
|
66987
66987
|
}
|
|
66988
66988
|
if (flags & 1048576 /* Union */) {
|
|
66989
|
-
return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
|
|
66989
|
+
return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t, strictTruthy), 0 /* None */);
|
|
66990
66990
|
}
|
|
66991
66991
|
if (flags & 2097152 /* Intersection */) {
|
|
66992
66992
|
return getIntersectionTypeFacts(type);
|
|
@@ -67006,8 +67006,8 @@ ${lanes.join("\n")}
|
|
|
67006
67006
|
}
|
|
67007
67007
|
return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
|
|
67008
67008
|
}
|
|
67009
|
-
function getTypeWithFacts(type, include) {
|
|
67010
|
-
return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
|
|
67009
|
+
function getTypeWithFacts(type, include, strictTruthy) {
|
|
67010
|
+
return filterType(type, (t) => (getTypeFacts(t, strictTruthy) & include) !== 0);
|
|
67011
67011
|
}
|
|
67012
67012
|
function getAdjustedTypeWithFacts(type, facts) {
|
|
67013
67013
|
const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
|
|
@@ -68067,7 +68067,12 @@ ${lanes.join("\n")}
|
|
|
68067
68067
|
}
|
|
68068
68068
|
const access = getDiscriminantPropertyAccess(expr, type);
|
|
68069
68069
|
if (access) {
|
|
68070
|
-
return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
|
|
68070
|
+
return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
|
|
68071
|
+
t,
|
|
68072
|
+
assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */,
|
|
68073
|
+
/*strictTruthy*/
|
|
68074
|
+
true
|
|
68075
|
+
));
|
|
68071
68076
|
}
|
|
68072
68077
|
return type;
|
|
68073
68078
|
}
|
|
@@ -74512,7 +74517,7 @@ ${lanes.join("\n")}
|
|
|
74512
74517
|
const type = getTypeOfSymbol(symbol);
|
|
74513
74518
|
if (strictNullChecks) {
|
|
74514
74519
|
const declaration = symbol.valueDeclaration;
|
|
74515
|
-
if (declaration &&
|
|
74520
|
+
if (declaration && hasInitializer(declaration)) {
|
|
74516
74521
|
return getOptionalType(type);
|
|
74517
74522
|
}
|
|
74518
74523
|
}
|
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-55291-6",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"node": "20.1.0",
|
|
117
117
|
"npm": "8.19.4"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "92a0ae5c70e8053b382ed5242c49f738c455b804"
|
|
120
120
|
}
|