You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Prettier print UnionTypeAnnotation and IntersectionTypeAnnotation differently from TypeScript parser. It's caused by differences between Flow AST and typescript-eslint AST.
Personally, I think the AST shape of typescript-eslint contains more information. Do you think we can align with it?
I'm working on this part, if we decide not to change, we'll have to make TS AST align with Flow (before print), because it's not possible to do the opposite, we don't have information of the leading | and & (unless we use tokens, which we havn't used yet).
The text was updated successfully, but these errors were encountered:
actually, the single type would be a much more involved change because it would mean there can be single-member unions or intersections, which we'd then have to handle throughout the type system. neither Babel nor Flow currently produce union or intersection ASTs in this case.
Flow version: 0.201.0
Currently, Prettier print
UnionTypeAnnotation
andIntersectionTypeAnnotation
differently from TypeScript parser. It's caused by differences between Flow AST and typescript-eslint AST.Personally, I think the AST shape of typescript-eslint contains more information. Do you think we can align with it?
I'm working on this part, if we decide not to change, we'll have to make TS AST align with Flow (before print), because it's not possible to do the opposite, we don't have information of the leading
|
and&
(unless we usetokens
, which we havn't used yet).The text was updated successfully, but these errors were encountered: