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

Why does TypeScript flag the property `widht` here as an error, even though structurally a fresh object literal with extra properties is still assignable to the target type?

interface Box { width: number; height: number } const b: Box = { width: 10, height: 20, widht: 5 };