(workspace: Workspace)
| 77 | * @returns A list of non-duplicated variable names. |
| 78 | */ |
| 79 | export function allDeveloperVariables(workspace: Workspace): string[] { |
| 80 | const blocks = workspace.getAllBlocks(false); |
| 81 | const variables = new Set<string>(); |
| 82 | for (let i = 0, block; (block = blocks[i]); i++) { |
| 83 | const getDeveloperVariables = block.getDeveloperVariables; |
| 84 | if (getDeveloperVariables) { |
| 85 | const devVars = getDeveloperVariables(); |
| 86 | for (let j = 0; j < devVars.length; j++) { |
| 87 | variables.add(devVars[j]); |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | // Convert the set into a list. |
| 92 | return Array.from(variables.values()); |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Construct the elements (blocks and button) required by the flyout for the |
nothing calls this directly
no test coverage detected