mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-14 09:49:40 -05:00
Get base primitive type for unary operators.
This commit is contained in:
@@ -24083,7 +24083,7 @@ namespace ts {
|
||||
}
|
||||
if (node.operator === SyntaxKind.PlusToken) {
|
||||
if (maybeTypeOfKind(operandType, TypeFlags.BigIntLike)) {
|
||||
error(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(operandType));
|
||||
error(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType)));
|
||||
}
|
||||
return numberType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user