Skip to content

Commit 8274082

Browse files
committed
fix arrow function with generic
1 parent 678956f commit 8274082

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ export function tsPlugin(options?: {
481481

482482
return super.parseArrowExpression(
483483
res,
484-
/* params are already set */ res.params,
484+
/* params are already set */ null,
485485
/* async */ true,
486486
/* forInit */ forInit
487487
);
@@ -3228,11 +3228,9 @@ export function tsPlugin(options?: {
32283228
return node.expression;
32293229
}
32303230

3231-
toAssignableList(exprList: any[], isBinding: boolean): any {
3232-
if (!exprList) {
3233-
return exprList;
3234-
}
3235-
3231+
toAssignableList(exprList: any[] | null, isBinding: boolean): any {
3232+
if (!exprList) exprList = [];
3233+
32363234
for (let i = 0; i < exprList.length; i++) {
32373235
const expr = exprList[i];
32383236

0 commit comments

Comments
 (0)