vscode-refactorixTypeScript refactoring tools for Visual Studio Code. After installing, pressing RefactoringsSplit variable declarationSplits the initialization part of a variable declaration. Place the cursor inside a variable declaration statement and invoke the command. Before:
After:
Toggle access modifierToggles between Place the cursor on a class property, method, constructor parameter, set or get accessor and invoke the command. When placed on a get or set accessor, the modifier of the other accessor is toggled as well. SettingsAdd this configuration block to the VS Code 'User' or 'Workspace' settings:
Interpolate string partSurrounds the selected part of a string literal with Before - assume you have
After - note the backticks:
Select a part of a string literal and invoke the command. The selection may be empty in which case Property to getter/setterConverts a property to getter/setter. Before:
After:
Place the cursor on a property and invoke the command. SettingsAdd this configuration block to the VS Code 'User' or 'Workspace' settings:
Add/remove semicolonsAdds or removes semicolons for all statements in the active document. Arrow function toggle single statement block <-> expressionToggles between an arrow function's single statement block and expression. Toggles between this:
and this:
Place the cursor inside such a function and invoke the command. Arrow function all single statement blocks to expressionConverts all arrow function single statement blocks to expression. Extract variableReplaces the selected text with a SettingsAdd this configuration block to the VS Code 'User' or 'Workspace' settings:
Release Infov0.3.6
v0.3.5
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.0
v0.1.0
Development setup
Build
Package
|