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

feat: Add interface for static message methods #1104

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

sam-step
Copy link
Contributor

@sam-step sam-step commented Sep 5, 2024

Fixes #1080

Adds an interface for the static message methods to avoid tsc errors on large messages.

Since the set of static methods created may vary from message-to-message, multiple interfaces were created and are unioned as needed:

  • MessageFns. The common encode/decode methods. All the message objects implement this.
  • ExtensionFns. The get/set extension methods. Added if extensions are enabled and the message has extensions.
  • ExtensionHolder. The individual extension properties.
  • [Struct|AnyValue|ListValue|FieldMask]WrapperFns. The wrap/unwrap methods for the well-known types.

Copy link
Owner

@stephenh stephenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great use of the conditional output feature @sam-step ! Looks great! Thank you!

@stephenh stephenh merged commit faa33b6 into stephenh:main Sep 6, 2024
6 checks passed
stephenh pushed a commit that referenced this pull request Sep 6, 2024
# [2.2.0](v2.1.0...v2.2.0) (2024-09-06)

### Features

* Add interface for static message methods ([#1104](#1104)) ([faa33b6](faa33b6))
@stephenh
Copy link
Owner

stephenh commented Sep 6, 2024

🎉 This issue has been resolved in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding Explicit Type Definitions to Factory Method Objects
2 participants