Skip to content

Commit

Permalink
Update packages/babel-parser/src/plugins/typescript/scope.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
  • Loading branch information
liuxingbaoyu and JLHwung committed Sep 19, 2022
1 parent 24fe1f0 commit 2a1e211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/plugins/typescript/scope.ts
Expand Up @@ -148,7 +148,7 @@ export default class TypeScriptScopeHandler extends ScopeHandler<TypeScriptScope
if (this.hasImport(name)) return;

const len = this.scopeStack.length;
for (let i = 0; i < len; i++) {
for (let i = len - 1; i >= 0; i--) {
const stack = this.scopeStack[i];
if (stack.types.has(name) || stack.exportOnlyBindings.has(name)) return;
}
Expand Down

0 comments on commit 2a1e211

Please sign in to comment.