Skip to content

Commit

Permalink
Use super.parseFunctionBodyAndFinish
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Sep 18, 2020
1 parent c242660 commit f2ff434
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/plugins/typescript/index.js
Expand Up @@ -1780,7 +1780,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
// $FlowIgnore
node.declare
) {
this.finishNode(node, bodilessType);
super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
return;
}
}
Expand Down
Expand Up @@ -12,7 +12,7 @@
"body": [
{
"type": "TSDeclareFunction",
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}},
"start":0,"end":25,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},
"declare": true,
"id": {
"type": "Identifier",
Expand All @@ -21,13 +21,13 @@
},
"generator": false,
"async": false,
"params": []
},
{
"type": "BlockStatement",
"start":23,"end":25,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":25}},
"body": [],
"directives": []
"params": [],
"body": {
"type": "BlockStatement",
"start":23,"end":25,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":25}},
"body": [],
"directives": []
}
}
],
"directives": []
Expand Down

0 comments on commit f2ff434

Please sign in to comment.