When adding two variables, operands must both be of type number or of type string. (restrict-plus-operands)

Examples of correct code:

var foo = parseInt('5.5', 10) + 10;
var foo = 1n + 1n;

Examples of incorrect code:

var foo = '5.5' + 5;
var foo = 1n + 1;

Options

{
  "@typescript-eslint/restrict-plus-operands": "error"
}

Compatibility