TypeScript Version:3dd7b84
Code
interfaceI1{prop1: string;}interfaceI2{prop2: string;}interfaceI3extendsRecord<string,string>{prop3: string;}typeProperties=|{[key: string]: never}|I1|I2|I3;declareconstprop1: string;declareconstprop2: string|undefined;// Error: Debug Failure. False expression: parameter should have errors when reporting errorsfunctionF1(_arg: {props: Properties}){}F1({props: {
prop1,
prop2,},});// Error: Debug Failure. No error for last overload signaturefunctionF2(_props: Properties){}F2({
prop1,
prop2,});Expected behavior: Compiles successfully in strict mode
Actual behavior: Asserts in strict mode (different asserts for F1 and F2)
Edit: current best guess is that checkRelatedTo should be true and that's why there's no error message. This seems to be related to excess-property checking (related to the fresh object literal at the call site and the index signature in the union).
TypeScript Version:3dd7b84
Code
Expected behavior: Compiles successfully in strict mode
Actual behavior: Asserts in strict mode (different asserts for F1 and F2)
Edit: current best guess is that checkRelatedTo should be true and that's why there's no error message. This seems to be related to excess-property checking (related to the fresh object literal at the call site and the index signature in the union).