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 create utility function to message defintions #760

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

paralin
Copy link
Collaborator

@paralin paralin commented Jan 10, 2023

Similar to fromPartial except it allows an empty argument:

  • create() -> {object}
  • create({partial object}) -> {object}

Calls fromPartial internally.

Callers of the library can now use create() instead of fromPartial({}) which, while functionally equivalent, is much more readable.

Context: #727 (comment)

Similar to `fromPartial` except it allows an empty argument:

 - create() -> {object}
 - create({partial object}) -> {object}

Calls fromPartial internally.

Callers of the library can now use create() instead of fromPartial({}) which,
while functionally equivalent, is much more readable.

Signed-off-by: Christian Stewart <[email protected]>
@paralin paralin requested a review from stephenh January 10, 2023 01:51
@paralin paralin added the enhancement New feature or request label Jan 10, 2023
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.

Looks great!

@stephenh stephenh merged commit 44fc7b2 into stephenh:main Jan 10, 2023
stephenh pushed a commit that referenced this pull request Jan 10, 2023
# [1.138.0](v1.137.2...v1.138.0) (2023-01-10)

### Features

* add create utility function to message defintions ([#760](#760)) ([44fc7b2](44fc7b2))
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.138.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@paralin paralin deleted the add-create-func branch January 10, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants