-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write in TypeScript? #258
Comments
The benefit of using TypeScript for this library is small. FYI |
It's for the end user, more than anything, end user gets reliable types, whereas |
This library is stable, and the interface changes very infrequently, and then in backwards-compatible ways if possible.
Just because you want a feature, does not make it mandatory. This library is in maintenance mode. Changes are only made when the benefit outweighs the cost. |
I understand. One benefit of TS is that you can introduce types gradually, but there is some cognitive overhead to managing a compile step. You should be able to do something like this:
and in src/ you have:
and it will transpile to:
I am no the only one looking for libraries that go through the trouble of generating a typed interface, which easier to consume. I did a search for "websocket library written in typescript", and there aren't any as far as I can tell. 'ws' would be a good candidate for this and this library as well. |
I am looking for a WebSockets library written in TypeScript
https://www.quora.com/unanswered/Is-there-a-Websocket-library-for-Node-js-written-in-TypeScript
it looks like
@types/sockjs
exists, but since it's packaged separately, often the types become out-of-sync.The text was updated successfully, but these errors were encountered: