Learning a new programming language is hard. Learning one that adds a whole type system on top of JavaScript — while also introducing async/await, a new module system, and a different runtime — is harder.
From Ruby to TypeScript skips the abstract theory and teaches TypeScript the way a Rubyist actually learns: by mapping every TypeScript concept back to Ruby. console.log replaces puts. Template literals replace string interpolation. interface replaces duck typing. async/await replaces threads and fibers. try/catch replaces begin/rescue. And types — the biggest mental shift — are introduced step by step, with Ruby analogies at every turn.
Each chapter starts with Ruby code you already understand, then shows the TypeScript equivalent — complete, runnable, and explained line by line. You'll build types, classes, interfaces, async pipelines, and generics from the ground up, with hands-on exercises at every step.
TypeScript has become the lingua franca of modern web development. React, Next.js, Angular, Vue, Deno, Bun, VS Code — all built with TypeScript. Companies like Airbnb, Shopify, Slack, and Microsoft run it in production at scale. It has been battle-tested and proven — a mature, powerful language to build your career on.
Updated for TypeScript 5.x, this edition covers strict mode, ES modules, async/await, discriminated unions, utility types, generics, Zod validation, and the modern toolchain (tsx, ts-node, vitest) — everything you need to write production TypeScript in 2026.
This book was written with a Rubyist in mind. Every learning metaphor is based on Ruby. If you know Ruby and want to add TypeScript to your toolkit — for full-stack development, backend services, or your next career move — this is the book.
Take the Course
Want to go further? The companion course turns this book into a guided learning path with chapter quizzes, a final exam and a certificate of completion: From Ruby to TypeScript: The Course