We are using typescript for one of our larger project and we ran into a bug due to the fact that typescript allows any to be passed when expecting an interface.
Why does typescript allow this or is there a setting that i missed.
The following code sample compiles correctly
interface IInterface{
InterfaceProperty:string;
}
var prop:any = "2000";
function DoStuff(a:IInterface)
{
var x = a.InterfaceProperty;
}
// Why am i allowed to pass any as an interface?
DoStuff(prop);