Ionic and TypeScript: Part 2
In our most recent screencast, we talked about future-proofing your app. We converted our JavaScript to TypeScript and created a simple build step to compile everything back. Now, let’s look at how we can use TypeScript’s static types to annotate our code. We’ll add definition files for Ionic and start getting code completion in our editor.
Adding TSD
$ sudo npm install -g tsd
$ tsd install ionic cordova --save
Reference the definition files
controller.ts
/// <reference path="../typings/tsd.d.ts" />
Additional Notes
Follow up videos
In my next post we’ll walk through converting our controllers to something more class like.