TS2366: Function lacks ending return statement in function with unknown
return type with implicit return on some code paths, despite noImplicitReturns
turned off
#53473
Labels
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
Good First Issue
Well scoped, documented and has the green light
Help Wanted
You can do this
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
π Search Terms
lacks ending
π Version & Regression Information
I believe this caused it.
β― Playground Link
https://www.typescriptlang.org/play?noImplicitReturns=false&ts=5.1.0-dev.20230323#code/GYVwdgxgLglg9mABFApgZygCgJQC5HgDWYcA7kgN4CwAUAJAzCKYCyAhlABYB0ATm2AAmcALY5EAPkQAGbgFZsiXiigheSKLxAoA3LQC+QA
π» Code
π Actual behavior
π Expected behavior
No error, if the function return type is
unknown
I'd expect that to allow implicit return ofundefined
.The text was updated successfully, but these errors were encountered: