diff --git a/packages/babel-parser/src/plugins/typescript/index.js b/packages/babel-parser/src/plugins/typescript/index.js index 6092341f2e9f..7a1fbc80cc8d 100644 --- a/packages/babel-parser/src/plugins/typescript/index.js +++ b/packages/babel-parser/src/plugins/typescript/index.js @@ -1676,10 +1676,9 @@ export default (superClass: Class): Class => if (next) { if (this.hasFollowingLineBreak()) return false; this.next(); - } else if (this.isLineTerminator()) { - return false; + return true; } - return true; + return !this.isLineTerminator(); } tsTryParseGenericAsyncArrowFunction(