TypeScript in 50 Lessons

In TypeScript in 50 Lessons, Stefan Baumgartner breaks down the quirks of TypeScript into short, manageable lessons. You’ll make sense of TypeScript concepts, tooling for TypeScript and how to get most out of it without learning a new language. Everything TypeScript explained, from start to finish. Jump to table of contents.
Written for seasoned and not-so-seasoned developers who know enough JavaScript to be dangerous, or want to dive deeper into TypeScript. With code walkthroughs, hands-on examples and common gotchas, that’s a book you might want to keep close.
You’ll learn:
- TypeScript concepts, and how to make sense of them all.
- TypeScript tooling, needed to use the language effectively.
- How to get most out of TypeScript without learning a new language.
- Structural type systems, their semantics, and why they matter.
- Low-maintenance types and how to write types once, and let them grow automatically as code evolves.
- How to bend the type system to make it fit the needs of your projects.
- TypeScript culture and how the language is evolving.
464 pages. High quality hardcover + eBook (PDF, ePUB, Kindle). Written by Stefan Baumgartner. Designed by Rob Draper. Shipping now.
Print + eBook
$ 48.75 $ 63.00Quality hardcover. Free worldwide shipping. 100 days money-back-guarantee.
“Stefan walks you through everything from basic types to advanced concepts like the infer keyword in a clear and easy to understand way. The book is packed with many real world examples and great tips, transforming you into a TypeScript expert by the end of it. Highly recommended read!”
About The Book
Every other day, one of your team members makes a case for switching from “chaotic” JavaScript to “sane” TypeScript. Maybe you rely on not-very-well-understood JavaScript libraries, or you have a large number of contributors, or the code base is difficult to maintain. The reasons are always similar, but so is the hesitance from the team. Why change the stack that seems to be working just fine?
That’s the question we’ve asked ourselves as well. So we’ve teamed up with Stefan Baumgartner, a seasoned JavaScript developer drawn to TypeScript for years, to break it all down into understandable pieces. The result is TypeScript in 50 Lessons — our shiny new book, with everything TypeScript explained, from start to finish.
First, the book gently explores TypeScript, from basic ideas to common techniques and advanced strategies. Then, right around the midpoint, we’ll take the leap into structural type systems and why they are so useful for your work. Then we’ll dive into working with types, typing functions, union and intersection types, generics, conditional types and wrap up with thinking in types. Download a free sample PDF (2.3 MB).
Who is this book for?
It’s for developers who know enough JavaScript to be dangerous. If you are spending an increasing amount of time programming and want to be more productive, that’s the book you. With TypeScript, you can get more out of your JavaScript code – for yourself and your colleagues.
The book is also for developers who dipped their toes into TypeScript and now want to get their feet wet. If you want to learn about type systems and how they can be used to define complex JavaScript scenarios, this book will help you, too. This knowledge will ultimately become language-independent, preparing you for different programming languages that have elaborate type systems.
If you ever find yourself:
- writing JavaScript with libraries and frameworks you barely know
- writing JavaScript with other developers
- writing JavaScript that deals with back-end data
- writing JavaScript that your future self has to continue working on
...then TypeScript will do right by you.
Written by Stefan Baumgartner. Shipping now.

Print + eBook
$ 48.75 $ 63.00Quality hardcover. Free worldwide shipping. 100 days money-back-guarantee.
Table of Contents
- TypeScript for Smashing People
- Working with Types
- Functions
- Union and Intersection Types
- Generics
- Conditional Types
- Thinking in Types

About The Author
Stefan Baumgartner is a software architect based in Austria. He has published online since the late 1990s, writing for Manning, Smashing Magazine, and A List Apart. He organizes ScriptConf, TSConf:EU, and DevOne in Linz, and co-hosts the German-language Working Draft podcast.

Technical Details
- 464 pages
- Quality hardcover with stitched binding and ribbon page marker
- ISBN: 978-3-945749-90-6
- Free worldwide airmail shipping from Germany. Please note that due to Covid-19 and import restrictions, there could be unexpected delays. But of course you can download the eBook and start reading right away.
- Release: October 2020
Print + eBook
$ 48.75 $ 63.00Quality hardcover. Free worldwide shipping. 100 days money-back-guarantee.
Frequently Asked Questions
If you have any questions, we are right here to answer them. We love our customers, and we’d love to help you in any way or just listen to your story. So please feel free to ask questions via @smashingmag on Twitter — we’ll get back to you right away. Just in case: here are answers to some frequently asked questions.
- How much does shipping cost to my country?
- Delivery times to my country?
- Is the eBook included with print?
- What payment methods are accepted?
- Is there a money-back guarantee?
- I have a question that is not covered here.
More Books
Success At Scale
Interface Design Checklists
166 practical cards for common interface design challenges.
Understanding Privacy
How to put your users first and make a better web.
Touch Design for Mobile Interfaces
Want to learn how to improve the design of your mobile digital products? Learn how touchscreen devices really work — and how people really use them.
Image Optimization
Deliver high-quality responsive images in the best format and size, and at the moment your users need them.
Click!
A guide to increasing conversion and driving sales sustainably.
The Ethical Design Handbook
A practical guide on ethical design for digital products.
Inclusive Components
Handbook for building robust, accessible interfaces.
Smashing Print
A printed magazine designed to make you think.
Art Direction for the Web
Creating engaging, art-directed experiences on the web.
Smashing Book 6
Exploring new frontiers in front-end and design.
Design Systems
Create effective design systems that empower teams to create great digital products.
Form Design Patterns
Designing and coding inclusive and usable web forms.
User Experience Revolution
Help organizations understand and embrace digital.
White Hat UX
How to avoid dark patterns and improve user experience.
Digital Adaptation
Helping traditional companies embrace and make use of digital.
Inclusive Design Patterns
Creating bulletproof, accessible HTML/CSS components.
Smashing Book #5
Smart responsive design techniques from real projects.
The Sketch Handbook
Everything you need to know to understand and use Sketch.