Function: deleteVariable()
function deleteVariable(
workspace,
variable,
triggeringBlock?
): void;
Defined in: packages/blockly/core/variables.ts:849
Delete a variable and all of its uses from the given workspace. May prompt the user for confirmation.
Parameters
| Parameter | Type | Description |
|---|---|---|
workspace | Workspace | The workspace from which to delete the variable. |
variable | IVariableModel<IVariableState> | The variable to delete. |
triggeringBlock? | Block | The block from which this deletion was triggered, if any. Used to exclude it from checking and warning about blocks referencing the variable being deleted. |
Returns
void