Closed
Description
TypeScript Version: 2.5.2
Code
function foo(_opts: Options) {
// do something;
return;
}
interface Options {
data?: any;
show?: boolean;
}
interface OptionsExtended extends Options {
title?: string;
}
const opts = {
show: true,
title: "title"
};
// this works
foo(opts);
// this doesn't
foo({
show: true,
title: "title"
});
Expected behavior:
Both of them to emit an error
Actual behavior:
the first one works and doesn't emit an error