protocolbuffers / protocolbuffers/protobuf-javascript
[JS] Getter function for singular message fields
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 471
- Forks
- 91
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 2
Description
Getter function for singular message fields in javascript returns "undefined" when the field is not set. This is not consistent with the behavior of getter function for such fields in all other languages.
This is very inconvenient and is a source of bugs because programmer has always check for undefined values for nested messages (imagine multi levels of nested submessages). It can be fixed by introducing new getter function like msg.GetFooOrDefault().
Contributor guide
No contributing guide indexed for this repository
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
No source file or test is named. Start by locating the JavaScript implementation or generator for singular message-field getters, then compare its unset-field behavior with the other language implementations. Done means the proposed getter behavior is defined and covered by tests, including nested unset messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100