fixed async declarator

canary
WolverinDEV 2019-01-26 18:06:32 +01:00
parent cd74e94925
commit f882e8a0bc
3 changed files with 8 additions and 1 deletions

View File

@ -265,7 +265,7 @@ generators[SyntaxKind.FunctionDeclaration] = (settings, stack, node: ts.Function
generators[SyntaxKind.MethodDeclaration] = (settings, stack, node: ts.MethodDeclaration) => {
if(settings.remove_private.method && has_private(node.modifiers)) return;
return ts.createMethod(node.decorators, node.modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, _generate_param_declare(settings, stack, node.parameters), node.type, undefined);
return ts.createMethod(node.decorators, remove_modifier(node.modifiers, SyntaxKind.AsyncKeyword), node.asteriskToken, node.name, node.questionToken, node.typeParameters, _generate_param_declare(settings, stack, node.parameters), node.type, undefined);
};
generators[SyntaxKind.GetAccessor] = (settings, stack, node: ts.GetAccessorDeclaration) => {

View File

@ -8,3 +8,6 @@ declare interface X {
type: any;
c: YY.B;
}
declare class X {
static x();
}

View File

@ -7,3 +7,7 @@ interface X {
type: "",
c: YY.B
}
class X {
static async x();
}