Add regression test

This commit is contained in:
Anders Hejlsberg 2019-12-12 16:03:21 -08:00
parent b457de4067
commit 5524a61ce9

View File

@ -0,0 +1,15 @@
// @strict: true
// Repro from #35414
interface ReturnVal {
something(): void;
}
const k: ReturnVal = { something() { } }
declare const val: ReturnVal;
function run(options: { something?(b?: string): void }) {
const something = options.something ?? val.something;
something('');
}