Understanding the benefits of TypeScript