TypeDoc

Setting Up TypeDoc for Code Documentation


  1. Install TypeDoc into your project with npm

npm install typedoc --save-dev
  1. Create README.md to add custom documentation's index page

  2. Configure TypeDoc

    1. Create typedoc.json on the root of your project

    2. Copy below configuration into the json file

    3. The documentation will be generated and saved in the directory specified by the out option, which is ./docs in this configuration.

{
    "entryPoints": ["./src"],
    "entryPointStrategy": "expand",
    "out": "./docs",
    "tsconfig": "./tsconfig.json",
    "name": "Project's Name"
}
  1. Generate your documentation with this command

npx typedoc
  1. Access the documentation on the directory specified in the typedoc.json

Last updated