mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Inlined asterisk token creation.
This commit is contained in:
parent
acbda14450
commit
d7a0619009
@ -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) =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user