04 / Guides

TypeScript Ramp-Up Guide

TypeScript Ramp-Up Guide

A compact guide for senior engineers who already build production systems in other languages and now need TypeScript quickly.

If you have shipped services in Rust, Go, Python, Java, or C#, the gap is not software engineering. Async, API design, architecture, testing, data modeling, and observability transfer directly. The gap is the TypeScript type system and its ecosystem, and that part is learnable in days, not months.

How to Use This Guide

Read the pages in order. You can skim anything that maps cleanly onto a language you know and slow down on the parts that do not. For each topic, aim to answer:

  1. What problem does this feature solve?
  2. What does idiomatic TypeScript prefer?
  3. Where does it differ from the languages I already know?
  4. Can I write a tiny example from memory?

What Is Genuinely New

For an experienced engineer, only a few things are actually new:

  • TypeScript types are erased at runtime. The type system is a compile-time layer over JavaScript, not a runtime guarantee.
  • The type system is structural, not nominal. Compatibility is based on shape, not declared inheritance.
  • The type system is unusually expressive. Discriminated unions, generics, mapped types, and conditional types let you encode real constraints.
  • The runtime is JavaScript, with single-threaded event-loop concurrency and one error model.

Everything else is ecosystem familiarity.

Phase 1 — The Type System

  1. Mental Model: What TypeScript Is and Is Not
  2. The Type System Core
  3. Discriminated Unions and Exhaustiveness
  4. Generics and Constraints
  5. Mapped, Conditional, and Utility Types
  6. Narrowing: unknown, any, and Type Guards

Phase 2 — Language and Runtime

  1. Async and Concurrency
  2. Modules, tsconfig, and the Build Story

Phase 3 — Backend TypeScript

  1. Backend Stack: Node, Hono or Fastify, Drizzle, Postgres
  2. Validation at the Boundary with Zod

Phase 4 — Frontend TypeScript

  1. Frontend: React and TanStack

Phase 5 — Ship and Interview

  1. Tooling and Testing
  2. Capstone Project and Interview Framing
  3. Grounding and References

Fastest Practical Plan

A focused two-week sprint is enough to interview well if the rest of your portfolio is strong.

  • Week 1: the type system. Work through phases 1 and 2 and write small examples until the syntax stops surprising you.
  • Week 2: build one full-stack project end to end (phases 3 and 4) and wire up the tooling.

Default Target Stack

If you do not know where to start, aim for this combination:

TypeScript (strict) + Node.js + Hono + Drizzle ORM + PostgreSQL + Zod + Vitest, and React + TanStack Query and Router on the frontend.

It is modern, widely used, and maps cleanly onto patterns you already know from other backends.

Grounding

This is a ramp-up guide, not a replacement for the official documentation. The pure-TypeScript examples in this guide were type-checked under strict mode. For authoritative references and verification notes, see Grounding and References.

3 min read

01 — Mental Model: What TypeScript Is and Is Not

TypeScript is a structural, erasable type layer over JavaScript. Understanding what survives to runtime is the single most important shift for an experienced engineer.

3 min read

02 — The Type System Core

type aliases, interfaces, unions, intersections, literals, and the everyday vocabulary you use to describe data in TypeScript.

3 min read

03 — Discriminated Unions and Exhaustiveness

Discriminated unions are how idiomatic TypeScript models state, results, and events, with the compiler enforcing that you handle every case.

3 min read

04 — Generics and Constraints

Generics in TypeScript, constraints with extends, default type parameters, and how inference flows through generic functions.

3 min read

05 — Mapped, Conditional, and Utility Types

The type-level toolkit: built-in utility types, how mapped types build them, and conditional types with infer for the cases the utilities do not cover.

3 min read

06 — Narrowing: unknown, any, and Type Guards

How TypeScript narrows types through control flow, why unknown beats any, and how to write user-defined type guards and assertions.

3 min read

07 — Async and Concurrency

Promises, async/await, the single-threaded event loop, structured concurrency with Promise combinators, and where worker threads fit.

3 min read

08 — Modules, tsconfig, and the Build Story

ESM versus CommonJS, how TypeScript compiles, the tsconfig options that matter, and the modern runners that skip the build step in development.

3 min read

09 — Backend Stack: Node, Hono or Fastify, Drizzle, Postgres

A modern TypeScript backend that maps onto patterns you already know: an HTTP framework, a typed query layer with Drizzle, and PostgreSQL.

3 min read

10 — Validation at the Boundary with Zod

Because types are erased at runtime, you validate external input with a schema library. Zod is the common choice and bridges runtime checks back into types.

6 min read

11 — Frontend: React and TanStack

React with TypeScript for backend engineers, the TanStack Query concepts interviewers probe, and how Router and Query integrate through loaders and a shared cache.

3 min read

12 — Tooling and Testing

The everyday TypeScript toolchain: package managers, tsc as a gate, ESLint and Prettier, Vitest, and the lint rules that prevent the most common mistakes.

3 min read

13 — Capstone Project and Interview Framing

One full-stack project that exercises the whole stack, plus how a senior engineer from another ecosystem should frame their TypeScript readiness.

2 min read

14 — Grounding and References

Authoritative references used to ground the TypeScript Ramp-Up Guide, plus how the pure-TypeScript examples were verified.

00 / The Agent

The chat box that lives on the blog.

running on Cloudflare · free tier

A tiny JS island posting to a Cloudflare Worker that streams answers from a free Nemotron endpoint. No origin server. No database. The static site stays static — this one box is the only thing that breathes.