blockly > 工作区 > getVariablesOfType
Workspace.getVariablesOfType() 方法
查找指定类型的变量。如果类型为 null,则返回字符串类型的变量列表。
Signature:
getVariablesOfType(type: string | null): VariableModel[];
参数
参数 | 类型 | 说明 |
---|---|---|
类型 | 字符串 | null | 要查找的变量的类型。 |
返回:
所追求的传入类型的变量。如果未找到,则为空数组。