Skip to content

Commit

Permalink
Delete static modifier from static blocks node
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Aug 18, 2021
1 parent 614b486 commit 4eacbef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/babel-parser/src/plugins/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2396,6 +2396,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
const callParseClassMemberWithIsStatic = () => {
const isStatic = !!member.static;
if (isStatic && this.eat(tt.braceL)) {
delete member.static;
if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);
}
Expand Down

0 comments on commit 4eacbef

Please sign in to comment.