3 ms·
Every time I've tried using typescript (sorry not using untyped JS) on the server and client, the mismatch between client and server libraries made it very hard
by grogenaut 5y ago
Every time I've tried using typescript (sorry not using untyped JS) on the server and client, the mismatch between client and server libraries made it very hard to re-use the objects, frameworks or libraries. So much so that it felt like two different languages, or at least as different as writing react and writing CDK. I very quickly reached for any other server language and an IDL like GQL for the communications. This let me re-use code for the transport which was the max I was able to get from typescript/js only.
The other big issue is the things I was working on actually needed high parallelism, and node really provides concurrency, so I quickly hit issues there as well. I'm currently working in a GQL based world and the golang based one we use is massively parallel and very performant, and I'd be worried about the speed loss writing in node.
This makes me very sad because I really do like Typescript as a language, and writing everything in one language seems like it'd be great. But it's really brought down by all the typing issues with legacy javascript, node, and other tools.
But then again, I'm not writing crud apps at work or for fun so your mileage may vary.