blockly > 变量 > getVariableUsesById

Variables.getVariableUsesById() 函数

查找命名变量的所有用法。

Signature:

export declare function getVariableUsesById(workspace: Workspace, id: string): Block[];

参数

参数 类型 说明
工作区 Workspace 用于搜索变量的工作区。
id 字符串 要查找的变量的 ID。

返回

屏蔽[]

块用法数组。