Best Sellers Rank: #224,284 in Books (See Top 100 in Books) #37 in JavaScript Programming (Books) #248 in Software Development (Books) #268 in Introductory & Beginning Programming
Customer Reviews: 4.5 out of 5 stars 97Reviews
Product Information
From the Publisher
From the Preface
Who Should Read This Book
If you have an understanding of writing JavaScript code, can run basic commands in a terminal, and are interested in learning about TypeScript, this book is for you.
Maybe you’ve heard TypeScript can help you write a lot of JavaScript with fewer bugs (true!) or document your code well for other people to read (also true!). Maybe you’ve seen TypeScript show up in a lot of job postings, or in a new role you’re starting.
Whatever your reason, as long as you come in knowing the fundamentals of JavaScript—variables, functions, closures/scope, and classes—this book will take you from no TypeScript knowledge to mastering the fundamentals and most important features of the language.
By the end of this book, you will understand:
The history and context for why TypeScript is useful on top of “vanilla” JavaScript
How a type system models code
How a type checker analyzes code
How to use development-only type annotations to inform the type system
How TypeScript works with IDEs (Integrated Development Environments) to provide code exploration and refactoring tools
And you will be able to:
Articulate the benefits of TypeScript and general characteristics of its type system.
Add type annotations where useful in your code.
Represent moderately complex types using TypeScript’s built-in inferences and new syntax.
TypeScript is a wildly popular language in both industry and open source:
GitHub’s 2021 and 2020 State of the Octoverses have it at the platform’s fourth top language
StackOverflow’s 2021 Developer Survey has it at the world’s third most loved language
The 2020 State of JS Survey shows TypeScript has consistently high satisfaction and usage amounts
Navigating this Book
Learning TypeScript has two purposes:
You can read through it once to understand TypeScript as a whole.
Later, you can refer back to it as a practical introductory TypeScript language reference.
This book ramps up from concepts to practical use across three general sections:
Part I, “Concepts”: How JavaScript came to be, what TypeScript adds to it, and the foundations of a type system as TypeScript creates it.
Part II, “Features”: Fleshing out how the type system interacts with the major parts of JavaScript you’d work with when writing TypeScript code.
Part III, “Usage”: Now that you understand the features that make up the TypeScript language, how to use them in real-world situations to improve your code reading and editing experience.