From 3d119304531358524efc8ba2d1191cd5f6387280 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 14 Aug 2019 16:16:43 -0700 Subject: [PATCH] Get base primitive type for unary operators. --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 65722fa6d52..649fcac83bb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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; }