prettier/tests/flow_union
Christopher Chedeau fe49650700 Inline | null and | void (#1734)
TypeScript doesn't have the concept of `?` for nullable options and instead you have to write `| null` and `| void`. This is annoying to have it use the long form, so we're now inlining them.

While working on this, I found out a few issues with the way we deal with those:
- We only align objects if the parent is a union. This means that if you have `Array<{ object }>`, the object is not aligned properly. The fix is to move the alignment logic to the union, and not the child.
- When doing so, it messes up with the comment alignment, so we have to manually handle children comment printing in the union code.

It doesn't yet fix #1727 because the hardcoded type names are different, i'll follow up in a PR.
2017-05-25 16:26:40 -07:00
..
__snapshots__ Inline | null and | void (#1734) 2017-05-25 16:26:40 -07:00
jsfmt.spec.js Inline | null and | void (#1734) 2017-05-25 16:26:40 -07:00
union.js Inline | null and | void (#1734) 2017-05-25 16:26:40 -07:00