Skip to content

Support for flowtype DecalartionsΒ #587

Open
@Davorak

Description

@Davorak

Here is an example of using a flowtype declaration to give a type annotation to a function:

/**
 * test function returns true
*/
declare var test : () => boolean;
function test(){
  return true;
}

The documentation produced does not capture the type annotation:
image

While if you use the syntax:

/**
 * test function returns true
*/
function test() : boolean {
  return true;
}

It produces the documentation which does capture the type annotation:
image

Unclear to me how realistic it is to support flowtype's various syntaxes for type annotation without using flow directly to parse the file however.

Let me know if this fits into the scope for this project/repo.

flowtype declaration doc:
https://flowtype.org/docs/declarations.html

$ documentation --version
4.0.0-beta12

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions