Fable
Fable copied to clipboard
[JS] Use native BigInt to represent longs, bigints and decimals
Looks like JS BigInt has good support now, so it may be a good time to use it now to represent longs and bigints. This way we avoid the long.js dependency that some bundlers apparently cannot tree shake (see #2907) and also the ported code for BigInteger. I think we can also use BigInt to represent decimals, we'll need some custom code but it'd be smaller than the current big.js dependency. There's a sample implementation here: https://stackoverflow.com/a/66939244