Hacker News new | ask | show | jobs
by vaughan 1865 days ago
Combining TypeScript's API Extractor (Microsoft) with Docusaurus is great.

You can mix guides/tutorials with generated API docs.

For example, I really like having simple API docs in the `readme.md` file, but then also in-depth docs elsewhere.

MDX + remark really let you do anything you want. It's the ultimate documentation stack.

[1]: https://api-extractor.com/pages/setup/generating_docs/

1 comments

Do you have any good examples of this in action and showing configuration?

I've been wrestling with this as we work on finalizing the new "RTK Query" APIs for Redux Toolkit. I'd love to have some auto-generated TS API docs embedded in the hand-written Markdown pages. My biggest questions are things like how to present reasonable details on some of our typedefs, which can get insanely complex and readers don't need to see all the internal sub-types.

I recently opened up an RTK issue asking for suggestions on TS API ref integration:

https://github.com/reduxjs/redux-toolkit/issues/1046