Skip to content

Commit a717d3a

Browse files
committed
Add regression test
1 parent 58ff76a commit a717d3a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/cases/compiler/instantiateContextualTypes.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,13 @@ class Interesting {
174174
declare function invoke<T>(f: () => T): T;
175175

176176
let xx: 0 | 1 | 2 = invoke(() => 1);
177+
178+
// Repro from #32416
179+
180+
declare function assignPartial<T>(target: T, partial: Partial<T>): T;
181+
182+
let obj = {
183+
foo(bar: string) {}
184+
}
185+
186+
assignPartial(obj, { foo(...args) {} }); // args has type [string]

0 commit comments

Comments
 (0)