Skip to content

Commit

Permalink
fix: declare should works on estree+flow
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Nov 19, 2020
1 parent 85cfb25 commit 45ea5ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/babel-parser/src/plugins/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,8 @@ export default (superClass: Class<Parser>): Class<Parser> =>
if (member.declare) {
if (
member.type !== "ClassProperty" &&
member.type !== "ClassPrivateProperty"
member.type !== "ClassPrivateProperty" &&
member.type !== "PropertyDefinition" // estree
) {
this.raise(pos, FlowErrors.DeclareClassElement);
} else if (member.value) {
Expand Down

0 comments on commit 45ea5ea

Please sign in to comment.