@typescript-deploys/pr-build 5.3.0-pr-55991-22 → 5.3.0-pr-55991-37
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 +3 -3
- package/lib/tsserver.js +3 -3
- package/lib/typescript.js +3 -3
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -66258,6 +66258,7 @@ function createTypeChecker(host) {
|
|
|
66258
66258
|
}
|
|
66259
66259
|
function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) {
|
|
66260
66260
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
66261
|
+
const clausesType = narrowTypeForTrueClauses(type, clauses);
|
|
66261
66262
|
const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);
|
|
66262
66263
|
const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
|
|
66263
66264
|
if (hasDefaultClause) {
|
|
@@ -66266,11 +66267,10 @@ function createTypeChecker(host) {
|
|
|
66266
66267
|
const before = narrowTypeForTrueClauses(type, clausesBefore);
|
|
66267
66268
|
const after = narrowTypeForTrueClauses(type, clausesAfter);
|
|
66268
66269
|
const other = getUnionType([before, after]);
|
|
66269
|
-
const
|
|
66270
|
-
const typeNotOther = filterType(type, (t) => !areTypesComparable(t, other));
|
|
66270
|
+
const typeNotOther = filterType(type, (t) => !isTypeSubsetOf(t, other));
|
|
66271
66271
|
return getUnionType([clausesType, typeNotOther]);
|
|
66272
66272
|
}
|
|
66273
|
-
return
|
|
66273
|
+
return clausesType;
|
|
66274
66274
|
}
|
|
66275
66275
|
function narrowTypeForTrueClauses(type, clauses) {
|
|
66276
66276
|
return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType(
|
package/lib/tsserver.js
CHANGED
|
@@ -70970,6 +70970,7 @@ function createTypeChecker(host) {
|
|
|
70970
70970
|
}
|
|
70971
70971
|
function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) {
|
|
70972
70972
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
70973
|
+
const clausesType = narrowTypeForTrueClauses(type, clauses);
|
|
70973
70974
|
const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);
|
|
70974
70975
|
const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
|
|
70975
70976
|
if (hasDefaultClause) {
|
|
@@ -70978,11 +70979,10 @@ function createTypeChecker(host) {
|
|
|
70978
70979
|
const before = narrowTypeForTrueClauses(type, clausesBefore);
|
|
70979
70980
|
const after = narrowTypeForTrueClauses(type, clausesAfter);
|
|
70980
70981
|
const other = getUnionType([before, after]);
|
|
70981
|
-
const
|
|
70982
|
-
const typeNotOther = filterType(type, (t) => !areTypesComparable(t, other));
|
|
70982
|
+
const typeNotOther = filterType(type, (t) => !isTypeSubsetOf(t, other));
|
|
70983
70983
|
return getUnionType([clausesType, typeNotOther]);
|
|
70984
70984
|
}
|
|
70985
|
-
return
|
|
70985
|
+
return clausesType;
|
|
70986
70986
|
}
|
|
70987
70987
|
function narrowTypeForTrueClauses(type, clauses) {
|
|
70988
70988
|
return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType(
|
package/lib/typescript.js
CHANGED
|
@@ -68737,6 +68737,7 @@ ${lanes.join("\n")}
|
|
|
68737
68737
|
}
|
|
68738
68738
|
function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) {
|
|
68739
68739
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
68740
|
+
const clausesType = narrowTypeForTrueClauses(type, clauses);
|
|
68740
68741
|
const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);
|
|
68741
68742
|
const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
|
|
68742
68743
|
if (hasDefaultClause) {
|
|
@@ -68745,11 +68746,10 @@ ${lanes.join("\n")}
|
|
|
68745
68746
|
const before = narrowTypeForTrueClauses(type, clausesBefore);
|
|
68746
68747
|
const after = narrowTypeForTrueClauses(type, clausesAfter);
|
|
68747
68748
|
const other = getUnionType([before, after]);
|
|
68748
|
-
const
|
|
68749
|
-
const typeNotOther = filterType(type, (t) => !areTypesComparable(t, other));
|
|
68749
|
+
const typeNotOther = filterType(type, (t) => !isTypeSubsetOf(t, other));
|
|
68750
68750
|
return getUnionType([clausesType, typeNotOther]);
|
|
68751
68751
|
}
|
|
68752
|
-
return
|
|
68752
|
+
return clausesType;
|
|
68753
68753
|
}
|
|
68754
68754
|
function narrowTypeForTrueClauses(type, clauses) {
|
|
68755
68755
|
return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType(
|
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-55991-
|
|
5
|
+
"version": "5.3.0-pr-55991-37",
|
|
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": "2c2be073b2b807b0d45edd413fb922128c517411"
|
|
118
118
|
}
|