javascript - What are the main differences between Babel and TypeScript -


i know typescript used write angular2, makes better choice wants angular2, when @ babel looks typescript.

i noticed many known companies stick babel.

some questions:

  1. what advantages have on each other?
  2. which make them better or worse choice project/developer?
  3. what major differences between them , make them unique?

typescript superset of javascript compiles down plain javascript (es3+). main goal of typescript enable developers leverage excellent static typing capabilities. suitable large applications benefit features like:

  • type annotations & type inference.
  • generics.
  • interfaces, enums, namespaces, modules , classes (the latter 2 available in es6).
  • safe refactoring.

as far aware, babel "transpiles" newer ecmascript features down format supported older ecmascript environments. suitable developers want write plain javascript using newer language features.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -