Error: The left-hand side of an arithmetic operation must be of type ‘any’, 'number', ‘bigint‘ or an enum type

Symptoms

The following error occurs when trying to perform an arithmetic operation in Vantage:

The left-hand side of an arithmetic operation must be of type ‘any’, 'number', ‘bigint‘ or an enum type. 

Cause

Arithmetical operations allowed for 'any', 'number' or 'bigint' types only.

Resolution

Check the current operand type and convert its value to any of the allowed types:

For example, in the screenshot above the problematic operand is of 'string' type, Meanwhile, the expected is 'any', 'number' or 'bigint'. Use the parseFloat() or parseInt() method to convert the 'string' to 'number':

 

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request