You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i were to guess, your VS 2015 was using 2.0 or earlier, your VS 2017 is using 2.1. If so, you can find more details about this in #11936.
it has always been any, the parameter help was showing the wrong overload in this case, but at build time the type was any silently, with TS 2.1, you should get an error under --noImplicitAny.
Why it is any? Function has two overloads, one of them is parameterless. If I specify parameter, it is definitely second overload with number parameter.
#11936 has discussion on why overload resolution works this way. it is mostly a design limitation. It is important to note, that previously it was any (though your hover in VS told you it was number), now it is still any, but will consistently report an error if --noImplicitany is enabled.
TypeScript Version: 2.1.1
Code
Expected behavior:

Actual behavior:

The text was updated successfully, but these errors were encountered: