oleksiyk / kafka

Apache Kafka 0.9 client for Node
MIT License
297 stars 85 forks source link

commitOffset missing from SimpleConsumer type #190

Open steffansluis opened 7 years ago

steffansluis commented 7 years ago

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

steffansluis commented 7 years ago

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

oleksiyk commented 7 years ago

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

steffansluis commented 7 years ago

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:

Foosvald commented 7 years ago

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