Skip to main content

The #1 TypeScript book for JavaScript developers out today

By Josh Goldberg
Book cover: Learning TypeScript: Enhance Your Web Development Skills Using Type-Safe JavaScript

Learning TypeScript will take you from knowing nothing about "types" or a "type system" to full mastery of the fundamentals of TypeScript.

Get it on:

Articles

Top tips and tricks for why TypeScript behaves the way it does, and how you can work effectively with it.

Branded Types
How the concept of branded types allows describing primitives more precisely than TypeScript normally allows.
Tags: brands, type brands, unions, discriminated unions, numbers, strings
Why TypeScript Doesn't Include a `throws` Keyword
Why a `throws` keyword has not been added to TypeScript, despite some other languages having an equivalent.
Tags: checked exceptions, errors, throw, throw types, try catch
Narrowing Function Parameters With Rests And Tuples
Using rest parameters and tuples to apply union type narrowing to a function's parameters
Tags: arguments, functions, parameters, rest, spread, tuples, unions
Why TypeScript Doesn't Follow Strict Semantic Versioning
Why it's not practically feasible -or desirable- for a programming language like TypeScript to use strict semantic versioning for its releases.
Tags: ECMAScript, compiler options target, TSConfig
Why Increase Your TSConfig `target`
Why you should increase the compilerOptions.target value in your TSConfig to as recent an ECMAScript version as you can.
Tags: ECMAScript, compiler options target, TSConfig
The `satisfies` Operator
How TypeScript's new `satisfies` operator brings the best of type annotations and default type inference.
Tags: assertions casts declarations satisfies
Objects, Functions, and Type Narrowing
Diving into why TypeScript doesn't narrow object types before they're modified.
Tags: objects, narrowing, variables
Extreme Explorations of TypeScript's Type System
Some of the most creative, wacky explorations of what you can do in TypeScript's type system!
Tags: metaprogramming, type system
Void-Returning Function Assignability
Why functions that return a value are assignable to void-returning function types in TypeScript.
Tags: assignabiity, functions, void
References in the Learning TypeScript Book
An exhaustive list of all the easter eggs and general references in the Learning TypeScript book.
Tags: easter eggs, meta
See all 10 articles

Read the
Learning TypeScript
Book

Get it on O'Reilly β†—

If you find this website useful, consider diving into the full Learning TypeScript book on O'Reilly.

Go from knowing nothing about β€œtypes” or "type systems" to full mastery of TypeScript fundamentals – whether you're a beginner or advanced JavaScript programmer.

About the author

Josh Goldberg
Hi, I'm Josh! I'm a full time independent open source developer with a passion for static analysis, and the web. I'm a full time open source maintainer and work on projects in the TypeScript ecosystem such as typescript-eslint and TypeStat. I'm passionate about bringing accessible education to the masses in a sustainable way.Visit my Site β†—