kafka icon indicating copy to clipboard operation
kafka copied to clipboard

commitOffset missing from SimpleConsumer type

Open steffansluis opened this issue 8 years ago • 4 comments

As can be seen here, the function commitOffset is present on the SimpleConsumer. However, it is commented out in the types for SimpleConsumer.

steffansluis avatar Jul 12 '17 13:07 steffansluis

Incidentally, the return type for fetchOffset also seems to be incorrect.

steffansluis avatar Jul 12 '17 13:07 steffansluis

I'm not good with Typescript so I would be glad to accept a PR

oleksiyk avatar Jul 12 '17 14:07 oleksiyk

Sure, I'd be happy to help! I would argue for rewriting (part of) the library to Typescript, because then the types could be generated and you would get all the benefits of the the type system inside of the library as well. Did you ever consider getting into Typescript? I find it's basically just like JS except it's more difficult to make mistakes. In any case, a PR will follow soon :smiley:

steffansluis avatar Jul 12 '17 15:07 steffansluis

I've submitted a pull request which adds commitOffset in SimpleConsumer, fixes the return type for fetchOffset and also fixes a few other small things: https://github.com/oleksiyk/kafka/pull/200

Foosvald avatar Oct 12 '17 13:10 Foosvald