Modules with only exports from other modules result in empty ToC
- Dominant language
- TypeScript
- Stars
- 105
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
**What is the current behavior?**
When modules only have _export from_ statements it results in an empty ToC.
Eg. the following `src/http/index.ts` file:
```ts
export * from './http'
export * from './utils'
```
Would result in this generated doc:
```md
---
title: http/index.ts
nav_order: 1
parent: Modules
---
## index overview
Some overview
---
Table of contents
---
```
**What is the expected behavior?**
I'm not sure what should be the expected behaviour 🤔
One idea is to remove the ToC title, since there's no ToC. But that would still result in an empty document.
We could show all the exports from the module instead.
Or add a new section that mentions all the exported modules. hadoc does this, module exports show up in the docs as a reference to the module (see [Data.Map documentation](https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Map.html))
```hs
module Data.Map
( module Data.Map.Lazy
-- ...
) where
```

```hs
module Data.Map
( module Data.Map.Lazy
-- ...
) where
```
**Which versions of docs-ts?**
I'm using `v0.6.4`
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the example src/http/index.ts containing only export-from statements and inspect the generated document's empty table of contents. First resolve with maintainers whether exported modules, exports, or no ToC should be shown; done requires an agreed output and a regression test for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100