Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
Visit type arguments in scope analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
rubennorte committed Jul 6, 2018
1 parent 61c70f2 commit e718ce9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/analyze-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const flowFlippedAliasKeys = t.FLIPPED_ALIAS_KEYS.Flow.concat([
"ObjectPattern",
"RestElement",
]);

const visitorKeysMap = Object.keys(t.VISITOR_KEYS).reduce(function(acc, key) {
const value = t.VISITOR_KEYS[key];
if (flowFlippedAliasKeys.indexOf(value) === -1) {
Expand Down Expand Up @@ -131,6 +132,11 @@ class Referencer extends OriginalReferencer {
super.visitProperty(node);
}

CallExpression(node) {
this._visitTypeAnnotation(node.typeArguments);
super.CallExpression(node);
}

InterfaceDeclaration(node) {
this._createScopeVariable(node, node.id);

Expand Down

0 comments on commit e718ce9

Please sign in to comment.