Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not yet, but I believe babel and others just transpile/polyfill it by having it fall back on a string arithmetic library for working with integers of arbitrary precision.


That will never be totally reliable as 1) javascript is dynamically typed 2) javascript doesn't support operator overloading. Nonetheless, there are attempts.

https://www.npmjs.com/package/babel-plugin-transform-bigint

> Update: Now it can convert a code using BigInt into a code using JSBI (https://github.com/GoogleChromeLabs/jsbi). It will try to detect when an operator is used for bigints, not numbers. This will not work in many cases, so please use JSBI directly only if you know, that the code works only with bigints.

(emphasis mine)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: