mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Add regression test
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user