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
It should be possible to infer types of non-exported functions and private methods, as the types can be locally established by just looking at the file under compilation.
Code
functioninferred(x):
returnx+x// since we call the function with a number, we should be able to infer the type of x as number instead of "any"constfoo=inferred(2)// complation should fail as no type can be inferred that supports both calls to 'inferred'.constbar=inferred({baz:1})
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.5
It should be possible to infer types of non-exported functions and private methods, as the types can be locally established by just looking at the file under compilation.
Code
The text was updated successfully, but these errors were encountered: