Closed
Description
TypeScript Version: 3.2.0-dev.201xxxxx
Search Terms:
generic rest generators
Code
declare function call<Fn extends (...args: any[]) => any>(
fn: Fn,
...args: Parameters<Fn>
): any
call((a: 'a') => {})
call(function*(a: 'a') {})
Expected behavior:
call
with generator type checks the same way as with plain function i.e. gives type error when args are missing
Actual behavior:
call
gives type error when args are missing with plain function, but not with generator
Playground Link: