documentationjs / documentationjs/documentation

Unwieldy documentation of Flow type objects

Open
#921 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

I have a `type` definition like this:

```js
/**
* A plan service.
*/
export type PlanService = {
id: PlanServiceIds,
included: number,
price: number,
step: number
};
```

The output documentation looks like this (in Markdown — the HTML output is pretty has the same problem):

```markdown
### PlanService

A plan service.

Type: {id: [PlanServiceIds](#planserviceids), included: [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), price: [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number), step: [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)}

**Properties**

- `id` **[PlanServiceIds](#planserviceids)**
- `included` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `price` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)**
- `step` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)**
```

What I'm seeing as a "problem" is the lengthy, kind of illegible `Type:` line (especially illegible for larger objects) that duplicates the information in the `Properties` list.

Is there a way to comment-up this `type` that produces cleaner output?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.