Lavadrop Logo
Edit page
IntroductionAbout these Docs

The documentation on this site is generated in a few steps:

  1. The author is required to provide TSDoc comments in the source code. This is enforced for each pull request, so it can be safely expected.
  2. The source code is transpiled into JavaScript, along with a type definition file beside it. The comments are preserved in both of these generated files; however, the guts of the function are removed from the definition file. This is ideal, because all we need to generate documentation is the TSDoc comments, the call signature and the return type of the function.
  3. Using the AST provided by the TypeScript compiler API, the information above is extracted into a JavaScript object, from which two files are generated: an MDX file for this Docz website and a README file that is published with each release of a package.

Because the source files and these generated files all come from the same source, this means 100% consistency between the documentation you see in your editor, the README and of course this website!