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
My apologies if this has been reported before, I have done a search of the issues, and with the keyword spread this has not come up. I also believe that this functionality worked in TS 2.1 but is now broken.
TypeScript Version: 2.3.2
Code
interfaceICar{wheels: numberbrand: string}letcar:ICar={wheels: 4,brand: 'volvo'}car={
...car,legs: 5// this should not work}
Expected behavior:
Compile error when trying to add the legs attribute to a variable of type ICar.
Actual behavior:
Will compile and add the faulty attribute
The text was updated successfully, but these errors were encountered:
My apologies if this has been reported before, I have done a search of the issues, and with the keyword spread this has not come up. I also believe that this functionality worked in TS 2.1 but is now broken.
TypeScript Version: 2.3.2
Code
Expected behavior:
Compile error when trying to add the legs attribute to a variable of type ICar.
Actual behavior:
Will compile and add the faulty attribute
The text was updated successfully, but these errors were encountered: