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

Type-expression parser should handle nested type unions without enclosing in parentheses. #47

Open
jdalton opened this issue Jan 30, 2016 · 2 comments

Comments

@jdalton
Copy link

jdalton commented Jan 30, 2016

Lodash is looking into using jsdoc and we're running into issues

The type-expression parser doesn't handle nested type unions unless all of the type unions are enclosed in parentheses. So for example this fails:

{Function|...(string|string[])}

but this is ok

{(Function|...(string|string[]))}
@hegemonic
Copy link
Owner

I'm open to implementing this, but I think I tried once already and ended up flailing. You might be better off biting the bullet and enclosing your type unions in parentheses, as in the second example.

@justinhelmer
Copy link

Wouldn't be too difficult to do a global search & replace for future releases, but there still remains the concern of generating documentation for releases that have already been published. For this, there would need to be some sort of preprocessing layer in order to correctly generate the markdown for legacy releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants