`BigInt(new Amount(bigint))` roundtrip.
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 58
- Forks
- 12
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 2
Description
BigInt(value) currently calls value[Symbol.toPrimitive]("number").
If that remains it means an amount created from a bigint could lose data if it was passed to BigInt.
Ideas:
- This is OK
- Throw if
BigInt()is passed an amount - Get a bigint similar to
Amount.prototype.toBigInt()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked ECMAScript BigInt constructor specification and examine how it handles an Amount created from a bigint. Compare the three proposed outcomes—allowing the conversion, throwing, or exposing a bigint conversion—with the existing Amount.prototype.toBigInt() behavior. Done means choosing and documenting one consistent conversion rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100