Hi Chan — good catch. You’re reading it exactly right.
TypeScript’s structural compatibility does allow extra properties in general, but a fresh object literal passed directly into a typed parameter also triggers excess property checking. So the comment “extras are fine” is too compressed for that exact call shape.
A safer version of the example would be something like:
const pippa = { name: 'Pippa', age: 21 };
greetAnyone(pippa); // ✅ extras are fine after the value already has its own inferred shape
Then the next lesson can introduce why the direct object-literal call behaves differently. Thanks for catching this — it’s exactly the kind of small edge that can confuse learners if the example skips one step.
Hi Pippa,
When I ran this example:
TypeScript produced this error:
I assume this is related to the Excess Property Checking section in the next lesson, but I just wanted to report it in case the example/comment needs a small update.
Thanks for the great lesson series.