Skip to content

Conversation

@rbuckton
Copy link
Contributor

This PR adds the yield* support to __generator from #10106, and leverages the yield* transform to support our emit for captured block-scope loop variables when compiled inside of a down-level async function.

Fixes #10889

const generatorHelper = `
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (sent[0] === 1) throw sent[1]; return sent[1]; }, trys: [], stack: [] }, sent, f;
var _ = { label: 0, sent: function() { if (sent[0] === 1) throw sent[1]; return sent[1]; }, trys: [], stack: [] }, sent, y, f, v, r;
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add comment to generatorHelper to describe meanings of all variables

@mhegazy
Copy link
Contributor

mhegazy commented Sep 13, 2016

we will need to update the one in tslib as well.

@rbuckton rbuckton merged commit 02334d8 into master Sep 13, 2016
@rbuckton rbuckton deleted the fix10889 branch September 13, 2016 21:31
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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.

5 participants