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

Leading |/& is not included in intersection/union node #435

Closed
bradzacher opened this issue Apr 16, 2019 · 5 comments
Closed

Leading |/& is not included in intersection/union node #435

bradzacher opened this issue Apr 16, 2019 · 5 comments
Labels
bug Something isn't working external This issue is with another package, not typescript-eslint itself package: typescript-estree Issues related to @typescript-eslint/typescript-estree

Comments

@bradzacher
Copy link
Member

What code were you trying to parse?

type Foo = (
    | A
    | B
);

What did you expect to happen?
The leading | character is included in the TSUnionType.

What actually happened?
image
The moused over (underlined) TSUnionType starts after the leading | character.

Versions

package version
@typescript-eslint/typescript-estree 1.6.0
TypeScript 3.4.3
@bradzacher bradzacher added bug Something isn't working package: typescript-estree Issues related to @typescript-eslint/typescript-estree labels Apr 16, 2019
@bradzacher
Copy link
Member Author

Looks like it's a bug in typescript itself.

@JamesHenry
Copy link
Member

@bradzacher Have you reported it to them? Please could you link the issue here?

@JamesHenry JamesHenry added the external This issue is with another package, not typescript-eslint itself label Apr 20, 2019
@mysticatea
Copy link
Member

@bradzacher
Copy link
Member Author

microsoft/TypeScript#31265 has been merged, so the fix should be released with the next TS version

@JamesHenry
Copy link
Member

This fix is now available in TypeScript

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working external This issue is with another package, not typescript-eslint itself package: typescript-estree Issues related to @typescript-eslint/typescript-estree
Projects
None yet
Development

No branches or pull requests

3 participants