I was under the impression that this code
let x: (a: { b: number }) => void = (a: { b: number, c: string }) => { alert(a.c) };
x({ b: 123 });
would result in an error because the lambda function requires an additional property on the a
argument, making the signatures incompatible. However, testing it in the most recent TypeScript playground revealed no errors! What could be the reason for this unexpected outcome?