TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
Code
interfaceTheAllowedProperties{iAmAllowed: boolean;}interfaceTheAllowedPropertiesAndThenSome{iAmAllowed: boolean;thenSome: string}functiondoStuff(props: TheAllowedProperties){// do that thing you do}// 1. Errors - yay!!!! So, so very happydoStuff({iAmAllowed: true,iAmNot: "surprise!"})// 2. Does not error - huh? befuddlement....conststuffWhatIPreparedEarlier={iAmAllowed: true,iAmNot: "surprise!"};doStuff(stuffWhatIPreparedEarlier);// 3. Also does not error - huh? yet more befuddlement....constmoStuff: TheAllowedPropertiesAndThenSome={iAmAllowed: true,thenSome: "other data that isn't relevant"};doStuff(moStuff);Expected behavior:
I would have expected the compiler to complain in cases 2 and 3 above as they do in case 1. This might be the same as #7547 but the issue does not appear to be identical and so I wanted to double check. suppressExcessPropertyErrors is false
Actual behavior:
Cases 2 and 3 are not treated as errors.
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
Code
Expected behavior:
I would have expected the compiler to complain in cases 2 and 3 above as they do in case 1. This might be the same as #7547 but the issue does not appear to be identical and so I wanted to double check.
suppressExcessPropertyErrorsisfalseActual behavior:
Cases 2 and 3 are not treated as errors.