Update flow to 0.59 and fix some flow issues (#6957)
This commit is contained in:
committed by
Henry Zhu
parent
607916880d
commit
de5ab72c49
@@ -1513,10 +1513,9 @@ export default class StatementParser extends ExpressionParser {
|
||||
}
|
||||
}
|
||||
|
||||
checkDeclaration(node: N.Pattern): void {
|
||||
checkDeclaration(node: N.Pattern | N.ObjectProperty): void {
|
||||
if (node.type === "ObjectPattern") {
|
||||
for (const prop of node.properties) {
|
||||
// $FlowFixMe (prop may be an AssignmentProperty, in which case this does nothing?)
|
||||
this.checkDeclaration(prop);
|
||||
}
|
||||
} else if (node.type === "ArrayPattern") {
|
||||
|
||||
@@ -74,10 +74,9 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
node.expression = false;
|
||||
}
|
||||
|
||||
checkDeclaration(node: N.Pattern): void {
|
||||
checkDeclaration(node: N.Pattern | N.ObjectProperty): void {
|
||||
if (isSimpleProperty(node)) {
|
||||
// $FlowFixMe
|
||||
this.checkDeclaration(node.value);
|
||||
this.checkDeclaration(((node: any): N.EstreeProperty).value);
|
||||
} else {
|
||||
super.checkDeclaration(node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user