NodeConf.eu 2019 TypeScript Workshop
The TypeScript type system is very powerful and dynamic. It allows you to go from very simple types to very advanced types with a very low adoption curve.
JavaScript developers with TypeScript skill levels ranging from beginner to competent.
Playground: https://www.typescriptlang.org/play/
Node.js, TSC, Visual Studio Code
The purpose of this workshop is to gain unique insight into TypeScript and how it works.
This is not a tutorial on TypeScript.
What you'll learn here is not practical in of itself. The goal for us today is to learn more about the TypeScript type system and understand what it is capable of.
In this workshop, you will:
- Set basic variables with simple types.
- Write type definitions via interfaces.
- Push the limits of TypeScript by recursively defining an infinite set of type.
The first two sections build up to the activities in section three, and can be skipped by experienced users of TypeScript. Most users will never perform tasks like those in section three, so this is a purely an exercise in exploring TypeScript.
1. Basics
Get started with the basics of TypeScript Types.
Start defining and using your own Types.
Now let's push the boundaries by creating a new universe of positive numbers and define the addition operation in this new universe. Then repeat the exercise but using TypeScript's type system.
- Albert Lash IV
- Philip Cavaco
- Ricardo León
Special Thanks Maxwell Heiber for inspiring this workshop with his awesome presentation of these same materials!