Fill: Keyof Operator
Fill in the Blank Medium
Question
Fill in the blank to get the union of all keys of T:
Code
type Keys<T> = ___ T;
Hint
This operator extracts the keys of an object type as a union.
Explanation
The operator is keyof. keyof T produces a union of all property names of T. For example, if T is { a: string; b: number }, then keyof T is "a" | "b".
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.