noImplicitAny ignores implicit any on yield expression assignment #35105
Labels
Breaking Change
Would introduce errors in existing code
Fixed
A PR has been merged for this issue
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
TypeScript Version: 3.7.2 (playground)
Search Terms: generator implicitAny
Code
Expected behavior:
TypeScript Compiler with enabled
noImplicitAny
flag warns about implicit any with yield expression assignment.Actual behavior:
Yield expression is assigned implicitly as
any
because we're not able to infer the type. While I acknowledge that proper type check here is a difficult issue with quite a few other issues open, we should be forced to declare the expected type.Playground Link
Related Issues:
The text was updated successfully, but these errors were encountered: