-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
DiscussionIssues where community input is encouraged to help refine the ideaIssues where community input is encouraged to help refine the ideaenhancementNew feature or requestNew feature or request
Description
Consider this input:
/**
* @description Rename a function argument
* @command refakts rename "[function-argument.input.ts 6:22-6:30]" --to "newParam"
*/
function processData(oldParam: string, other: number): string {
const result = oldParam.toUpperCase();
return oldParam + result + other;
}Problem
- When reading this, it's difficult to know what is being renamed.
- If we modify the input code, it's tedious to update the command line correctly.
Proposed solution
- Use special comment markers to indicate the selection range.
Example
/**
* @description Rename a function argument
* @command refakts rename "[function-argument.input.ts {{CURRENT_SELECTION}}]" --to "newParam"
*/
function processData(/*|*/oldParam/*|*/: string, other: number): string {
const result = oldParam.toUpperCase();
return oldParam + result + other;
}Metadata
Metadata
Assignees
Labels
DiscussionIssues where community input is encouraged to help refine the ideaIssues where community input is encouraged to help refine the ideaenhancementNew feature or requestNew feature or request