TypeScript in 4 Hours
Published by Pearson
Learn TypeScript Essentials and Write Effective Code Based on the Latest Language Innovations
- Learn to write effective and accurate TypeScript code
- Update your TypeScript skills to the latest version of the language
- Make use of popular TypeScript techniques and best practices
TypeScript has become the de-facto standard language for implementing client-side user interfaces. TypeScript in 4 Hours is designed to help you learn TypeScript syntax and techniques, and to make use of the latest language innovations so you can write top-class TypeScript code. This class is meant for anyone either new to TypeScript or for developers who are just “getting by” in TypeScript. Experienced trainer and author Andy Olsen will lead you through the details of the language, with plenty of demos to help you understand how to apply TypeScript in practical scenarios.
What you’ll learn and how you can apply it
- The TypeScript type system
- Object-oriented programming in TypeScript
- Asynchronous programming in TypeScript
And you’ll be able to:
- Use the latest features available in TypeScript
- Define classes, interfaces, enums, and generic types
- Manage promises effectively
This live event is for you because...
- You need to learn TypeScript to create client-side web user interfaces
- You are familiar with JavaScript and you want to extend your knowledge into TypeScript
- You want to learn about all the latest features available in TypeScript
Prerequisites
- Programming in JavaScript
- Object-oriented awareness
Course Set-up
- Download Node.js from nodejs.org
- Download course materials and demos from course website
- Install any text editor, e.g., Visual Studio Code
Recommended Preparation
- Attend: Hands-On JavaScript Deep Dive by Andy Olsen
- Watch: Learn Enough JavaScript to Be Dangerous by Michael Hartl
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Segment 1: TypeScript Essentials (30 minutes)
- TypeScript vs. JavaScript
- Transpilation
- Using simple types
- Using arrays, tuples, and enums
- Using undefined, null, and unknown
- Union types
Segment 2: Defining and Calling Functions (30 minutes)
- Typed parameters and returns
- Destructuring parameters in TypeScript
- Default parameters, optional parameters, and rest parameters
- Lambda expressions
Break (10 minutes)
Segment 3: Defining and Using Classes (30 minutes)
- How to define a class
- Constructors
- Constructor parameter properties
- Read-only properties
- Definite assignment
Segment 4: Inheritance and Interfaces (30 minutes)
- Defining superclasses and subclasses
- Inheritance techniques
- Defining interfaces to specify methods, properties, and function signatures
- Downcasting
Break (10 minutes)
Segment 5: Using Generics Effectively (25 minutes)
- Defining and using generic types
- Defining and calling generic functions
- Type constraints and inference
Segment 6: Asynchronous TypeScript (30 minutes)
- Understanding promises
- Chaining promises
- Using the async and await keywords
- Running independent tasks in parallel
Break (10 minutes)
Segment 7: Creating and using Decorators (30 minutes)
- Overview of decorators
- How to define a decorator
- Defining decorators for classes, methods, properties, and parameters
Course wrap-up and next steps (5 minutes)
Your Instructor
Andy Olsen
Andy Olsen is a freelance consultant, instructor, and developer with more than 30 years of experience in IT. Andy began his professional career as a C/C++ developer and has also worked in Rust, Go, and other languages as the years passed. Andy is actively involved in a wide range of technologies including full-stack development, cloud native applications, data science, and more. Andy is passionate about technology education and runs training courses around the world across diverse market sectors.