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

API alignment: handler is always in options #111

Merged
merged 2 commits into from
Jan 30, 2025
Merged

API alignment: handler is always in options #111

merged 2 commits into from
Jan 30, 2025

Conversation

milyin
Copy link
Contributor

@milyin milyin commented Jan 29, 2025

There was an misalignment between API handler/callback parameter:

  • naming can be callback (for callback only items) or handler (for items which may accept callback or channel). This is wrong: even if at this moment the callaback parameter doesn't allow chanllel., it may/should support it in the future. Therefore parameter name should be handler
  • in declare_subscriber handler parameter was passed in arguments, while in other places it's passed in options. Made this uniform: now handler is always in options. (in fact this approach differs from the one in C++ which takes handler in parameters. But there is no function overloading in typescript, so approach with handler in options is better here)

Copy link

PR missing one of the required labels: {'internal', 'breaking-change', 'enhancement', 'documentation', 'dependencies', 'bug', 'new feature'}

@milyin milyin added the enhancement New feature or request label Jan 29, 2025
@milyin milyin merged commit 05f96f5 into main Jan 30, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant