-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About BigInt's browser compatibility #39
Comments
Yes, that's true. In fact I don't write any TS code that requires ES earlier than 2022 (though 2020 would probably work too). All relevant browsers and Node.js support that. We should not support old technology forever in new code. Bigint is, however, only used in the BitSet class, which is something that could be changed to use uint32. |
I can create a new PR to change it if you need to. |
Sure, why not! PR is welcome. |
PR is merged |
I noticed that antlr4ng uses BigInts. BigInts require ES2020.
BigInts are not lowered to older syntax in esbuild evanw/esbuild#732 . If I set esbuild's target option to be lower than es2020, then esbuild throws an exception about not being able to convert bigint. Babel also has a similar issue .
Whether to consider replacing Bigint and BigUint64Array with number and Uint16Array.
This has the potential to affect the performance of antlr4ng, and in general the long type in java should indeed correspond to the javascript Bigint and BigUint64Array (since both are 64-bit). But there is currently no good solution to the compatibility problem.
The text was updated successfully, but these errors were encountered: