mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Get base primitive type for unary operators.
This commit is contained in:
parent
cdd6b418d8
commit
3d11930453
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user