Вопрос

As I asked in this post I was wanting to know how compatible Typescript is with ES6, which Typescript 2.0 plans to support:

Should I use Traceur instead of Typescript to target ES5 but be ready for ES6

However as I read this post by google it appears that Traceur is used pretty heavily in the upcoming Angular 2.0.

So I'm trying to decide on whether to go with typescript or Traceur to be better ready for Angular 2.0 (my team will have less refactoring).

Это было полезно?

Решение

The fact that the new version of Angular is developed with Traceur should have NO effect on how you use it. You can still use Typescript and take advantage of the language type checking and inference since the new Angular will be a regular Javascript library (compiled down to ES5). When ES6 becomes widely adopted you will still be able to use typescript and target ES6 and use the ES6 angular that way.

Другие советы

You need traceur to develop AngularJS. You don't need it to use AngularJS. You can still use typescript

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top