Skip to content

No support for exported flow types #359

Closed
@trodrigues

Description

@trodrigues

When splitting and reusing types between multiple modules, it's common to use Flow's export type syntax.

This doesn't seem to be actually documented but it's explained in this blog post: http://flowtype.org/blog/2015/02/18/Import-Types.html

Right now, documentation.js seems to only infer the name from these kinds of declarations. So if you have something like:

/**
 * Define my object API
 */
export type SomeObjectAPI = {
  method: (param: string) => boolean
}

the generated documentation only shows something like:

SomeObjectAPI
Define my object API

However, if I were to do something like

/**
 * Define my object API
 */
type SomeObject = {
  method: (param: string) => boolean
}
export type SomeObjectAPI = SomeObject

it would work fine.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions