since it it not possible to create a arrow generator function, yield is never used in the context of a arrow function.
var arrowGenerator = *() => { };
then you should be able to and use yield in the context of the generator function. just like this
function* generator() {
funcWithCallback((value) => {
yield value;
});
}
but in babel it uses yield in context of the arrow function and not the genreators.
i want to do this so you don't need to return a callback function with the value, just to yield it.
function* gen() {
yield function (callback) {
funcWithCallback(callback);
}
}