Skip to content
C Codeloom

Topics / TypeScript

TypeScript

Type-safe JavaScript. Types, generics, and real-world patterns.

Why learn TypeScript?

  • Catches a class of bugs at compile time that JavaScript only finds in production.

  • Industry-standard for any non-trivial JS codebase in 2026.

  • Editor autocomplete and refactoring become dramatically better.

  • Adopts incrementally — drop it into existing JS one file at a time.

What you can build with TypeScript

Large-scale React/Next.js apps Node.js backends Shared types between frontend and backend Library authoring

TypeScript tutorials

15 articles

Hand-written tutorials, ordered as a recommended learning path.

  1. 01 What is TypeScript? A clear, professional introduction to TypeScript — what it is, how it relates to JavaScript, why teams adopt it, and what you can build with it as a beginner.
  2. 02 Basic Types A complete beginner's tour of TypeScript's primitive types, arrays, tuples, literal types, any, unknown, and the null and undefined story — with runnable examples.
  3. 03 Interfaces & Type Aliases A complete beginner's guide to interfaces and type aliases in TypeScript — how to declare object shapes, when to choose each, and how to extend and combine them.
  4. 04 Typing Functions A practical, beginner-friendly guide to typing functions in TypeScript — parameter and return types, optional and default parameters, rest parameters, callbacks, and overloads.
  5. 05 Generics Basics A clear, runnable introduction to TypeScript generics — what they are, why they exist, how to write generic functions and types, and how constraints keep them honest.
  6. 06 Enums & Literals A practical guide to enums and literal types in TypeScript — string enums, number enums, const enums, literal unions as a lighter alternative, and discriminated unions.
  7. 07 Utility Types A practical guide to TypeScript's built-in utility types — Partial, Required, Readonly, Pick, Omit, Record, ReturnType, and Awaited — with real-world patterns for APIs and forms.
  8. 08 Narrowing & Guards A practical guide to narrowing in TypeScript — typeof, instanceof, in, discriminated unions, custom predicates with `x is T`, assertion functions, and exhaustive checks with never.
  9. 09 Modules & Imports A practical guide to TypeScript modules — ESM imports and exports, type-only imports, default vs named exports, barrel files, and how tsconfig moduleResolution decides what gets resolved.
  10. 10 Conditional Types T extends U ? X : Y, distribution over unions, and the infer keyword — the three rules that build every advanced TypeScript utility.
  11. 11 Mapped Types Build Partial, Readonly, Pick, and Record yourself with mapped types, modifier control, and key remapping — the toolkit behind every utility type.
  12. 12 Branded Types Add nominal typing to TypeScript using branded types so you cannot accidentally mix UserId, OrderId, raw strings, or money values.
  13. 13 Decorators Understand TypeScript's modern standard decorators: how they differ from the legacy proposal, the context API, and practical class and method examples.
  14. 14 satisfies Learn how the TypeScript satisfies operator keeps narrow inferred types while still validating against a wider constraint, with practical examples.
  15. 15 Template Literal Types Master template literal types to model string patterns, build type-safe APIs around route paths, event names, and CSS values in TypeScript.