Skip to content
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

fixUnusedIdentifier may remove a used side-effect #23970

Open
ghost opened this issue May 8, 2018 · 0 comments
Open

fixUnusedIdentifier may remove a used side-effect #23970

ghost opened this issue May 8, 2018 · 0 comments
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

Comments

@ghost
Copy link

ghost commented May 8, 2018

TypeScript Version: 2.9.0-dev.20180506

Code

{ const x = launchMissiles(); }

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.

@ghost ghost added Suggestion An idea for TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions. labels May 8, 2018
@weswigham weswigham added Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. In Discussion Not yet reached consensus labels Nov 6, 2018
@RyanCavanaugh RyanCavanaugh removed In Discussion Not yet reached consensus labels Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants