Comment by CharlieDigital
Comment by CharlieDigital 12 days ago
> Even for the parts that are being compiled to JS: You wouldn't say: You can not have C++ in production, only binaries.
I would say that because it can be decompiled; the type information is still present. Same with C#. I can decompile the binary and still see the type information.The process of going from TS to JS is lossy; you cannot get back the type information.
I would absolutely say "I have C++ in production" or "I have C# in production" but not say "I have TypeScript in production". "We build our app with TypeScript" is accurate, but it is transpiled -- not compiled -- into JavaScript. Your Node.js server then interprets that JavaScript and executes C++.
That is not right, When you compile to binaries, you do type erasure in CPP, som of the stuff can not be reconstructed or inferred, especially when using o flags.
JS -> TS is easy, you just re-anotate with `: any` everywhere.
Anyways, you are word juggling now.