A candidate writes type MyPick<T, K> = { K: T[K] } — expecting to iterate the union K and produce one property per member.
Every TypeScript codebase uses Pick<T, K> the same way — grab a subset of an object type's keys, produce a narrower object type. A React props refactor trims a parent's props via Pick<Props, 'onSubmit' | 'value'>. A form library exposes Pick<FormState, keyof Draft> as the editable slice. A public-user type drops the password via Pick<User, 'id' | 'email'>. The stdlib implementation in lib.es5.d.ts is three lines. Short enough to rebuild. Short enough that a staff interviewer can ask you to rebuild it from memory in under a minute. Candidates who have only USED Pick reach for the obvious shape — { K: T[K] } — and slam straight into a wall they can't see at first glance: the result type compiles, runs, and gives the wrong answer silently.
// Attempt 1 — mention K and T[K] in the body and hope the compiler iterates.// One property, literally named "K". No iteration happened.type MyPick<T, K> = { K: T[K] }type User = { id: number; email: string; password: string }type A = MyPick<User, 'id' | 'email'>// ^? { K: unknown } ← one property, literal name.The editor renders MyPick<User, 'id' | 'email'> as { K: unknown } — ONE property, literally named "K". TypeScript did not iterate; it treated K as a string.
Look at the recipe pane. type MyPick<T, K> = { K: T[K] } — four symbols in the body, one identifier per slot. It mentions K. It mentions T[K]. It returns an object. What else could go wrong? Run it on MyPick<User, 'id' | 'email'> and the evaluator reports: { K: unknown }. One property. Literal name. Merged value. The wall is invisible to someone who's used Pick a thousand times because the OUTPUT of Pick looks right to them — they've never written a version that isn't. Here, at the dojo, the first rule: TypeScript does not read your mind. { K: T[K] } means “a single property, whose NAME is the string 'K', whose VALUE is whatever `T[K]` resolves to.” The compiler doesn't see an intention; it sees a shape. And the shape we wrote isn't the one we wanted.
The naive recipe type MyPick<T, K> = { K: T[K] } sits on the dojo floor. Apply it to MyPick<User, 'id' | 'email'> where User = { id: number; email: string; password: string }. What shape does the compiler report?