Skip to content

Commit c53246f

Browse files
committed
Add regression test
1 parent 0e273c3 commit c53246f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// @strict: true
2+
3+
// Repro from #32230
4+
5+
type Callback<TFoo, TBar> = (foo: TFoo, bar: TBar) => any
6+
7+
declare function example<TFoo, TBar, TCallback extends Callback<TFoo, TBar>>(
8+
foo: TFoo,
9+
callback: TCallback,
10+
bar: TBar,
11+
): TCallback
12+
13+
example(42, (foo, bar) => ({
14+
t: () => {
15+
let s: string = bar;
16+
}
17+
}), '42');
18+
19+
example(42, (foo, bar) => ({
20+
t() {
21+
let s: string = bar;
22+
}
23+
}), '42');

0 commit comments

Comments
 (0)