After looking at this straightforward code:
interface int1 {
aa: string,
bb: number,
}
const obj1:int1 = {} //#1
function fun(param_obj:int1) { //#2
}
I am curious as to why the compiler throws an error:
Type '{}' is missing the following properties from type 'int1': aa, bb
at line #1 but doesn't display an error at line #2, even though a new object is being created in both cases?