-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why the recursive function's return type inferenced as any? #53978
Comments
Your playground link does not work. Duplicate of #32523. |
@MartinJohns link updated! |
I thought #32523 is not focused on recursive function's type. |
The error message tells you why?
|
@RyanCavanaugh but i cannot understand why this expression didn't inference type implicitly. |
#53995 is probably relevant |
@fatcerberus omg thanks a lot! |
This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow or the TypeScript Discord community. |
Bug Report
when write recursive function via generator function or function,
return type inferenced as any.
the general purpose for recursive function, return type can be inferenced as correct return type.
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
walk function's return type is any
🙂 Expected behavior
walk function's return type is AsyncGenerator
The text was updated successfully, but these errors were encountered: