polygon-io / client-js

The official JS client library for the Polygon REST and WebSocket API.
MIT License
190 stars 59 forks source link

No typescript support for websockets #167

Open KevinEdry opened 1 year ago

KevinEdry commented 1 year ago

Hey, I've recently tried to switch to your client to handle my WebSockets connections (previously implemented in ws) and I've notice a lack of types for that api.

I was wondering if this is intentional? I was looking for types to the different messages, maybe a union based on the ev parameter. Is this something you would be interested in?

timetraveler328 commented 1 year ago

Hey @KevinEdry, this is definitely something that would be very useful. I think a union type could accomplish it without too much trouble. I'll put it on our feature list, but you're welcome to put in a PR as well. Thanks for filing this