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

Abstract definition builders #5

Closed
rimuy opened this issue Apr 7, 2022 · 1 comment
Closed

Abstract definition builders #5

rimuy opened this issue Apr 7, 2022 · 1 comment
Labels
breaking change Breaking changes

Comments

@rimuy
Copy link
Member

rimuy commented Apr 7, 2022

Thinking of abstracting once again how you build definitions, merging both definition builders into one. The library should be focused on what definitions can do, and not on what they should be. This way it should be simpler as you only care about what exactly they provide to you. This change would result in the following behaviour:

  • The builder is by default a builder for events.
  • If the builder uses the SetReturn method, it'll become a builder for functions.
  • If the Async method is used right after SetReturn, it'll become a builder for asynchronous functions.

Change:
EventBuilder & FunctionBuilder -> DefinitionBuilder

Regarding to #2, MessagingEventBuilder would need to receive a new name, which would likely be GlobalDefinitionBuilder.

This should be elaborated later in the description.

@rimuy rimuy added the breaking change Breaking changes label Apr 7, 2022
@rimuy
Copy link
Member Author

rimuy commented Apr 17, 2022

Implemented by e8ab476.

@rimuy rimuy closed this as completed Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaking changes
Projects
None yet
Development

No branches or pull requests

1 participant