mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 20:25:48 -06:00
Add regression test
This commit is contained in:
parent
58ff76abf6
commit
a717d3ab44
@ -174,3 +174,13 @@ class Interesting {
|
||||
declare function invoke<T>(f: () => T): T;
|
||||
|
||||
let xx: 0 | 1 | 2 = invoke(() => 1);
|
||||
|
||||
// Repro from #32416
|
||||
|
||||
declare function assignPartial<T>(target: T, partial: Partial<T>): T;
|
||||
|
||||
let obj = {
|
||||
foo(bar: string) {}
|
||||
}
|
||||
|
||||
assignPartial(obj, { foo(...args) {} }); // args has type [string]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user