What’s new in Typescript? By Bill Ticehurst
Hard to work in code bases with lack of types. Hard to debug.
ES 6 sounds futuristic. Once you get used to it, it’s hard to go back.
Static types allow better documentation which in turn gives better tooling. Allows jumping around points in code easier.
Types are optional. Don’t need to have types everywhere. Kinda like code coverage. Do what you need.
Now showing demos. There’s a plugin available for sublime which helps writing Typescript easier. Now urging audience to find bugs in presented demo code. Interfaces help debug code as it sets expectations for assignable types.
Live stack trace. Bugs and trace disappears as you fix them. How cool is that?
Debugging in this thing is amazing. Errors are helpful and intellisense is better as the code knows things!
A variable can have more than one type. Like string or a string array. In this case, the Typescript expects common methods in both types to be valid. If specific methods needs to be used then need to cast or parse it.
“this demo has blown my mind.”
Now showing a demo with angular.
Imports works dynamically with node modules. It just works!
Urging developers to start distributing Typescript files along with their modules.
Decorators are able to interfere with the declaration of an object. Logger decorator injects function before execution of the target function.
Reflection API. Decorators don’t modify the object but adds metadata using the reflection API.
Powerful project wide find references tooling + variable name refactoring. “is this available in all Typescript plugins?”
ES 6 async and await looks incredibly powerful way to control async functions execution flow.
Waits for all promises to be fulfilled before executing any of the remaining code.