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

A fresh literal with an unknown property is passed where the parameter type is `{ a: number } & T` for a generic `T`. Why does no excess-property error appear?

function f<T>(x: { a: number } & T): void {} f({ a: 1, b: 2 });