Skip to content

Commit e5285dd

Browse files
committed
Retain async / generator behavior on class methods
1 parent e5f41cd commit e5285dd

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

transforms/helpers/eo-prop/private/function-expression.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export default class EOFunctionExpressionProp extends AbstractEOProp<
5151
body: this.value.body,
5252
comments: this.comments,
5353
decorators: this.existingDecorators,
54+
generator: this.value.generator ?? false,
55+
async: this.value.async ?? false,
5456
}),
5557
this.replaceSuperWithUndefined
5658
);

transforms/helpers/eo-prop/private/method.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export default class EOMethod extends AbstractEOProp<
5454
body: this.body,
5555
comments: this.comments,
5656
decorators: this.existingDecorators,
57+
generator: this.value.generator ?? false,
58+
async: this.value.async ?? false,
5759
}),
5860
this.replaceSuperWithUndefined
5961
);

0 commit comments

Comments
 (0)