mako-taco/DecorateThis

Generate documentations through `param` and `return`

mako-taco opened this issue · 0 comments

Ideally, i'd like to have decorators replace JSDocs for documenting code, which means we need a way to generate pretty docs from a decorated class or object. AFAIK, there are no AST-generating libraries which handle decorator syntax, so that will need to be solved first.

Proposed syntax:

let typedef = {name: String, age: Number}

@jsdoc(options)
class T {
  @param(Type, 'Description for arg0')
  @param(typedef, 'Description for arg1')
  method(arg0, arg1) {
  }
}

Requirements:

  • Docs must be stripped out upon minification of code
  • CLI must produce a folder of HTML docs in a configurable location
  • Reasonable support of describing duck-typed / complex types

Any class decorated with @jsdoc will have docs exported by a CLI tool.