Why did we choose TypeScript?

When building an Angular (v2) application, you have a choice of using TypeScript, Javascript or Dart. Here's why we chose TypeScript:

  1. TypeScript is the recommended language to use for Angular. See https://angular.io/ which defaults to TypeScript examples (unless you request otherwise)
  2. Angular (v2 and above) is itself written in TypeScript. One of the Angular developers describes why they made that decision is in post Writing Angular 2 in TypeScript
  3. TypeScript is gaining a strong following. It was written by Microsoft. But Google is now recommending it and using it over their own competitor Dart. More info: https://jaxenter.com/angular-typescript-dart-115426.html
  4. TypeScript is a superset of Javascript itself and can be compiled into clean Javascript code. This means that if it should ever go away, we could migrate easily to Javascript. See http://www.typescriptlang.org/ for more.
  5. TypeScript supports the latest features of Javascript (again see http://www.typescriptlang.org/)
  6. Code in TypeScript is more similar to Java (i.e. DSpace backend) than it would be if we used Javascript or Dart. It also make more easily readable code than Javascript.

Other references on this question:

How do we recommend writing TypeScript code for this app?