TypeScript 1.8 is out and it’s time to dig in and get your hands dirty again! Some cool new features and nice updates. I’ll just demo the new type parameter constraints which make your typings even more powerful.
This week Microsoft announced the release of TypeScript 1.7. One of the neat features this introduces is support for ES7 async/await functions. This provides another useful method of doing asynchronous programming or developers! Check out this video to get a gentle introduction into how you might you async/await patter in your own code.
This week I want to talk a little bit about the tool I use for demos, which is TSUN, a TypeScript REPL. It’s a great tool that I use to test out some TypeScript or to help me debug some odd type issues I might run into when I’m writing TypeScript code.
A quick intro to TypeScript Classes.
TypeScript generics are a incredibly powerful feature of TypeScript. They allow you to add some nice constraints to your development workflow that go hand-in-hand with the power of types in TypeScript.
You can be sure your code works as expected by using typed arguments in your TypeScript code. You can even create interfaces to define what your arguments should look like and the TypeScript compiler will make sure your code adheres to that contract. This is one step forward in learning Type-Driven-Developement with TypeScript!
We’re going to talk about Interfaces in TypeScript today! Interfaces are used in lots of languages like Java and C#. Used correctly, they can become a great tool alongside strong type checking to validate that your code is doing what you expect it to do. TypeScript interfaces are a compiler tool to help you write…
Declared variables in TypeScript are strongly typed, meaning that if you declare a variable as one type, you can’t reassign it to another type. You have simple variable statements. You also have let and const declarations. Enjoy this quick bite-sized intro to TypeScript declarations. Photo attribution: https://www.flickr.com/photos/mspell/4528694882/
A recent addition to TypeScript 1.6 was the inclusion of abstract classes. If you are not familiar with abstract classes, Microsoft has a nice descriptionhere. The key is that abstract classes cannot be instantiated on their own. Their purpose in life is to be extended and are used as a base class for other classes.