Hacker News new | ask | show | jobs
by qudat 3158 days ago
"I've replaced X build step with Y build step." I don't understand the argument.

What I would love is for TypeScript to do one thing and that is it: static type checking. The fact that it does more than that to me is feature creep. I really wish something like Flow had the community support that TypeScript has because of its single responsibility.

2 comments

TypeScript is never mean to be a replacement of Babel.

The spirit of TypeScript is code integrity. Imagine that you are working on a project which change often. In this case, refactoring and maintaining breaking changes are headache. How would you identify potential issues before pushing to CI and being punished by errors with no clue?

Babel and TypeScript are different. Babel is a transpiler which enable us to write modern syntax which are not widely supported, while TypeScript is a transpiler which help us to write in confidence and integrity.

They are not different. They can both help developers write in confidence and integrity. Babel can do more.
Babel can't do type checking, right?
It absolutely can! That said, the way it currently works is that babel-preset-flow and babel-preset-typescript both remove type annotations for the final build, essentially enabling flow or typescript to work without having to also be build engines.
>"I've replaced X build step with Y build step." I don't understand the argument.

Typescript does both X and Y steps, so what exactly don't you understand?