Skip to content
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

BigInt function vs BigInt literals #32

Open
tynes opened this issue Sep 6, 2019 · 1 comment
Open

BigInt function vs BigInt literals #32

tynes opened this issue Sep 6, 2019 · 1 comment

Comments

@tynes
Copy link
Member

tynes commented Sep 6, 2019

Running into a problem with trying to package bcoin while uglifying it. The latest version of uglify-es still does not support BigInt literals, ie 21n. I think the the parser just hasn't been updated to support that syntax. GitHub also seems to act strangely with their parser, BigInts appear highlighted and red.

The BigInt function is the same as using a literal. It may be easier to be compatible with the wider JS ecosystem if the function syntax was used, as old parsers will not break on it. Then the BigInt functionality could be polyfilled if need be.

const a = BigInt(21);
const b = 21n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants