Skip to content
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

Flow polymorphic types cannot be parsed #125

Closed
aaronjensen opened this issue Sep 21, 2016 · 4 comments
Closed

Flow polymorphic types cannot be parsed #125

aaronjensen opened this issue Sep 21, 2016 · 4 comments
Milestone

Comments

@aaronjensen
Copy link

I had this:

export type Props = {
  handleSubmit: () => void,
  onBack?: () => void,
  children?: React.Element<*>,
  backText?: string,
  nextText?: string,
}

And it failed to parse so I had to change my children type to mixed. I'm guessing this has to do w/ the fact that docgen is using an old version of babylon.

@fkling
Copy link
Member

fkling commented Sep 22, 2016

Yeah, I think we should simply use the flow parser since it's more ESTree-compatible than babylon 6.

@fkling fkling added this to the v3 milestone Sep 27, 2016
@aaronjensen
Copy link
Author

babylon 6 can handle all of these though, right? Is it just a version issue?

The flow parser is ocaml, so I'm not sure it could be used here.

@fkling
Copy link
Member

fkling commented Nov 3, 2016

There is JS version of the flow parser available: https://www.npmjs.com/package/flow-parser . I'd rather use flow since I know they are trying to stay close to the ESTree spec.

@danez
Copy link
Collaborator

danez commented Jul 13, 2018

fixed in 3.0.0

@danez danez closed this as completed Jul 13, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants