Closed
Description
Bug Report
π Search Terms
- refactor / refactoring
- code action
- imports
π Version & Regression Information
4.5.0-dev.20210901
β― Playground Link
Playground link with relevant code
π» Code
For the TS:
import { join } from "path";
import * as fs from "fs";
fs.readFileSync(join('a', 'b'));
- Place cursor on the start of the first line, hold shift, then press down arrow
- The selection should look like this:
Notice how the cursor in on line 2 but there's no actual selection on that line
- Now try running refactorings
π Actual behavior
No refactoring returned
π Expected behavior
A refactoring for convert import to namespace
should be returned since we only have the import statement selected
Here's the request we make to TS Server:
Arguments: {
"file": "/Users/matb/projects/san/bar.ts",
"startLine": 1,
"startOffset": 1,
"endLine": 2,
"endOffset": 1,
"triggerReason": "invoked"
}