diff --git a/packages/babel-parser/src/plugins/typescript/index.js b/packages/babel-parser/src/plugins/typescript/index.js index 829b71dbe9cf..13aa5c75bfc7 100644 --- a/packages/babel-parser/src/plugins/typescript/index.js +++ b/packages/babel-parser/src/plugins/typescript/index.js @@ -1674,7 +1674,7 @@ export default (superClass: Class): Class => } else if (this.isLineTerminator()) { break; } - + if (this.match(tt.name)) { return this.tsParseModuleOrNamespaceDeclaration(node); }