Skip to content

Infer types from type alias statements #227

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

Closed
rjbailey opened this issue Nov 4, 2015 · 1 comment
Closed

Infer types from type alias statements #227

rjbailey opened this issue Nov 4, 2015 · 1 comment

Comments

@rjbailey
Copy link

rjbailey commented Nov 4, 2015

Flow allows declaring object types with a type alias statement:

/**
 * A 2D point.
 */
type Point = { x: number, y: number };

It would be convenient if property names and types could be inferred from this statement in the same way that they are inferred from function parameters, generating docs as if those properties had been declared with the @property tag.

@tmcw
Copy link
Member

tmcw commented Nov 4, 2015

👍 Sounds like inferring a @typedef from this tag is the appropriate way: I can do this.

tmcw added a commit that referenced this issue Nov 4, 2015
Given the `type` tag introduced with Flow, this can infer
a typedef statement, as well as infer its potentially
nested properties and their types.

This also includes

* Refactor of Markdown AST generation that fixes #228
* Refactor of nest.js to handle multi-level nesting
tmcw added a commit that referenced this issue Nov 4, 2015
Given the `type` tag introduced with Flow, this can infer
a typedef statement, as well as infer its potentially
nested properties and their types.

This also includes

* Refactor of Markdown AST generation that fixes #228
* Refactor of nest.js to handle multi-level nesting
@tmcw tmcw closed this as completed in 70cc7d0 Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants