MCPcopy Create free account
hub / github.com/microsoft/vscode-extension-samples / getTreeElement

Function getTreeElement

tree-view-sample/src/testView.ts:84–93  ·  view source on GitHub ↗
(element: string)

Source from the content-addressed store, hash-verified

82}
83
84function getTreeElement(element: string): any {
85 let parent = tree;
86 for (let i = 0; i < element.length; i++) {
87 parent = parent[element.substring(0, i + 1)];
88 if (!parent) {
89 return null;
90 }
91 }
92 return parent;
93}
94
95function getNode(key: string): { key: string } {
96 if (!nodes[key]) {

Callers 2

getChildrenFunction · 0.85
getTreeItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected