
4 Core Refactorings
Visual Study Code already contains basic refactorings such as Rename and Extract Function. The JS Assistant adds additional refactorings or extended functionality such as safety checking:
- Extract selected text into variable
Extract the selected text (including expressions from template literals) into a
const
variable. - Extract variable
Extract one or more occurrences of an expression into a
const
variable. - Replace assignment with return
Convert a variable assignment to a
return
statement. - Inline variable
Inline a variable value into its references.