-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraints
Description
Assuming the following code:
function doSomething() {
alert("Did something");
}
doSomething;
Would it be possible for TypeScript to complain about the doSomething;
line, notifying the user that the statement is a no-op and maybe even suggesting adding parentheses to call the function? Or do you folks consider that kind of problems to definitely be a linter error, rather than something the compiler should look out for?
I searched the bugtracker but couldn't find any similar requests, my apologies if I missed them. I don't even know how feasible this would be, maybe ECMAScript has intricacies that make it impossible in all but the simplest cases, but I thought it couldn't hurt to suggest it.
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraints