TS2365
error TS2365: Operator ‘+’ cannot be applied to types ‘number’ and ‘object’.
Broken Code ❌
1 |
|
Fixed Code ✔️
You can use the +
operator only with equivalent data types (strings + strings or numbers + numbers):
1 |
|
error TS2365: Operator ‘+’ cannot be applied to types ‘number’ and ‘object’.
1 |
|
You can use the +
operator only with equivalent data types (strings + strings or numbers + numbers):
1 |
|