Hi there, I'm Azat MARDAN, your tour guide on this merry adventure of TypeScript faux pas. If you're wondering who the heck I am and why you should trust me, that's a fantastic question. I'm the author of the best-selling books Pro Express.js, Full Stack JavaScript, Practical Node.js and React Quickly. For those who are not in the habit of browsing bookstores, those are indeed about JavaScript, Node.js, and React, not TypeScript. But don't let that lead you into a false sense of security. I’ve seen enough TypeScript in the wild during my tech stints at Google, YouTube, Indeed, DocuSign and Capital One to fill an ocean with semicolons. Or maybe more accurately, to forget to fill an ocean with semicolons... but more on that later.
If you're still wondering, "Well, Azat, how did you manage to master yet another web technology to the point of writing a book about it?" I'll let you in on my secret. The secret is, I make a lot of mistakes. An impressive amount, really. Enough to write a book about them. And every mistake, from the tiniest comma misplacement to the catastrophic data type mismatches, has added a new layer of depth to my understanding of the JavaScript and TypeScript ecosystem. One might think after writing code at such high-profile companies like Google and Amazon, I'd be too embarrassed to publicly document the many ways I've goofed up. But you see, dear reader, I believe in the power of failure as a learning tool. Therefore, this book is an homage to my countless mistakes and the invaluable lessons they've taught me.
To be clear, I wrote "50 TypeScript F*ck Ups and How to Avoid Them" not because I like pointing out people's mistakes, but because I wanted to help you avoid the same pitfalls I encountered when I was in your shoes. I also wanted to reassure you that making mistakes is just a part of the learning process. Every single typo, missed semicolon, and misuse of a null vs undefined (yes, they are different, very different) is a step toward becoming a TypeScript maestro.
In this book, we'll confront those mistakes head-on, dissect them, learn from them, and hopefully have a few laughs along the way. And don't worry, I've committed most of these blunders at least once, some of them probably twice, and in rare embarrassing cases, three times or more!
So, whether you’re a TypeScript greenhorn or a seasoned code gunslinger, get your code editors ready, grab a cup of your strongest coffee, and prepare to embark on a journey through the treacherous terrain of TypeScript that is hopefully as enlightening as it is entertaining. And remember that TypeScript developers never get lost because they always have a map()
! :-) So, here's to a hundred mistakes that you'll never
make again. Without further ado, let's embark on this adventure that we’ll call TypeScript. Happy reading and happy coding!
Cheers, Professor Azat MARDAN, Distinguished Software Engineer Microsoft Most Valuable Professional, Author of React Quickly, Practical Node.js, Pro Express.js and Full Stack JavaScript