Skip to main content

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

Parameter

Type

Description

variable

T

newName

string

Returns:

T