Closed kcirtaptrick closed 3 years ago
/assign
please merge this feature. method chaining is critical and important
Hi both. Apologies for the delay on this. This is significant change to the types and needs tests to improve confidence that the types match the runtime behaviour.
Could you please:
generate.js
file to use the latest version of protoc (the currently-used version doesn't have chaining).add
functions. From the docs and the protoc write code the add
functions for primitive repeated fields also return the instance, but add
functions for non-primitives appear to return the added value as per the protobuf reference:
addFoo(): Appends a value of foo to the end of the list of foos that was in the message. Returns the outer message for chaining only if the added value was a primitive. For added messages, returns the message that was added
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign moadz
You can assign the PR to them by writing /assign @moadz
in a comment when ready.
The full list of commands accepted by this bot can be found here.
Just made 2 of the changes, how would I go about wriitng tests for this? Would I create a new integration test or add to one of the existing ones?
Closing this PR since I've since moved to protobuf.js and no longer need this change. If someone else wants to continue this effort, feel free
Changes
Verification
TSLint and tests passed, tried generating files in a project and they're working properly.