mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add test
This commit is contained in:
@@ -193,3 +193,8 @@ declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
foo2(() => {});
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
|
||||
// Repro from #30324
|
||||
|
||||
declare function times<T>(fn: (i: number) => T): (n: number) => T[];
|
||||
const a2 = times(identity)(5); // => [0, 1, 2, 3, 4]
|
||||
|
||||
Reference in New Issue
Block a user