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
Summary:
This is an alternative to D84849556, which aims to solve facebook#1219
Instead of introducing a new type variant, this diff introduces a new field in Type::Union to hold an optional display name. It will be populated when resolving a type alias.
Compared to the other approach:
benefits
- less plumbing
- type checking behavior unaffected
drawbacks
- only applies to type aliases of unions (though arguably this is where readability matters most)
- name information is not preserved during union flattening (so if we union a type alias with something else, the result is the full expanded type)
Differential Revision: D87558541
0 commit comments