4 ms·
Doesn't typescript force Babel ?
by offtop5 6y ago
Doesn't typescript force Babel ?
- acemarke 6y agoNo. Typescript is its own entirely separate standalone compiler toolchain. If you are using Babel as a compiler, you can enable the TS syntax plugin to have Babel strip TS type syntax out of its processing output, although this does not do any typechecking during the compilation process.
- offtop5 6y agoGreat. I'm always open to being proved wrong. Any chance of JS being mostly Babel free by next year ?
- acemarke 6y agoAh... no, not in the slightest. Every major web framework's standard build tools (Create-React-App, Vue-CLI, etc), are based on Webpack + Babel, and most folks who are using one of those frameworks but setting up their own build toolchains still base them around Webpack + Babel. There's some potentially interesting technical alternatives out there, but Babel is a keystone in the modern JS ecosystem.
- crucialfelix 6y agoSince typescript tsc can compile js, you could switch to using the typescript compiler to compile your javascript. It would also detect some probable bugs in your js code. Of course after a day or two you would start writing typescript and never look back.