Closed foones closed 7 years ago
I'm not sure exactly what you mean.
First of all, big Internet doesn't have a method called Integer
, so bigInt.Integer
will be undefined. I'm not sure how you came up with this example. Did you mean bigInt(0)
?
Secondly, you're using the native JavaScript equality operator. If you want to check equality of bigInts, you should use the equals
method.
Thirdly, 0 === -0
with native JavaScript numbers, so I'm not sure what issue you are facing.
My bad, I did not realize that the interface supported comparing for equality only through the equals
method.
For instance:
(It's not clear to me if the fact that BigInt equality relies on the underlying JS number equality may have other unwanted consequences).