Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptexcess property checksSingle-choice MCQ

Excess-property checking only fires on a 'fresh' literal. Considering how freshness is tracked, what is the actual mechanism that lets the second line compile while the first is rejected?

type P = { a?: number }; const direct: P = { a: 1, z: 9 }; const src = { a: 1, z: 9 }; const aliased: P = src;