Document and decide on arithmetic toPrimitive footguns
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 58
- Forks
- 12
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 2
Description
We should better document the consequences of toPrimitive and consider how it impacts call sites such as
new Amount(5) + 5
new Amount(5) * 5
new Amount(5)++
We may want to reconsider whether any of these are too surprising.
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 by reviewing the issue's discussion of toPrimitive and the listed call sites: addition, multiplication, and post-increment. Done means documenting their consequences and reaching a decision about whether any behavior is too surprising.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100