recurse into type casts when trying to get it's expression - fixes #facebook/react-native#1526

This commit is contained in:
Sebastian McKenzie 2015-06-07 02:45:06 +01:00
parent 2ede226ef9
commit 64f4209119

View File

@ -1,3 +1,5 @@
import * as t from "../../../types";
export var metadata = {
group: "builtin-trailing"
};
@ -23,7 +25,10 @@ export function Func/*tion*/(node) {
}
export function TypeCastExpression(node) {
return node.expression;
do {
node = node.expression;
} while(t.isTypeCastExpression(node));
return node;
}
export function ImportDeclaration(node) {