← Back to archive

Stdle #50 · generics · 2026-07-26

What does this TypeScript snippet output?

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

function t(this: { n: number }, a: number) { return a }
console.log(t.length)
Generics
4 attempts left

Answer & explanation