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
I know the bar can have any type implements ITest, but the strange thing is:
When I remove --noimplicitAny, tsserver will tell me bar has a a property. But with --noimplicitAny, tsserver can not tell me any thing but an error.
If bar can not have any other type do not implements ITest, why not infer bar as ITest?
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.7.0-dev.20180118
Search Terms: type inference, noimplicitAny
Code
Expected behavior:
argument
bar
will have infered typeITest
Actual behavior:
error TS7006: Parameter 'bar' implicitly has an 'any' type.
Playground Link: Link
I know the
bar
can have any type implementsITest
, but the strange thing is:When I remove --noimplicitAny, tsserver will tell me
bar
has aa
property. But with --noimplicitAny, tsserver can not tell me any thing but an error.If bar can not have any other type do not implements
ITest
, why not inferbar
asITest
?The text was updated successfully, but these errors were encountered: