Skip to content

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