mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Make type and variabletype attributes optional
If a variable doesn’t have a type, then don’t add these empty attributes in the XML.
This commit is contained in:
@@ -166,10 +166,10 @@ Blockly.VariableMap.prototype.renameVariableWithConflict_ = function(variable,
|
||||
* Create a variable with a given name, optional type, and optional ID.
|
||||
* @param {string} name The name of the variable. This must be unique across
|
||||
* variables and procedures.
|
||||
* @param {string=} opt_type The type of the variable like 'int' or 'string'.
|
||||
* @param {?string=} opt_type The type of the variable like 'int' or 'string'.
|
||||
* Does not need to be unique. Field_variable can filter variables based on
|
||||
* their type. This will default to '' which is a specific type.
|
||||
* @param {string=} opt_id The unique ID of the variable. This will default to
|
||||
* @param {?string=} opt_id The unique ID of the variable. This will default to
|
||||
* a UUID.
|
||||
* @return {Blockly.VariableModel} The newly created variable.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user