Languages

TypeScript Cheat Sheet

Print-ready cheat sheet for TypeScript, organized for fast lookup, study, and desk-side use

Source
TypeScript Documentation (typescriptlang.org)
License
MIT
Updated
2026-03-27

Sample

What's in this cheat sheet

  • Basic Types
  • Arrays & Tuples
  • Interfaces
  • Type Aliases
  • Unions & Intersections
  • Functions
  • Generics
  • Enums
  • Type Guards
  • Utility Types

Primitives

let name: string = "Alice";
let age: number = 25;
let active: boolean = true;
let data: null = null;
let x: undefined = undefined;

Special Types

anyOpt out of type checking
unknownType-safe `any` (must narrow before use)
voidNo return value
neverFunction never returns (throws / infinite)
objectAny non-primitive

Download the full cheat sheet for all sections, formatted for print

Download PDF

Downloads

Choose the treatment that matches how you read