Skip to content

Commit

Permalink
chore: update flow/typescript interface
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jan 10, 2020
1 parent 77bdd84 commit 77aabfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/babel-parser/src/plugins/flow.js
Expand Up @@ -2266,9 +2266,10 @@ export default (superClass: Class<Parser>): Class<Parser> =>

parsePropertyName(
node: N.ObjectOrClassMember | N.ClassMember | N.TsNamedTypeElementBase,
isPattern: boolean,
): N.Identifier {
const variance = this.flowParseVariance();
const key = super.parsePropertyName(node);
const key = super.parsePropertyName(node, isPattern);
// $FlowIgnore ("variance" not defined on TsNamedTypeElementBase)
node.variance = variance;
return key;
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/plugins/typescript/index.js
Expand Up @@ -507,7 +507,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
return idx;
}

this.parsePropertyName(node);
this.parsePropertyName(node, /* isPattern */ false);
return this.tsParsePropertyOrMethodSignature(node, readonly);
}

Expand Down

0 comments on commit 77aabfd

Please sign in to comment.