white lists getter and setter acceseors for having stage-2 decorators (#766)
- adds `get` and `set` kind in addition to `method` to the list of allowed class members for having a decorator, - adds tests for this two cases (decorator + set and decorator + get)
This commit is contained in:
committed by
Daniel Tschinder
parent
86abc16b37
commit
fee7de2c1d
@@ -899,7 +899,7 @@ export default class StatementParser extends ExpressionParser {
|
||||
|
||||
if (
|
||||
this.hasPlugin("decorators2") &&
|
||||
member.kind != "method" &&
|
||||
["method", "get", "set"].indexOf(member.kind) === -1 &&
|
||||
member.decorators &&
|
||||
member.decorators.length > 0
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user