uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
8.08k stars 574 forks source link

implement better typesafety for user data #834

Closed TheDevMinerTV closed 1 year ago

TheDevMinerTV commented 1 year ago

I have used this in the past to make autocompletions and type safety better when using user data and found it useful to give this to use people as well.

uNetworkingAB commented 1 year ago

It's a good idea but we already went down that route and it did not work. I forgot what the exact problem was but something about app.ws not being representable in V8 so information about type got lost.

TheDevMinerTV commented 1 year ago

what do you mean exactly? TypeScript is compile time only.

uNetworkingAB commented 1 year ago

https://github.com/uNetworking/uWebSockets.js/pull/312