We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acbda14 commit d7a0619Copy full SHA for d7a0619
1 file changed
src/services/codefixes/helpers.ts
@@ -117,12 +117,10 @@ namespace ts.codefix {
117
makeStatic: boolean,
118
preferences: UserPreferences,
119
): MethodDeclaration {
120
- const asterisk = parent.kind === SyntaxKind.YieldExpression ? createToken(SyntaxKind.AsteriskToken) : undefined;
121
-
122
return createMethod(
123
/*decorators*/ undefined,
124
/*modifiers*/ makeStatic ? [createToken(SyntaxKind.StaticKeyword)] : undefined,
125
- /*asteriskToken*/ asterisk,
+ /*asteriskToken*/ isYieldExpression(parent) ? createToken(SyntaxKind.AsteriskToken) : undefined,
126
methodName,
127
/*questionToken*/ undefined,
128
/*typeParameters*/ inJs ? undefined : map(typeArguments, (_, i) =>
0 commit comments