add support for typecasts in path static evaluation
This commit is contained in:
parent
f4d7cc55c1
commit
572261f9ce
@ -76,6 +76,10 @@ export function evaluate(): { confident: boolean; value: any } {
|
||||
}
|
||||
}
|
||||
|
||||
if (path.isTypeCastExpression()) {
|
||||
return evaluate(path.get("expression"));
|
||||
}
|
||||
|
||||
if (path.isIdentifier() && !path.scope.hasBinding(node.name, true)) {
|
||||
if (node.name === "undefined") {
|
||||
return undefined;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user