client-js icon indicating copy to clipboard operation
client-js copied to clipboard

No typescript support for websockets

Open KevinEdry opened this issue 2 years ago • 1 comments

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?

KevinEdry avatar Jun 24 '23 09:06 KevinEdry

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

timetraveler328 avatar Aug 11 '23 19:08 timetraveler328