blockly > VariableMap > getVariableById

VariableMap.getVariableById() method

Find the variable by the given ID and return it. Return null if not found.

Signature:

getVariableById(id: string): IVariableModel<IVariableState> | null;

Parameters

Parameter Type Description
id string The ID to check for.

Returns:

IVariableModel<IVariableState> | null

The variable with the given ID.