Add regression tests

This commit is contained in:
Anders Hejlsberg 2018-08-06 10:02:33 -07:00
parent dc34c5e719
commit efdbbd1cf3

View File

@ -7,3 +7,20 @@ type typeAlias2 = typeof varOfAliasedType2;
function func(): typeAlias3 { return null; }
var varOfAliasedType3 = func();
type typeAlias3 = typeof varOfAliasedType3;
// Repro from #26104
interface Input {
a: number;
b: number;
}
type R = ReturnType<typeof mul>;
function mul(input: Input): R {
return input.a * input.b;
}
// Repro from #26104
type R2 = ReturnType<typeof f>;
function f(): R2 { return 0; }