Skip to content

No support for exported flow types #359

@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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy