Hi Swapna, I wrote the exact error in the title, “xx is declared but never used”.
To reproduce:
Add any unused import, say add import { Component } from '@angular/core';
to empty ts file.
Put "noUnusedLocals": true,
in tsconfig compilerOptions.
'Component' is declared but never used
error will appear. Select the error in Problems or Markers view and apply the quick fix.
– Apply quick fix for this error when file is closed. Import is not removed, nothing happens. Expected: import is removed.
– Open the file without changes and apply the fix (in Problems or Markers view). The import is removed in editor but the file is not saved and the editor becomes unsaved. Expected: the import is removed without changing the editor to the unsaved state.
– Open the file, make some changes without saving and apply the fix. Import is not removed and there is an NPE error in eclipse log. Expected: either should work like the fix was applied from an inline editor error marker (which works in this case) or display a message “can’t apply this quick fix to unsaved files”.