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

proposal: syscall/js: recognize JS bigint primitives in Value.Type #72050

Open
jcbhmr opened this issue Mar 1, 2025 · 2 comments
Open

proposal: syscall/js: recognize JS bigint primitives in Value.Type #72050

jcbhmr opened this issue Mar 1, 2025 · 2 comments
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool OS-JS Proposal
Milestone

Comments

@jcbhmr
Copy link

jcbhmr commented Mar 1, 2025

Proposal Details

Right now there's no TypeBigint for Value.Type() to return if the type is a bigint primitive (typeof v returns "bigint" in js)

I propose adding support for this new primitive, similar to the JS symbol primitive and how that is implemented in syscall/js right now -- it can be completely opaque to Go code.

@jcbhmr jcbhmr added the Proposal label Mar 1, 2025
@gopherbot gopherbot added this to the Proposal milestone Mar 1, 2025
@gabyhelp gabyhelp added the LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool label Mar 1, 2025
@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Mar 3, 2025
@ianlancetaylor
Copy link
Member

CC @golang/js

@Zxilly
Copy link
Member

Zxilly commented Mar 3, 2025

I agree with this proposal, maybe we could try to provide a way to convert to math/big?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool OS-JS Proposal
Projects
Status: Incoming
Development

No branches or pull requests

6 participants