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

The target type has only a single OPTIONAL property, and the fresh literal supplies that property plus one extra. What does the compiler report?

interface Target { onClick?(): void; } const a: Target = { onClick() {}, onHover() {} };