Splitting Across Files As our application grows, we’ll want to split the code across multiple files to make it easier to maintain.
Merging Interfaces The simplest, and perhaps most common, type of declaration merging is interface merging. At the most basic level, the merge
Using Class Types in Generics When creating factories in TypeScript using generics, it is necessary to refer to class types by their constructor
Generic Constraints If you remember from an earlier example, you may sometimes want to write a generic function that works on a set of types
Destructuring Another ECMAScript 2015 feature that TypeScript has is destructuring. For a complete reference, see
this and arrow functions In JavaScript, this is a variable that’s set when a function is called. This makes it a
Add NPM dependencies Add the following "dependencies" to package.json to install Angular 2 and SystemJS:
Add TypeScript The next step is to add a folder for TypeScript.
Return Types of Callbacks Don’t use the return type any for callbacks whose value will be ignored:
Gulp If you’re using Gulp in some fashion, we have a tutorial on using Gulp
Page 8 of 29