Latest Typescript Change about key/value pairs #856
gokayokyay
started this conversation in
General
Replies: 1 comment
-
TypeScript is a "restriction" to JavaScript - anything can hold or be anything in JavaScript and a chicken can become an umbrella at any point in time, there are no shapes or forms enforced. TypeScript introduces these restrictions by "enforcing" (a very flaccid enforcement) static typing. So making UserData a static type makes the interface more TypeScripty, and narrows the gap between C++ interface and TypeScript interface. Now both uWebSockets and uWebSockets.js have essentially the same interface which makes it easier to document and explain. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, first of all I'd like to thank you for the amazing work you've done.
Just out of curiosity, why did you restrict the typescript version with the interface? Not because it's bad or something but I'm just curious about the decision.
The change I'm referring to is the latest release.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions