The course flags an error in the code: Argument of type {"name":string} is not assignable to a parameter of type 'squareDescriptor'. The property "size" is missing in the type {"name":string;}.
Course link:
I personally tested the code and did not encounter the error.
interface squareDescriptor{
"name":string,
"size":number
}
let squareFn : Function = (square : squareDescriptor) => {
return square.name;
}
let square = {
"name": "a square"
}
let executeFn = squareFn(square);
Expected result: error
Actual result: no error.