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

Excess property checks (EPC) apply only to fresh object literals. For an object literal assigned to a UNION target, when does EPC report a property as excess?

type U = { a: number } | { b: number }; const ok: U = { a: 1, b: 2 }; // ? const bad: U = { a: 1, c: 3 }; // ?