mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Merge pull request #24760 from krk/codefix-asterisk
addMethodDeclaration codefix creates a generator function when target…
This commit is contained in:
@@ -111,7 +111,7 @@ namespace ts.codefix {
|
||||
}
|
||||
|
||||
export function createMethodFromCallExpression(
|
||||
{ typeArguments, arguments: args }: CallExpression,
|
||||
{ typeArguments, arguments: args, parent: parent }: CallExpression,
|
||||
methodName: string,
|
||||
inJs: boolean,
|
||||
makeStatic: boolean,
|
||||
@@ -120,7 +120,7 @@ namespace ts.codefix {
|
||||
return createMethod(
|
||||
/*decorators*/ undefined,
|
||||
/*modifiers*/ makeStatic ? [createToken(SyntaxKind.StaticKeyword)] : undefined,
|
||||
/*asteriskToken*/ undefined,
|
||||
/*asteriskToken*/ isYieldExpression(parent) ? createToken(SyntaxKind.AsteriskToken) : undefined,
|
||||
methodName,
|
||||
/*questionToken*/ undefined,
|
||||
/*typeParameters*/ inJs ? undefined : map(typeArguments, (_, i) =>
|
||||
|
||||
Reference in New Issue
Block a user