Skip to main content

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

Parameter

Type

Description

name

string

type

string

(Optional)

Returns:

T | null