Closed
Description
TypeScript Version: 2.5.1
Code
import _ from 'lodash'
Place cursor at start of line.
Expected behavior:
No refactorings are provided
Actual behavior:
An extract method refactoring is provided:
[Trace - 5:37:09 PM] Sending request: getApplicableRefactors (44). Response expected: yes. Current queue length: 0
Arguments: {
"file": "/Users/matb/projects/san2/bar.js",
"startLine": 1,
"startOffset": 1,
"endLine": 1,
"endOffset": 7
}
[Trace - 5:37:09 PM] Response received: getApplicableRefactors (44). Request took 2 ms. Success: true
Result: [
{
"name": "Extract Method",
"description": "Extract function",
"inlineable": true,
"actions": [
{
"description": "Extract function into 'file '/Users/matb/projects/san2/bar.js''",
"name": "scope_0"
}
]
}
]
Applying the refactoring results in:
newFunction() _ from 'lodash'
function newFunction() {
return import ;
}