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

Improve type definitions for config callbacks #973

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Munter
Copy link

@Munter Munter commented Sep 14, 2022

When working with strict type checking in typescript, the callbacks dr_cb, rebalance_cb and offset_commit_cb are not sufficiently typed, and even the examples given in the README are throwing type errors.

This PR defines strict types for these callbacks.

I have done my best to back track the types from the EventListenerMap for rebalance, offset.commit and delivery-report

Caveat 1: I have not been able to build the project locally, so these changes are made based on the installed package from npm inside a project that consumes node-rdkafka

Caveat 2:. In my project, I am currently only using rebalance_cb, so the others have been harder to check.

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

Successfully merging this pull request may close these issues.

1 participant