6

my question is rather short:

How do I document typescript code properly? I found out that for projects becoming bigger and bigger, it is important to look at a function and immediately know parameters, what it returns and side-effects etc. It is tiring to have just a bunch of comments before a function, most of the time these 'blocks' even look differently in style. What I am looking for is a documentation tool like javadoc or doxygen for typescript. Is there anything out there? Or is it possible to 'abuse' a documentation tool and get it to work with typescript?

Max Beikirch
  • 1,029
  • 1
  • 8
  • 6
  • See http://stackoverflow.com/questions/12687061/is-there-already-support-for-xml-documentation-inside-typescript – Arseni Mourzenko Jan 19 '13 at 13:39
  • Already saw that one, but I wanted to know whether there is any working solution yet to create a real documentation. The "raw" comment-blocks are exactly what I try to avoid :-) – Max Beikirch Jan 19 '13 at 18:14

1 Answers1

1

If you are looking for something like JavaDoc, you might find JsDoc useful.

I have written a small tool for converting JsDoc comments in TypeScript definition files into JavaDoc-style HTML pages with links between types.

You can find it here, but right now it needs be built from source:

typescript-docs

Phil Freeman
  • 231
  • 1
  • 4