How to Troubleshoot Apps for the Modern Connected Worker
Using type script to build better apps
1. Using TypeScript To Build
Better JavaScript Apps
Kurt Wiersma
@kwiersma
kwiersma@mac.com
2. Who am I?
• From Minneapolis, MN
• Have been developing web apps for over 14 years
• Have used Python, Groovy, Java, C#, CFML
• Favorites: Python/Django, C#/MVC, AngularJS,
TypeScript
3. Agenda
• What is TypeScript?
• Syntax
• Getting Started
• Comparisons
• Why would you want types?
• Working with JavaScript libraries
• Tooling
5. • TypeScript lets you write JavaScript the way you really
want to.
• TypeScript is a typed superset of JavaScript that
compiles to plain JavaScript.
• Any browser. Any host. Any OS. Open Source.
• http://typescriptlang.org
12. Why would you want types?
• Structure for large code bases and/or teams
• Catch errors early
• Provide a structured API
• Tooling can provide better code completion &
refactoring
13. What about existing
JavaScript Libraries?
• DefinitelyTyped provides TS definitions for tons of JS
libraries
• JQuery, Angular, Node, Ember, Backbone, ect.
• http://definitelytyped.org
• You can write you own definitions easily
• TSD tool to manage definitions
18. Making My App Better
• Gradually moved over my JS to TS
• Added types and better structure to code along the
way
• Made working with Angular's API easier to learn
20. Key Points
• Javascript is valid TypeScript
• TypeScript is following ECMA Script 6
• Types are optional
• TypeScript does NOT force you to do classes and
interfaces!
• Refactoring! Tooling!