Skip to content

Remove type section output when dealing with objects #1326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andrewdelprete opened this issue Jun 2, 2020 · 0 comments · Fixed by #1327
Closed

Remove type section output when dealing with objects #1326

andrewdelprete opened this issue Jun 2, 2020 · 0 comments · Fixed by #1327

Comments

@andrewdelprete
Copy link
Contributor

andrewdelprete commented Jun 2, 2020

When an object is flow typed, a type heading AND a properties heading is rendered. The type section seems redundant and isn't formatted, whereas the properties section is. When dealing with large objects, the type section takes up a lot of space and isn't very legible.

Example:

export type MyType = {
  a: string,
  b: number,
  c: boolean
}
// output

## MyType

Type: {a: [string][3], b: [number][4], c: [boolean][5]}

### Properties

-   `a` **[string][3]** 
-   `b` **[number][4]** 
-   `c` **[boolean][5]** 

I think removing type in this case makes sense since properties is formatted and rendered better.

  • What version of documentation.js are you using?: 13.0.0

  • How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): CLI

@andrewdelprete andrewdelprete changed the title Remove type output when dealing with objects Remove type section output when dealing with objects Jun 2, 2020
andrewdelprete added a commit to andrewdelprete/documentation that referenced this issue Jun 2, 2020
When an object is flow typed, a `type` AND `properties` section is
rendered. The type section seems redundant and isn't formatted, whereas
the properties section is. This PR removes the `type` section when
dealing with an object type.

✅ Closes: documentationjs#1326
@tmcw tmcw closed this as completed in #1327 Jun 4, 2020
tmcw pushed a commit that referenced this issue Jun 4, 2020
When an object is flow typed, a `type` AND `properties` section is
rendered. The type section seems redundant and isn't formatted, whereas
the properties section is. This PR removes the `type` section when
dealing with an object type.

✅ Closes: #1326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant