CodeZettaInterview Hub

TypeScript · Generics · Mid-Level · Live Coding

keyof and indexed access with generics?

Short Interview Answer

keyof T gets keys; T[K] gets value types — foundation of type-safe pickers.

Detailed Explanation

K extends keyof T is the classic pattern. Remapping in mapped types builds on this.

Did you know this answer?