Type intersections between {}
and types with only optional members are not type-checked.
#8050
Labels
Duplicate
An existing issue was already created
TypeScript Version:
Code
Expected behavior:
Well I'd like to have an error for that!
I get autocompletion for
foo
andbar
while typingtest = {}
, but it's not enforced.My use case is when I use a type in functions or classes like
T & {foo?}
withT = {}
.The text was updated successfully, but these errors were encountered: