Webstorm is [comming soon](http://joeriks.com/2012/11/20/a-first-look-at-the-typescript-support-in-webstorm-6-eap/).
Webstorm is [coming soon](http://joeriks.com/2012/11/20/a-first-look-at-the-typescript-support-in-webstorm-6-eap/).
## Node.js ##
## Node.js ##
standalone compiler is available as Node.js package.
standalone compiler is is available on NPM.
```
```
npm install -g typescript
npm install -g typescript
```
```
To compile the TS code in this project run in this directory
To compile the TS code in this project run this in the current directory.
```
```
tsc -sourcemap js/_all.ts
tsc -sourcemap js/_all.ts
```
```
## Ambient declarations ##
## Ambient declarations ##
It is useful to have type information for API of libraries you use. Nice collection is by [Boris Yankov](https://github.com/borisyankov/DefinitelyTyped)
It is useful to have type information for the API of libraries you use.
It's used for AngularJS interface definitions in this project.
[DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped) is a nice collection of annotations by Boris Yankov.
## Files ##
## Files ##
All `.ts` are source code.
*`*.ts` are source code.
All `.js` files are generated by compiler, except files in js/libs folder.
*`*.d.ts` are ambient declarations for libraries.
All `.d.ts` are ambient declarations for libraries.
*`_all.ts` is used to enumerate add file references in the project for benefit of TypeScript compiler.
File `_all.ts` is used to enumerate add files in the project for benefit of TypeScript compiler.
*`*.js` are generated by compiler, except in `js/libs` folder.
If number of files grows, you could put `_all.ts` file into each folder, move all nested references to it and reference nested `_all.ts` from parent `_all.ts`.
*`*.js.map` are [source maps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) generated by compiler, for better debugging experience.
Start reading `TodoCtrl.ts` first and continue with `Application.ts` and `Index.html`, rest of it is easy.
If the number of files grows, you could put an `_all.ts` file into each folder, move all nested references to it and reference the nested `_all.ts` from the parent `_all.ts`.
AngularJS knowledge is steeper learning curve than TypeScript.
Start reading `TodoCtrl.ts` first and continue with `Application.ts` and `Index.html`, the rest of it is easy.
## AngularJS ##
AngularJS has a steeper learning curve than TypeScript.
There is very litte difference between this project and AngularJS TODO, in the way how AngularJS is used.
Only significant difference is, that dependency injection is done via annotated constructors, which allows minification of javascript.
It's definitely possible to convert vanillajs TODO into TypeScript.
## AngularJS ##
There is very little difference between this app and the vanilla AngularJS todo app in how AngularJS is used.
The only significant difference is that dependency injection is done via annotated constructors, which allows minification of JavaScript.
But demonstration TypeScript's benefit is clearer with **full blown framework and project structure**.
It's definitely possible to convert the vanillajs todo app into TypeScript, but TypeScript's benefits are more obvious with a *full blown framework and project structure*.
AngularJS documentation and tutorials are worth reading in detail.