Closed
Description
TypeScript Version: 2.1.1, 2.1.4
Code
declare function func(callback: () => void): any;
declare function func(callback: (arg: number) => void): any;
func(argx => { });
Expected behavior:
Successfully compile, even if --noImplicitAny
is set. This is the behavior we saw until 2.0.10
(which appears reasonable, the second overload of func
allows inferring that argx: number
).
Actual behavior:
error TS7006: Parameter 'argx' implicitly has an 'any' type