3 ms·
This premise is factually true for both TypeScript and Flow. Please explain how you could come to any other conclusion. I researched this 4 years ago, and sin
by depmann 6y ago
This premise is factually true for both TypeScript and Flow. Please explain how you could come to any other conclusion.
I researched this 4 years ago, and since then Typescript has added the `--checkJs` option, but it still you to run a separate process to run the check, which seems to certainly fall under the category of "... otherwise preprocessing the code". And that's an edge case. If you've got TS installed, your almost certainly transpiling. Type guards are typecasting, just renamed to make you sound smarter.
Flow requires a transpiler (https://flow.org/en/docs/install/ https://flow.org/en/docs/install/) and advocates the use of background process. Again, this solidly fits the above premise.
These are enormously complex solution to a problem that can be resolved without transpiling by using 6 small functions and a sensible naming convention. Certainly there are many cases where that makes a lot of sense.
I've developed lots of mission-critical JS that is very widely distributed and there are no type errors despite not using Flow or TS.