Fix flowtype errors introduced in #7503. (#7531)

This commit is contained in:
Logan Smyth
2018-03-08 16:02:28 -08:00
committed by GitHub
parent 4b6c7ac0f6
commit 7901e7d1b9
2 changed files with 4 additions and 0 deletions

View File

@@ -288,12 +288,14 @@ export default (superClass: Class<Parser>): Class<Parser> =>
isGenerator: boolean,
isAsync: boolean,
isPattern: boolean,
containsEsc: boolean,
): ?N.ObjectMethod {
const node: N.EstreeProperty = (super.parseObjectMethod(
prop,
isGenerator,
isAsync,
isPattern,
containsEsc,
): any);
if (node) {

View File

@@ -1837,6 +1837,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
isAsync: boolean,
isPattern: boolean,
refShorthandDefaultPos: ?Pos,
containsEsc: boolean,
): void {
if ((prop: $FlowFixMe).variance) {
this.unexpected((prop: $FlowFixMe).variance.start);
@@ -1859,6 +1860,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
isAsync,
isPattern,
refShorthandDefaultPos,
containsEsc,
);
// add typeParameters if we found them