# TypeDoc

## Setting Up TypeDoc for Code Documentation

***

1. Install TypeDoc into your project with `npm`

```
npm install typedoc --save-dev
```

2. Create `README.md` to add custom documentation's index page
3. 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.

```json
{
    "entryPoints": ["./src"],
    "entryPointStrategy": "expand",
    "out": "./docs",
    "tsconfig": "./tsconfig.json",
    "name": "Project's Name"
}
```

4. Generate your documentation with this command

```
npx typedoc
```

5. Access the documentation on the directory specified in the `typedoc.json`
