Call inner function instead of 1:1 copy to plugin (#294)
This commit is contained in:
parent
68a173c97c
commit
5977479f57
@ -1051,8 +1051,8 @@ export default function (instance) {
|
||||
});
|
||||
|
||||
// parse type parameters for class methods
|
||||
instance.extend("parseClassMethod", function () {
|
||||
return function (classBody, method, isGenerator, isAsync) {
|
||||
instance.extend("parseClassMethod", function (inner) {
|
||||
return function (classBody, method, ...args) {
|
||||
if (method.variance) {
|
||||
this.unexpected(method.variancePos);
|
||||
}
|
||||
@ -1061,8 +1061,8 @@ export default function (instance) {
|
||||
if (this.isRelational("<")) {
|
||||
method.typeParameters = this.flowParseTypeParameterDeclaration();
|
||||
}
|
||||
this.parseMethod(method, isGenerator, isAsync);
|
||||
classBody.body.push(this.finishNode(method, "ClassMethod"));
|
||||
|
||||
inner.call(this, classBody, method, ...args);
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user