TypeScript for Angular Developers
Many developers learn TypeScript almost accidentally, as a side-effect of learning frameworks like Angular.
This course is designed to help developers to understand and embrace TypeScript as a helpful tool for building Angular applications. You can get quite far with TypeScript based on your knowledge of programming languages like JavaScript, C#, or Java - this course will teach you to write TypeScript code without an “accent”, so to speak. TypeScript has a lot to offer above and beyond those other languages, and this course will help you get there.
A stumbling block for a lot of developers moving from languages like C# or Java is the emphasis on functions and functional programming idioms in TypeScript, as well as its seemingly alien idea of “types”. Unlike C#, or Java, in JavaScript functions are “first class citizens”, and so they are very prominent in web programming. Believe it or not, TypeScript makes the kind of programming JavaScript programmers have done for decades easier and just as importantly, safer. As for types, a skilled programmer will use them to improve the reliability of their code and as a way to minimize the need for other lower-level testing, like unit tests as well as make that code more approachable, understandable, and elegant for other developers on your team.
In this course, we will take a bit of time to actually learn “the way of TypeScript”. In other languages, like C#, we use things like classes and maybe some interfaces to build a solution, in TypeScript we create various types, and to advanced TypeScript developers, these types allow us to:
- Express clearly the intention of our code, and allow us confidence in changing our mind without breaking things (fearless refactoring!).
- Create self-documenting code that deflects bugs by making invalid states impossible.
- Have a stable code base that bridges the gap between our type system and the chaotic world of dynamically typed JavaScript that is running in the browser.
Who it’s for
This course is for Angular developers with a bit of TypeScript experience.
This course is perfect for developers that have reached the stage in their TypeScript programming career where they have a combination of annoyance with the constant errors and warnings from TypeScript and a curiosity about why everyone thinks it is so great.
Developers with little or no TypeScript experience will benefit from this course, but it is not designed to teach you everything you need to know to build a specific type of application that uses TypeScript. Some familiarity with your “goal” - for example, knowing you will be using TypeScript for Angular development, or for AWS Lambda development, and having a little background on whatever target technology you will apply what you learn here is essential.
How it runs
Three days, live and online.
For this class you will be provided with a pre-configured Virtual Machine. We will use (primarily) Visual Studio Code for writing TypeScript code, and use Git and GitHub for source code control. If you use tools other than this, it might be helpful to read up on these tools a bit before class. You don’t need to be a master at either, but knowing your way around a bit will allow you to focus better on the material at hand.
You will be provided with complete classroom notes, materials, and some review videos on certain topics for later use.
What you’ll be able to do
- Read what the compiler produces, and configure
tsconfig.jsonon purpose. - Write TypeScript in both object-oriented and functional styles, and know when each fits.
- Model your domain with your own types (unions, discriminated unions, generics) so invalid states can’t be represented.
- Derive new types from existing ones with utility, mapped, and template literal types.
- Replace
anywithunknownand narrowing, and stop feeling guilty about it. - Validate data from the outside world with Zod, because your types don’t exist at runtime.
- Package and version TypeScript libraries for other teams.
- Recognize idiomatic TypeScript in Angular and the libraries around it.