documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Flow type issue

Open 4zuko opened this issue 6 years ago • 1 comments

Hi. I am using the latest version of documentation.js. Please check the screenshot shown below. Generated HTML doesn't show valid input Flow types and return Flow type if I use a different Flow type syntax. It uses any type for input parameters. The return type is missing. Thanks.

image

4zuko avatar Nov 19 '19 17:11 4zuko

Just confusing. Maybe it would be better to hide Parameters section in this case. Type: TestFunc can be linked with TestFunc type using @type jsDoc attribute.

/**
 * TestFunc Description
 */
type TestFunc = (a: User, b: Test) => User;

/**
 * TEST 2
 * @type {TestFunc}
 */
const test2: TestFunc = (a, b) => a;

4zuko avatar Nov 19 '19 17:11 4zuko