-
Notifications
You must be signed in to change notification settings - Fork 485
Flow docs #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Try using There is still more work to do when it comes to outputting the types nicely. |
Same output |
Oh, is on beta10 |
Hmmm... I guess the changes are not in the latest beta release. Try using master instead. |
I am a beta behind, updating... |
Still, same output |
When using |
I have to look at it. |
I figured it out. I'm currently not handling |
No worries! |
This improves detection of cases where we have: ```js export const f = function () {}; export const o = { ... }; ``` and similarly indirection using default/named. ```js const f = function () {}; export {f}; ``` Fixes documentationjs#543
This improves detection of cases where we have: ```js export const f = function () {}; export const o = { ... }; ``` and similarly indirection using default/named. ```js const f = function () {}; export {f}; ``` Fixes #543
@arv I am getting the same behaviour using beta12. My project is composed by modules that exports an object with methods: // @flow
const Foo = {
/**
* Desc
*/
method: (params: <T>): Promise<T> => {};
}
export default Foo; import foo from './path/foo.js'
export default {
foo
} I get a empty HTML output, without params and return values using |
I finally got to look at this... The problem is the If you write: export default 42; as: const temp = 42;
export default temp; ...we do generate documentation for it. |
With `--document-exported` we used to only support export default Declaration and export default IdentifierExpression With this change we generate a comment for all default exports. Fixes documentationjs#543
With `--document-exported` we used to only support ```js export default Declaration ``` and ```js export default IdentifierExpression ``` With this change we generate a comment for all default exports. Fixes documentationjs#543
With `--document-exported` we used to only support ```js export default Declaration ``` and ```js export default IdentifierExpression ``` With this change we generate a comment for all default exports. Fixes documentationjs#543
With `--document-exported` we used to only support ```js export default Declaration ``` and ```js export default IdentifierExpression ``` With this change we generate a comment for all default exports. Fixes #543
@montogeek Can you try with master to see if this works sufficiently for you? Thanks. |
@arv With master, I get the same results as the original code: #543 (comment) |
Thanks for working on it! I can keep writing JSDocs manually :) |
@montogeek I'm not sure where we are with this? Can you provide an example input and an expected outut? #623 did add tests for what I thought was missing. Thanks. |
@arv I think I am having the same problem as @montogeek. Here is a bit more context: /**
* This function adds one to its input.
*/
var foo = {
/** bar member */
bar: function addOne(input: number): number {
return input + 1;
}
} the previous input with renders as: On the other hand, if I write it like this: /**
* This function adds one to its input.
*/
var foo = {}
/** bar member */
foo.bar = function addOne(input: number): number {
return input + 1;
} Both cases are definitely equivalent but I hope this helps :) |
@carocad I think this is fixed in 4.0.0-rc-0. I'm getting identical results for those two cases: |
Ignore the |
@arv I can confirm that with the version PS: You had a typo in the version |
Closing. Feel free to open a new issue if you see something else. |
Hi!
This is the HTML generate by the following code:

Shouldn't it create docs for the params and return values?
I am using documentation 4.0.0-beta9
Thanks!
The text was updated successfully, but these errors were encountered: