Effect CommunityEC
Effect Community3y ago
5 replies
imagio

Issues with Native `BigInt` Syntax and the Need for Transpilation

Per some previous discussion, the use of native BigInt syntax including BigInt literals (like 0n) can cause some problems. It doesn't work on all JS engines and it turns out it's very difficult to transpile away. I see there was an unmerged PR by @Mattia Manzati a few months ago to remove the use of literals -- that would be a good start in making things work on platforms without native BigInt support. I guess I'm somewhat of an outlier, as it seems BigInt is ~94% supported these days, react-native being the problem here. I'm not sure how widely BigInt literals are supported however, I think they're an es2020 feature. Is there any objection to removing the literals in favor of the BigInt constructor?
Was this page helpful?