Closed
Description
TypeScript Version: 3.7.2
Search Terms:
parameter, never, ReturnType
Code
The AnyFunction
type is found here:
TypeScript/src/compiler/core.ts
Line 1464 in c447ebc
export type AnyFunction = (...args: never[]) => void;
//Expected: void
//Actual: any
type x = ReturnType<AnyFunction>;
Expected behavior:
x
should be void
Actual behavior:
x
is any
Playground Link:
Related Issues:
Original Issue:
#33457
PR to fix ReturnType<>
:
#33496
@jack-williams tracking the never
and rest params issue:
#33495