excess property checking

An extra TypeScript check that rejects unknown properties when an object literal is written directly where a type is expected.

In more detail

Normally extra properties are fine under structural typing. But passing { title, slug, wordCount, unpublished } straight to a function expecting Article is flagged, because the extra key is probably a typo. Assigning the same object to a variable first skips the check.

Related terms

Taught in

References