Skip to content

Commit 678956f

Browse files
committed
wip
1 parent 8549146 commit 678956f

File tree

5 files changed

+6
-349
lines changed

5 files changed

+6
-349
lines changed

src/index.ts

Lines changed: 3 additions & 5 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.lastTokEnd === base.end &&
433+
this.lastTokEndLoc.column === base.end &&
434434
!this.canInsertSemicolon() &&
435435
base.end - base.start === 5 &&
436436
base.start === this.potentialArrowAt
@@ -466,8 +466,6 @@ export function tsPlugin(options?: {
466466
node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier);
467467
// Don't use overloaded parseFunctionParams which would look for "<" again.
468468

469-
// Initialize params array before calling parseFunctionParams
470-
node.params = [];
471469
super.parseFunctionParams(node);
472470
node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
473471

@@ -3232,9 +3230,9 @@ export function tsPlugin(options?: {
32323230

32333231
toAssignableList(exprList: any[], isBinding: boolean): any {
32343232
if (!exprList) {
3235-
return exprList; // Return null/undefined as-is
3233+
return exprList;
32363234
}
3237-
3235+
32383236
for (let i = 0; i < exprList.length; i++) {
32393237
const expr = exprList[i];
32403238

test/arrow-function_type_test_async_generic_after_import/expected.json

Lines changed: 0 additions & 170 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// import {} from './config'
2+
3+
const loadDataWithGeneric = async <T>() => {};

test/arrow-function_type_test_async_generic_with_import/expected.json

Lines changed: 0 additions & 170 deletions
This file was deleted.

test/arrow-function_type_test_async_generic_with_import/input.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)