@samitouri / QOS-React-1 / commits / 3571dfa056

[be] remove dead code in InferReactiveScopeVariables

Joe Savona committed Nov 1, 2023 at 17:13 UTC 3571dfa0568454932ecf5fd36958fc77c915ccd7
1 file changed -8
compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/InferReactiveScopeVariables.ts
-8
@@ -171,7 +171,6 @@ export function inferReactiveScopeVariables(fn: HIRFunction): void {
171
172 // Maps each scope (by its identifying member) to a ScopeId value
173 const scopes: Map<Identifier, ReactiveScope> = new Map();
174 - const scopeVariables: Map<ReactiveScope, Set<Identifier>> = new Map();
174
175 /**
176 * Iterate over all the identifiers and assign a unique ScopeId
@@ -201,13 +200,6 @@ export function inferReactiveScopeVariables(fn: HIRFunction): void {
200 );
201 }
202 identifier.scope = scope;
204 -
205 - let vars = scopeVariables.get(scope);
206 - if (vars === undefined) {
207 - vars = new Set();
208 - scopeVariables.set(scope, vars);
209 - }
210 - vars.add(identifier);
203 });
204 }
205