-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeFix AvailableA PR has been opened for this issueA PR has been opened for this issueWorking as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Milestone
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
ulrichb
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeFix AvailableA PR has been opened for this issueA PR has been opened for this issueWorking as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug