Closed
Description
Hi,
I was wondering why the code below compiles fine!
The compiler should complain for the last two lines, not?
interface ViewConfig {
width?:number;
height?:number;
}
interface ToolbarConfig {
size?:number
}
class View implements ViewConfig {
width:number;
height:number;
constructor(config:ViewConfig) {
}
}
class Toolbar extends View implements ToolbarConfig {
size:number;
constructor(config:ToolbarConfig) {
super(config);
}
}
var myToolbar = new Toolbar('should not compile');
var myToolbar = new Toolbar(9999);