clenemt / docdash

:zap: Lodash inspired JSDoc 3 template/theme
http://clenemt.github.io/docdash/
Other
824 stars 201 forks source link

Support generators (@yields) #56

Closed towerofnix closed 5 years ago

towerofnix commented 5 years ago

JSDoc supports use of the @generator and @yields tags to support documentation for generators. The @generator tag is already (sort-of) understood by docdash, but the @yields tag is not.

An example function signature outputted from docdash: "(async, generator) getFollowing()"

In order to properly support documenting generators, support for the @yields tag should be added.

I suggest treating it very similarly to a @returns tag; the above example would say, for example, (async, generator) getFollowing() → {string}, and below the method description, there would be a "Returns: Type - String" section.

ar2rsawseen commented 5 years ago

Added it here: https://github.com/clenemt/docdash/commit/a12fa912e452a8c8651a543c4a44c914f0751e7a Will release soon