Skip to content

Commit 9ab7988

Browse files
committed
fix for generic async arrow function proceeding an import statement
1 parent 4a0d082 commit 9ab7988

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export function tsPlugin(options?: {
430430
return (
431431
base.type === 'Identifier' &&
432432
base.name === 'async' &&
433-
this.lastTokEndLoc.column === base.end &&
433+
this.lastTokEnd === base.end &&
434434
!this.canInsertSemicolon() &&
435435
base.end - base.start === 5 &&
436436
base.start === this.potentialArrowAt
@@ -4165,7 +4165,7 @@ export function tsPlugin(options?: {
41654165
override = modified.override;
41664166
readonly = modified.readonly;
41674167
if (allowModifiers === false && (accessibility || readonly || override)) {
4168-
this.raise(startLoc.start, TypeScriptError.UnexpectedParameterModifier);
4168+
this.raise(startLoc.column, TypeScriptError.UnexpectedParameterModifier);
41694169
}
41704170
}
41714171

0 commit comments

Comments
 (0)