Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeScript Support for EmberJS, AngularJS or BatmanJS

Will TypeScript support any of those great MV* frameworks.

I know it's too early to ask this, but what about the chances to reach support for them with this young javascript initiative?

like image 336
Sergio Daniel L. García Avatar asked Oct 03 '12 12:10

Sergio Daniel L. García


People also ask

Is Ember similar to angular?

Angular and Ember both can be difficult to learn while just starting, but when you compare both, Angular is easier to learn at the initial level whereas Ember gets easier as developers dig deep. But both the frameworks are amazing to work on when you have a good grip on them.

Is Ember js any good?

Ember. js is considered ideal for long-term projects, single-page apps, web apps that have native features, apps that need a Python-like environment, and apps that have a complicated functionality integration.


1 Answers

TypeScript already supports these and every other JavaScript library. Any JavaScript code is valid TypeScript code.

Obviously to see any benefits from TypeScript these libraries would need to add type annotations, this can be done unobtrusively by creating Declaration Source Files (files with a .d.ts extension). These are basically header files that describe the type information associated with existing JavaScript code.

It is obviously outside the scope of the TypeScript project to create these Declaration Source Files for every popular JavaScript library. It is up to those projects and the community to contribute this.

You can view a sample Declaration Source File for jQuery that is included in the TypeScript samples.

like image 187
joshuapoehls Avatar answered Nov 30 '22 05:11

joshuapoehls