Account
Computer Science & Technology

Learning TypeScript

Enhance Your Web Development Skills Using Type-Safe JavaScript

Learning TypeScript by Josh Goldberg: master the type system, unions, and narrowing to write type-safe JavaScript with confidence.

  • 187pages
  • 3chapters
  • Firstedition

This book is for you if you are

  • a JavaScript developer ready to adopt TypeScript in real projects
  • a front-end or full-stack engineer who wants types you can actually trust
  • a team lead standardizing type safety across a shared codebase

Why this book

Learning TypeScript is Josh Goldberg's practical guide to writing type-safe JavaScript, published by O'Reilly Media in 2022. It takes you from plain JavaScript habits into a working command of the TypeScript type system, without asking you to abandon the language you already know. Goldberg writes as a contributor to the TypeScript ecosystem who has spent years helping teams adopt it, so the material stays close to the problems you meet in real projects.

Most pages about this book stop at a blurb or a price tag. This edition gives you the substance: how types are inferred, how unions narrow under control flow, and how the compiler's messages translate into fixes you can apply. You get the foundation chapters that carry the rest of the language — From JavaScript to TypeScript, The Type System, Unions and Narrowing — in the order the author intended, not scattered across blog posts.

  • Moves you from JavaScript to TypeScript without dropping the JavaScript you already write
  • Explains the type system from inference outward, so later annotations feel earned rather than memorized
  • Treats unions and narrowing as a core skill, which is where most real-world type errors originate
  • Written by an author active in the TypeScript tooling community, with O'Reilly's editorial review behind it
  • Consistent First Edition text, so every example matches the printed edition you are reading

Readers who get the most from it are front-end and full-stack developers already fluent in JavaScript who want types they can trust, along with team leads standardizing a codebase. Get your copy today.

What you'll learn

  • Migrate an existing JavaScript codebase to TypeScript incrementally
  • Interpret inferred types and know when an annotation pays for itself
  • Read the type system as a set of rules rather than a list of syntax
  • Apply unions and narrowing to model real runtime states safely
  • Diagnose compiler errors and trace them back to the responsible declaration
  • Write type-safe JavaScript that survives refactoring and team handoff

Not the right book for: readers who want an advanced generics and compiler-plugin deep dive

Questions about this book

Do I need to know TypeScript before reading Learning TypeScript?

No. The book opens with moving from JavaScript to TypeScript and assumes working JavaScript knowledge rather than prior type system experience.

How does the book explain unions and narrowing?

It treats them as a core part of the type system, showing how union types combine and how control-flow narrowing makes their members usable without casting.

Is this book about the type system or about tooling setup?

The focus is the type system itself — inference, unions, and narrowing — so the concepts carry over to whatever build setup your project uses.

Can I use it to convert an existing JavaScript project?

Yes. The opening chapter covers the move from JavaScript to TypeScript, which is the path most teams take when adding types to a live codebase.

Can I get it in another format?

Yes. You get the PDF right away. Need EPUB, Kindle, Word or any other format? Email support@ebooksonline.si with your order number and we send it.

Does it work on Kindle?

Yes. Email support@ebooksonline.si with your order number and we send you a Kindle-ready file.

How many times can I download it?

As many times as you like. Sign in to your account and download it again at any time.

What if the file does not work?

Contact us with your order number and we will fix it or refund you.

Contents

  1. 1From JavaScript to TypeScript
  2. 2The Type System
  3. 3Unions and Narrowing

Details

Author
Josh Goldberg
Publisher
O'Reilly Media, Inc.
Edition
First edition, 2022
ISBN
9781098110260
Pages
187
Language
English
Formats
PDF (EPUB, Kindle or any other format on request)
File size
1.33 MB
Licence
Personal use, keep forever

Josh Goldberg

Josh Goldberg is the author of Learning TypeScript, published by O'Reilly Media in 2022.

Buy with confidence

If your file does not open or download, we fix it or refund you. Read the refund policy.

More in Computer Science & Technology

See all

Think Bayes

Allen B. Downey

PDF · 338 pages

$9.99 Regular price $30.99 −68%

You save $21.00

Add to cart
Cover of 10-Minute Focus by Daniel Walter

Get a free ebook

Join the list and get 10-Minute Focus free, plus a short note when new books arrive.

Your cart

No products in the cart.

Subjects

More

Look inside

Sample