generated from tc39/template-for-proposals
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
YieldExpression:yield*AssignmentExpression
...
4. Let received be NormalCompletion(undefined).
May it update to 4. Let received be NormalCompletion(LastYieldValue) so we can satisfy:
function *g1() {
yield function.sent
}
function *g2() {
yield* g1()
}
g2().next(42) // => {value:42}But allow delegate generator access the last yield value also have dark side:
function* service() {
const token = function.sent
if (auth(token)) {
yield* serviceOf3rdParty()
}
}
const serv = service()
serv.next('my-secret-token')Metadata
Metadata
Assignees
Labels
No labels