Convert project to typescript.
Target version 3.3
An alternative is to create a @types/pulsar-client-node definition in https://github.com/DefinitelyTyped/DefinitelyTyped
that works to
I've added v1.0 types to DefinitelyTyped.
npm install -D @types/pulsar-client
@bwalendz please add that to the readme.md
@bwalendz @aahmed-se Thank you for adding the definition and document! By the way, do you have any idea about the procedure / policy to maintain them?
Hi! I'm running into some issues due to the typings in DefinitelyTyped being out of date (namely, log missing, and listener-based consumer unrecognized in TS). Wouldn't it be easier to maintain the type definitions inside this source repository, and always ship them together? It seems like this would make keeping things in sync easier.
@rkaw92 You can submit a pull request to the definitely typings repo if you find anything outdated and it'll get merged.
@rkaw92 Sent PR to DefinitelyTyped(pulsar-client). https://github.com/DefinitelyTyped/DefinitelyTyped/pull/50229
If the PR was merged, I think you can set message listener for consumer.
@bwalendz @rkaw92 I have added the type definitions to this repository: https://github.com/apache/pulsar-client-node/pull/140
Closed as types are provided. This is a thin wrapper js package so JS or TS is not quite different. If anyone who wants to rewrite it in typescript (I suggest you don't waste time to do this), you can bring up this issue again with a prototype.