Open
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Description
I had code that called workspace.getVariableUsesById(id)
. The deprecation warning says to use Blockly.Workspace.getVariableMap().getVariableUsesById
, but that doesn't work.
workspace.getVariableMap() returns an IVariableMap<IVariableModel<IVariableState>>
, but IVariableMap does not have a function named getVariableUsesById.
Reproduction steps
- Write code that uses
workspace.getVariableUsesById(id)
- Run it and look at the browser console. See
Blockly.Workspace.getVariableUsesById was deprecated in v12 and will be deleted in v13. Use Blockly.Workspace.getVariableMap().getVariableUsesById instead.
- Replace code with
workspace.getVariableMap().getVariableUsesById (id)
. - Observe error (in my case I see this error in vscode):
Property 'getVariableUsesById' does not exist on type 'IVariableMap<IVariableModel<IVariableState>>'. Did you mean 'getVariableById'?
Stack trace
Screenshots
No response
Browsers
No response
Metadata
Metadata
Assignees
Type
Projects
Status
Todo