Skip to content

Remove type section output when dealing with objects #1326

@andrewdelprete

Description

@andrewdelprete

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions