mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Add regression tests
This commit is contained in:
parent
dc34c5e719
commit
efdbbd1cf3
@ -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; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user