Side-by-side, interactive cheatsheets for TypeScript programmers
comparing TypeScript to other languages. Every example runs live in your browser — no
setup, no installation.
Choose your own path by reordering languages
Static types you already love, plus true parallelism and one deployable binary. A TypeScript developer moving to Go keeps compile-time type safety and inference, but trades the event loop and structural typing for goroutines, nominal types with zero values, and errors as ordinary return values.
async/await is concurrency on a single threadif err != nil — there is no throw/catch for ordinary failures, and the signature shows what can fail0 or "" — never undefined; no strictNullChecks neededany escape hatchnode_modules and no transpile step — go build is the whole toolchainYou already know JavaScript — this page is about what is actually real at runtime. What the compiler erases, what it quietly emits as running code, where the types stop protecting you, and how to keep type safety in plain JavaScript with JSDoc and no build step.
interface/type, generics, as, satisfies, and ! are all erased — and private is only advisoryenum builds a runtime object, namespace an IIFE, and parameter properties generate this.x = xJSON.parse/fetch return any, indexing lies, and you cannot instanceof an interface#private fields, ?., and ?? survive compilation and run in plain JS@typedef/@param checked by tsc, plus runtime validation (zod) at the boundaryThe dynamic language a TypeScript developer reaches for in data, scripting, and ML. Python keeps annotations optional and unenforced, trading compile-time guarantees and structural typing for whitespace blocks, comprehensions, and a runtime that just runs — no build step at all.
name: type / | None syntax, but they are advisory — mypy checks them, the interpreter ignores themfilter/map into one expression, replacing chained array methodsmatch does structural patterns like a discriminated unionif not items tests for empty@dataclass gives value equality and a constructor for free, the closest analog to a TypeScript record-shaped interfaceWhat a TypeScript developer reaches for when the type system stops earning its keep. Ruby drops annotations, the compile step, and structural typing for duck typing, blocks, and an object model so uniform that even integers and nil are real objects with methods — the language behind Rails.
numbers.map { |number| number * 2 }, with the &:upcase shorthand for one-method calls42 and nil — no primitive/wrapper split, no undefined; only nil and false are falsydef square(x) = x * x) replace options objects and arrow functionscase/in — destructure hashes and arrays the way you would with a discriminated union, plus guardsmethod_missing give runtime metaprogramming that a Proxy only approximatesThe type discipline taken all the way down. A TypeScript developer learning Rust keeps generics, closures, and discriminated unions, but the checks now run at compile time over real memory: ownership replaces the garbage collector, and Option/Result replace null and throw.
Option<T> replaces T | undefined and Result<T, E> replaces throw — absence and failure are values the compiler forces you to handlematch — discriminated unions made first-class, and the compiler rejects an unhandled caseany to fall back onmap/filter/collect) are lazy, zero-cost pipelines that read like the array methods you already useThe language TypeScript was modeled on — same lead designer, Anders Hejlsberg. C# gives a TypeScript developer the type system they already love, but reified at runtime and compiled to native-speed IL: nominal interfaces, real generics, value types, and records, with no erasure and no any.
typeof(T) works at runtime, unlike TypeScript's erased type parametersstring?, ?., ??) are exactly strictNullChecks — the operators TypeScript borrowed from C#record types bring value equality and a with expression; switch expressions add exhaustive, type-narrowing pattern matchingfilter/map/reduce as lazy Where/Select/Aggregate over any sequence: IFoo, where TypeScript accepts any matching shape