Fix rest parameters with flow type casting (#4636)
Do not skip TypeCastExpressions when finding referenced identifiers as the type cast contains valid non flow code that we need to visit.
This commit is contained in:
committed by
Henry Zhu
parent
fe2b9d73ed
commit
16716ea3de
@@ -30,6 +30,8 @@ let memberExpressionOptimisationVisitor = {
|
||||
},
|
||||
|
||||
Flow(path) {
|
||||
// Do not skip TypeCastExpressions as the contain valid non flow code
|
||||
if (path.isTypeCastExpression()) return;
|
||||
// don't touch reference in type annotations
|
||||
path.skip();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user