@typescript-deploys/pr-build 5.3.0-pr-54778-3 → 5.3.0-pr-55319-8
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 +7 -2
- package/lib/tsserver.js +7 -2
- package/lib/tsserverlibrary.js +7 -2
- package/lib/typescript.js +7 -2
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -51928,7 +51928,7 @@ function createTypeChecker(host) {
|
|
|
51928
51928
|
if (reportErrors2) {
|
|
51929
51929
|
reportErrorsFromWidening(declaration, type);
|
|
51930
51930
|
}
|
|
51931
|
-
if (type.flags & 8192 /* UniqueESSymbol */ && !declaration.type && type.symbol !== getSymbolOfDeclaration(declaration)
|
|
51931
|
+
if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {
|
|
51932
51932
|
type = esSymbolType;
|
|
51933
51933
|
}
|
|
51934
51934
|
return getWidenedType(type);
|
|
@@ -73837,6 +73837,11 @@ function createTypeChecker(host) {
|
|
|
73837
73837
|
}
|
|
73838
73838
|
leftType = checkNonNullType(leftType, left);
|
|
73839
73839
|
rightType = checkNonNullType(rightType, right);
|
|
73840
|
+
if (leftType.flags & rightType.flags & 1024 /* EnumLiteral */) {
|
|
73841
|
+
if (getBaseTypeOfEnumLikeType(leftType).symbol !== getBaseTypeOfEnumLikeType(rightType).symbol) {
|
|
73842
|
+
error(errorNode, Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations);
|
|
73843
|
+
}
|
|
73844
|
+
}
|
|
73840
73845
|
let suggestedOperator;
|
|
73841
73846
|
if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) {
|
|
73842
73847
|
error(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator));
|
|
@@ -74410,7 +74415,7 @@ function createTypeChecker(host) {
|
|
|
74410
74415
|
return createTupleType(elementTypes, elementFlags, type.target.readonly);
|
|
74411
74416
|
}
|
|
74412
74417
|
function widenTypeInferredFromInitializer(declaration, type) {
|
|
74413
|
-
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type :
|
|
74418
|
+
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
|
74414
74419
|
if (isInJSFile(declaration)) {
|
|
74415
74420
|
if (isEmptyLiteralType(widened)) {
|
|
74416
74421
|
reportImplicitAny(declaration, anyType);
|
package/lib/tsserver.js
CHANGED
|
@@ -56637,7 +56637,7 @@ function createTypeChecker(host) {
|
|
|
56637
56637
|
if (reportErrors2) {
|
|
56638
56638
|
reportErrorsFromWidening(declaration, type);
|
|
56639
56639
|
}
|
|
56640
|
-
if (type.flags & 8192 /* UniqueESSymbol */ && !declaration.type && type.symbol !== getSymbolOfDeclaration(declaration)
|
|
56640
|
+
if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {
|
|
56641
56641
|
type = esSymbolType;
|
|
56642
56642
|
}
|
|
56643
56643
|
return getWidenedType(type);
|
|
@@ -78546,6 +78546,11 @@ function createTypeChecker(host) {
|
|
|
78546
78546
|
}
|
|
78547
78547
|
leftType = checkNonNullType(leftType, left);
|
|
78548
78548
|
rightType = checkNonNullType(rightType, right);
|
|
78549
|
+
if (leftType.flags & rightType.flags & 1024 /* EnumLiteral */) {
|
|
78550
|
+
if (getBaseTypeOfEnumLikeType(leftType).symbol !== getBaseTypeOfEnumLikeType(rightType).symbol) {
|
|
78551
|
+
error2(errorNode, Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations);
|
|
78552
|
+
}
|
|
78553
|
+
}
|
|
78549
78554
|
let suggestedOperator;
|
|
78550
78555
|
if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) {
|
|
78551
78556
|
error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator));
|
|
@@ -79119,7 +79124,7 @@ function createTypeChecker(host) {
|
|
|
79119
79124
|
return createTupleType(elementTypes, elementFlags, type.target.readonly);
|
|
79120
79125
|
}
|
|
79121
79126
|
function widenTypeInferredFromInitializer(declaration, type) {
|
|
79122
|
-
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type :
|
|
79127
|
+
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
|
79123
79128
|
if (isInJSFile(declaration)) {
|
|
79124
79129
|
if (isEmptyLiteralType(widened)) {
|
|
79125
79130
|
reportImplicitAny(declaration, anyType);
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -54400,7 +54400,7 @@ ${lanes.join("\n")}
|
|
|
54400
54400
|
if (reportErrors2) {
|
|
54401
54401
|
reportErrorsFromWidening(declaration, type);
|
|
54402
54402
|
}
|
|
54403
|
-
if (type.flags & 8192 /* UniqueESSymbol */ && !declaration.type && type.symbol !== getSymbolOfDeclaration(declaration)
|
|
54403
|
+
if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {
|
|
54404
54404
|
type = esSymbolType;
|
|
54405
54405
|
}
|
|
54406
54406
|
return getWidenedType(type);
|
|
@@ -76309,6 +76309,11 @@ ${lanes.join("\n")}
|
|
|
76309
76309
|
}
|
|
76310
76310
|
leftType = checkNonNullType(leftType, left);
|
|
76311
76311
|
rightType = checkNonNullType(rightType, right);
|
|
76312
|
+
if (leftType.flags & rightType.flags & 1024 /* EnumLiteral */) {
|
|
76313
|
+
if (getBaseTypeOfEnumLikeType(leftType).symbol !== getBaseTypeOfEnumLikeType(rightType).symbol) {
|
|
76314
|
+
error2(errorNode, Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations);
|
|
76315
|
+
}
|
|
76316
|
+
}
|
|
76312
76317
|
let suggestedOperator;
|
|
76313
76318
|
if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) {
|
|
76314
76319
|
error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator));
|
|
@@ -76882,7 +76887,7 @@ ${lanes.join("\n")}
|
|
|
76882
76887
|
return createTupleType(elementTypes, elementFlags, type.target.readonly);
|
|
76883
76888
|
}
|
|
76884
76889
|
function widenTypeInferredFromInitializer(declaration, type) {
|
|
76885
|
-
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type :
|
|
76890
|
+
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
|
76886
76891
|
if (isInJSFile(declaration)) {
|
|
76887
76892
|
if (isEmptyLiteralType(widened)) {
|
|
76888
76893
|
reportImplicitAny(declaration, anyType);
|
package/lib/typescript.js
CHANGED
|
@@ -54400,7 +54400,7 @@ ${lanes.join("\n")}
|
|
|
54400
54400
|
if (reportErrors2) {
|
|
54401
54401
|
reportErrorsFromWidening(declaration, type);
|
|
54402
54402
|
}
|
|
54403
|
-
if (type.flags & 8192 /* UniqueESSymbol */ && !declaration.type && type.symbol !== getSymbolOfDeclaration(declaration)
|
|
54403
|
+
if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {
|
|
54404
54404
|
type = esSymbolType;
|
|
54405
54405
|
}
|
|
54406
54406
|
return getWidenedType(type);
|
|
@@ -76309,6 +76309,11 @@ ${lanes.join("\n")}
|
|
|
76309
76309
|
}
|
|
76310
76310
|
leftType = checkNonNullType(leftType, left);
|
|
76311
76311
|
rightType = checkNonNullType(rightType, right);
|
|
76312
|
+
if (leftType.flags & rightType.flags & 1024 /* EnumLiteral */) {
|
|
76313
|
+
if (getBaseTypeOfEnumLikeType(leftType).symbol !== getBaseTypeOfEnumLikeType(rightType).symbol) {
|
|
76314
|
+
error2(errorNode, Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations);
|
|
76315
|
+
}
|
|
76316
|
+
}
|
|
76312
76317
|
let suggestedOperator;
|
|
76313
76318
|
if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) {
|
|
76314
76319
|
error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator));
|
|
@@ -76882,7 +76887,7 @@ ${lanes.join("\n")}
|
|
|
76882
76887
|
return createTupleType(elementTypes, elementFlags, type.target.readonly);
|
|
76883
76888
|
}
|
|
76884
76889
|
function widenTypeInferredFromInitializer(declaration, type) {
|
|
76885
|
-
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type :
|
|
76890
|
+
const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
|
|
76886
76891
|
if (isInJSFile(declaration)) {
|
|
76887
76892
|
if (isEmptyLiteralType(widened)) {
|
|
76888
76893
|
reportImplicitAny(declaration, anyType);
|
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-55319-8",
|
|
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": "3a65f1f67de93b8700b318854af93cf1821e9489"
|
|
118
118
|
}
|