Use before_script instead of script to build docs, or else Travis doesn't run npm test
Updated typescript to v1.4.0

- Union types.
- Switched default lib to lib.es6.d.ts
Use template strings.
Switched to in-development TypeScript compiler.
Use destructuring assignment and shorthand property names.