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
Actual behavior:
On line 24, on the generator star: Generator implicitly has type 'IterableIterator<any>' because it does not yield any values. Consider supplying a return type.. This is unfixable without a terrible hack (add a line with the text if (!!false) yield state; to the top of the generator body), as there is already a return type specified. Actually, the return type (and argument type) should be inferred from the type annotation on the LHS of the equals sign and the strategy function signature (and the return type should not be required), but its not, though that's possibly a separate issue.
The text was updated successfully, but these errors were encountered:
hi @weswigham !!! 🐱 This turned out to be an issue from how we aggregate return type from function body. We have a check for generator that only aggregate return type from yield expression...
TypeScript Version: 2.1.6 and 2.2.0-dev.20170213
Code
tsconfig.json:
test.ts:
Expected behavior:
Compiles without error.
Actual behavior:
On line 24, on the generator star:
Generator implicitly has type 'IterableIterator<any>' because it does not yield any values. Consider supplying a return type.
. This is unfixable without a terrible hack (add a line with the textif (!!false) yield state;
to the top of the generator body), as there is already a return type specified. Actually, the return type (and argument type) should be inferred from the type annotation on the LHS of the equals sign and thestrategy
function signature (and the return type should not be required), but its not, though that's possibly a separate issue.The text was updated successfully, but these errors were encountered: