← Back to archive

Stdle #171 · generics · 2026-11-24

What does this TypeScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

class C<T = number> { m(): number { return 0 } }
console.log(C.length)
Generics
4 attempts left

Answer & explanation