Skip to main content

Home > blockly > IVariableMap > getVariable

IVariableMap.getVariable() method

Returns the variable with the given name, or null if not found. If type is provided, the variable's type must also match, or null should be returned.

Signature:

getVariable(name: string, type?: string): T | null;

Parameters

ParameterTypeDescription
namestring
typestring(Optional)

Returns:

T | null