Skip to content

addMethodDeclaration codefix creates a generator function when target…#24760

Merged
mhegazy merged 2 commits into
microsoft:masterfrom
krk:codefix-asterisk
Jun 8, 2018
Merged

addMethodDeclaration codefix creates a generator function when target…#24760
mhegazy merged 2 commits into
microsoft:masterfrom
krk:codefix-asterisk

Conversation

@krk
Copy link
Copy Markdown
Contributor

@krk krk commented Jun 7, 2018

… is child of a YieldExpression, resolves #24728

Fixes #24728

@msftclas
Copy link
Copy Markdown

msftclas commented Jun 7, 2018

CLA assistant check
All CLA requirements met.

Comment thread src/services/codefixes/helpers.ts Outdated
/*decorators*/ undefined,
/*modifiers*/ makeStatic ? [createToken(SyntaxKind.StaticKeyword)] : undefined,
/*asteriskToken*/ undefined,
/*asteriskToken*/ asterisk,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, i would inline this as:

isYieldExpression(parent) ? createToken(SyntaxKind.AsteriskToken) : undefined;

@mhegazy mhegazy merged commit b4dea5e into microsoft:master Jun 8, 2018
@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jun 8, 2018

thanks!

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

codefix for new method should include asterisk for generator functions

3 participants