Skip to main content

Home > blockly > VariableMap > renameVariableById

VariableMap.renameVariableById() method

Warning: This API is now obsolete.

v12: use VariableMap.renameVariable.

Rename a variable by updating its name in the variable map. Identify the variable to rename with the given ID.

Signature:

renameVariableById(id: string, newName: string): void;

Parameters

ParameterTypeDescription
idstringID of the variable to rename.
newNamestringNew variable name.

Returns:

void