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
I was wondering why the code below compiles fine!
The compiler should complain for the last two lines, not?
interfaceViewConfig{width?:number;height?:number;}interfaceToolbarConfig{size?:number}classViewimplementsViewConfig{width:number;height:number;constructor(config:ViewConfig){}}classToolbarextendsViewimplementsToolbarConfig{size:number;constructor(config:ToolbarConfig){super(config);}}varmyToolbar=newToolbar('should not compile');varmyToolbar=newToolbar(9999);
The text was updated successfully, but these errors were encountered:
Quote: "The advantage of optional properties is that you can describe these possibly available properties while still also catching properties that you know are not expected to be available."
Hi,
I was wondering why the code below compiles fine!
The compiler should complain for the last two lines, not?
The text was updated successfully, but these errors were encountered: