Skip to content

Commit

Permalink
Fix estree
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 24, 2021
1 parent 053e45d commit 73151fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/babel-parser/src/plugins/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2757,6 +2757,9 @@ export default (superClass: Class<Parser>): Class<Parser> =>

declareClassPrivateMethodInScope(node: N.ClassPrivateMethod, kind: number) {
if (node.type === "TSDeclareMethod") return;
// This happens when using the "estree" plugin.
if (node.type === "MethodDefinition" && !node.value.body) return;

super.declareClassPrivateMethodInScope(node, kind);
}

Expand Down

0 comments on commit 73151fc

Please sign in to comment.