We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At the moment
let i = 1 let f = 1.3 let bigI = BigInt.fromInt(i) let bigF = BigInt.fromFloat(f)
is compiled to
var bigI = BigInt(1); var bigF = BigInt(1.3); var i = 1; var f = 1.3;
Problem: in JS, BigInt(x) is valid only if x is an integer, not a float, so running var bigF = BigInt(1.3) throws an error
BigInt(x)
var bigF = BigInt(1.3)
The text was updated successfully, but these errors were encountered:
Potential fix: redefining in Core__BigInt.res to
Core__BigInt.res
let fromFloat = t => t->Core__Int.fromFloat->fromInt
with some documentation in the interface file, maybe adapting what's already available for Core__Int.fromFloat
Core__Int.fromFloat
Sorry, something went wrong.
No branches or pull requests
At the moment
is compiled to
Problem: in JS,
BigInt(x)
is valid only if x is an integer, not a float, so runningvar bigF = BigInt(1.3)
throws an errorThe text was updated successfully, but these errors were encountered: