cover.jpg

Preface

This book aims to introduce you to TypeScript, a superset (or “version”) of JavaScript that’s used by most companies working with this technology.

JavaScript is the most popular programming language of the world. It powers every single website you visit.

If you’re new to JavaScript, read my JavaScript Handbook first.

TypeScript provides a set of features built on top of JavaScript that greatly improve the DX (Developer Experience) by adding static typing.

Variable types are checked at compile-time before the code is run, which helps catch type-related errors early in the development process.

This greatly improves the experience of working within an editor, as the editor is now equipped with more information about your code, and can help you prevent errors, with the help of TypeScript’s tooling.

Many of those errors that the editor can highlight couldn’t be detected with plain JavaScript.

This is not the only feature of TypeScript, but to me it’s the best one.

TypeScript provides many language features over JavaScript, while still maintaining backwards compatibility (valid JavaScript is also valid TypeScript).

In this handbook we’ll talk about many of those features, in a way that’s easy to understand as a novice.

You’ll learn the basic concepts in a very straightforward way, without too much jargon or complicated explanations, using an 80/20 approach that give you the mental models and knowledge to start using TypeScript.

The book was published late 2024.

Legal

Flavio Copes, 2024. All rights reserved.

Downloaded from flaviocopes.com.

No part of this book may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.

The information in this book is for educational and informational purposes only and is not intended as legal, financial, or other professional advice. The author and publisher make no representations as to the accuracy, completeness, suitability, or validity of any information in this book and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its use.

This book is provided free of charge to the newsletter subscribers of Flavio Copes. It is for personal use only. Redistribution, resale, or any commercial use of this book or any portion of it is strictly prohibited without the prior written permission of the author.