blockly > IVariableMap > createVariable
IVariableMap.createVariable() method
Creates a new variable with the given name. If ID is not specified, the variable map should create one. Returns the new variable.
Signature:
createVariable(name: string, type?: string, id?: string | null): T;
Parameters
Parameter | Type | Description |
|---|---|---|
name | string | |
type | string | (Optional) |
id | string | null | (Optional) |
Returns:
T