Inlined asterisk token creation.

This commit is contained in:
krk 2018-06-08 14:49:11 +03:00
parent acbda14450
commit d7a0619009

View File

@ -117,12 +117,10 @@ namespace ts.codefix {
makeStatic: boolean,
preferences: UserPreferences,
): MethodDeclaration {
const asterisk = parent.kind === SyntaxKind.YieldExpression ? createToken(SyntaxKind.AsteriskToken) : undefined;
return createMethod(
/*decorators*/ undefined,
/*modifiers*/ makeStatic ? [createToken(SyntaxKind.StaticKeyword)] : undefined,
/*asteriskToken*/ asterisk,
/*asteriskToken*/ isYieldExpression(parent) ? createToken(SyntaxKind.AsteriskToken) : undefined,
methodName,
/*questionToken*/ undefined,
/*typeParameters*/ inJs ? undefined : map(typeArguments, (_, i) =>