Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptstructural typing unsoundnessSingle-choice MCQ

What is the type of `Object.keys(o)` here, and why did the language designers choose it?

const o = { a: 1, b: 2 }; const ks = Object.keys(o); const first: "a" | "b" = ks[0]; // type error