CLion Help

Extract Parameter Dialog for JavaScript

Refactor | Extract | Parameter

Use this dialog to specify the options and settings related to the Extract Parameter refactoring in JavaScript.

Type Specify the type of the new parameter. Usually, you don't need to change the type suggested by CLion.
Name Specify the name for the new parameter.
Value The expression to be replaced with the new parameter. Initially, this field contains the expression that you have selected. Normally, this initial value does not need to be changed.
Optional parameterIf this option is selected, the new parameter is assigned a value in the function body. The value corresponds to that currently set in the Value field. The calls to the function do not change.

If this option is not selected, all the function calls change according to the new function signature. The value specified in the Value field is added to the function calls and thus is passed to the function. No explicit value assignment for the new parameter is added to the function body.

Replace all occurrences Select this option to replace all the occurrences of the selected expression within the function.

See Also

Last modified: 3 July 2015