Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for yield return #143

Merged
merged 3 commits into from
Jan 17, 2017

Conversation

alangpierce
Copy link
Member

Copy link
Collaborator

@eventualbuddha eventualbuddha left a comment

Choose a reason for hiding this comment

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

Feel like taking a stab at the mapper for yield too?

@alangpierce
Copy link
Member Author

Heh, sure. Yeah, I guess at this point it shouldn't be so bad. :-)

@alangpierce
Copy link
Member Author

(I just updated the PR with mappers for yield and yield from.)

@@ -48,3 +54,29 @@ function mapMultiplyOp(context: ParseContext, node: CoffeeOp) {
mapAny(context, node.second)
);
}

function mapYieldOp(context: ParseContext, node: CoffeeOp) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing return type.

Copy link
Member Author

Choose a reason for hiding this comment

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

mapMultiplyOp was as well, and then I looked it up and learned that typescript can infer the type based on what's actually returned. But I guess you prefer to have explicit return types anyway? Would be nice if there was a tslint rule for that, although from a quick glance I don't see one.

}
}

function mapYieldFromOp(context: ParseContext, node: CoffeeOp) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing return type.

@alangpierce alangpierce merged commit 7cd51c3 into decaffeinate:master Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants