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