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
Turns out this is quite hard to detect. It is easy in this case:
return[1,2,3];
But it gets harder if you have a return statement like this:
return[1,2,3]===[1,2,3];
To detect it properly we probably need to have full type-checking but that will slow down performance. Perhaps it is better to skip implicit return type checking and instead recommend that the this built-in rule is enabled:
"typedef": [true, "call-signature"]
That will ensure that all functions have an explicit return type and will avoid the problem of returning mutable things implicitly.
if the function has
return [1, 2, 3]
without explicit return type that needs to be checked too.The text was updated successfully, but these errors were encountered: