Final notes

It's important to point out the cool features we used in these examples once more:

  • Classes
  • Accessors
  • Visibility
  • Arrow functions (callbacks):
var fooFunc = (arg1) => {    return arg1}
  • The const keyword for variable declarations instead of var
  • Destructuring :
const {id} = <HTMLElement>e.target;

Get TypeScript 2.x for Angular Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.