MCPcopy Create free account
hub / github.com/facebook/memlab / getClosureScopeTreeForUrl

Method getClosureScopeTreeForUrl

packages/e2e/src/ScriptManager.ts:85–97  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

83 }
84
85 public getClosureScopeTreeForUrl(url: string): Nullable<ClosureScope> {
86 const code = this.loadCodeForUrl(url);
87 if (code == null) {
88 return null;
89 }
90 try {
91 const script = new Script(code);
92 return script.getClosureScopeTree();
93 } catch {
94 // do nothing
95 }
96 return null;
97 }
98
99 public async rewriteScript(
100 code: string,

Callers 1

displaySourceCodeFunction · 0.95

Calls 2

loadCodeForUrlMethod · 0.95
getClosureScopeTreeMethod · 0.95

Tested by

no test coverage detected