fixUnusedIdentifier may remove a used side-effect #23970
Labels
Domain: Quick Fixes
Editor-provided fixes, often called code actions.
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
Suggestion
An idea for TypeScript
TypeScript Version: 2.9.0-dev.20180506
Code
Expected behavior:
const x =
removed, and missiles still launched.Actual behavior:
Missiles unlaunched.
Unfortunately we have no way of knowing whether a function call does have side effects (#17181), so doing this in general might be annoying as users have to manually delete function calls with unused results.
The text was updated successfully, but these errors were encountered: