Skip to content

Commit efdbbd1

Browse files
committed
Add regression tests
1 parent dc34c5e commit efdbbd1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,20 @@ type typeAlias2 = typeof varOfAliasedType2;
77
function func(): typeAlias3 { return null; }
88
var varOfAliasedType3 = func();
99
type typeAlias3 = typeof varOfAliasedType3;
10+
11+
// Repro from #26104
12+
13+
interface Input {
14+
a: number;
15+
b: number;
16+
}
17+
18+
type R = ReturnType<typeof mul>;
19+
function mul(input: Input): R {
20+
return input.a * input.b;
21+
}
22+
23+
// Repro from #26104
24+
25+
type R2 = ReturnType<typeof f>;
26+
function f(): R2 { return 0; }

0 commit comments

Comments
 (0)