Closed
Description
TypeScript Version: 4.2.0-dev.20201130
Search Terms: is:issue bigint
Code
var x: any, y: bigint
-x + y
++x + y
x++ + y
~x + y
x - x + y
x * x + y
Expected behavior:
The code should compile without errors, because x
could be a bigint
.
Actual behavior:
Each of the expressions fails to typecheck: error TS2365: Operator '+' cannot be applied to types 'number' and 'bigint'.
.
Playground Link: link
Related Issues: none.