Fable icon indicating copy to clipboard operation
Fable copied to clipboard

[JS] Use native BigInt to represent longs, bigints and decimals

Open alfonsogarciacaro opened this issue 3 years ago • 0 comments

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

alfonsogarciacaro avatar Jul 04 '22 03:07 alfonsogarciacaro