Skip to main content

Home > blockly > IVariableMap > renameVariable

IVariableMap.renameVariable() method

Changes the name of the given variable to the name provided and returns the renamed variable.

Signature:

renameVariable(variable: T, newName: string): T;

Parameters

ParameterTypeDescription
variableT
newNamestring

Returns:

T