TypeScript is the strangest answer in this section. Every other language here treats a type parameter as a placeholder for a type someone will supply. TypeScript treats it as an input to a computation that produces a type, and the type level grew into a language of its own: pattern matching, recursion, string manipulation, and a depth budget that exists because no compiler can decide whether your types terminate. The same <T> syntax as Java or C#, doing a different job.

The other oddity is what sits underneath. The runtime is JavaScript, which knows nothing about any of it. Java erases for compatibility with code that predates generics; TypeScript erases because there was never anything there to keep. The foundation under all of it is structural assignability, and the comparison against the other four answers lives in Generics, Monomorphization vs Erasure.

Generics in a structural system

Why the familiar syntax means something else here.

The type level as a language

The part no other folder in this section has. Read these in order; each one is built out of the ones before it.

Where the types stop

The rest of the language

Read from the comparative layer


Any pages placed under this folder are auto-listed below by Quartz.