29 ms·
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
by alvis 9y ago
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.
- krainboltgreene 9y agoThey are not different. They can both help developers write in confidence and integrity. Babel can do more.
- alvis 9y agoBabel can't do type checking, right?
- krainboltgreene 9y agoIt 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.