It would be nice to be able to use the @yields JSDoc tag.
We work with JS and JSDoc, but taking advantage of TSC and VSCode.
We also use the valid-jsdoc eslint rule.
We have:
/** @typedef Thing (...) */
function* walkThings() {
//... some yield here and there
}
We want to
/**
* @yields {Thing}
*/
function* walkThings() {
//... some yield here and there
}
We can't do
/**
* @returns {IterableIterator<Something>}
*/
function* walkThings() {
//... some yield here and there
}
Because it doesn't return, but yields, and eslint complains about it. We can disable the rule here, but it is not the desirable scenario.
It would be nice to be able to use the
@yieldsJSDoc tag.We work with JS and JSDoc, but taking advantage of TSC and VSCode.
We also use the valid-jsdoc eslint rule.
We have:
We want to
We can't do
Because it doesn't
return, butyields, and eslint complains about it. We can disable the rule here, but it is not the desirable scenario.