You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeColors="red"|"green"|"blue";constfavoriteColors={"red": "yes","green": false,"blue": "kinda",
...{platypus: false},// No error, despite it being a known excess property}satisfiesRecord<Colors,unknown>;
π Actual behavior
No error. The use of object spread causes the excess property to be permitted.
Hovering over favoriteColors, you can see that TypeScript understands it has generated a type with all four properties.
Bug Report
π Search Terms
satisfies
object spread
excess properties
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
No error. The use of object spread causes the excess property to be permitted.
Hovering over
favoriteColors
, you can see that TypeScript understands it has generated a type with all four properties.π Expected behavior
An error. The issue introducing
satisfies
and release notes suggest excess property detection is an intended feature ofsatisfies
.The text was updated successfully, but these errors were encountered: