Stay organized with collections
Save and categorize content based on your preferences.
blockly > VariableMap > getVariablesOfType
VariableMap.getVariablesOfType() method
Get a list containing all of the variables of a specified type. If type is null, return list of variables with empty string type.
Signature:
getVariablesOfType(type: string | null): VariableModel[];
Parameters
Parameter |
Type |
Description |
type |
string | null |
Type of the variables to find. |
Returns:
VariableModel[]
The sought after variables of the passed in type. An empty array if none are found.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `getVariablesOfType` method retrieves all variables of a specific type from a Blockly VariableMap."],["It accepts a `type` parameter, which can be a string representing the desired variable type or null to find variables with an empty string type."],["The method returns an array of `VariableModel` objects representing the matching variables or an empty array if none are found."]]],[]]