Skip to content

Commit 3d11930

Browse files
Get base primitive type for unary operators.
1 parent cdd6b41 commit 3d11930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24083,7 +24083,7 @@ namespace ts {
2408324083
}
2408424084
if (node.operator === SyntaxKind.PlusToken) {
2408524085
if (maybeTypeOfKind(operandType, TypeFlags.BigIntLike)) {
24086-
error(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(operandType));
24086+
error(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType)));
2408724087
}
2408824088
return numberType;
2408924089
}

0 commit comments

Comments
 (0)