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
Given a union like type C = A | B, where A and B are both interfaces, babel-plugin-typescript-to-prototype generates code requiring that C contain all values present in A and B, rather than values present in either A or B. For example:
Thanks for the quick response. This looks like it'll require a pretty fundamental change to the way the plugin generates prop types (at least if we want to support things beyond the simplest case, e.g., A & (B | C)). I'm probably going to table working on it.
Description
Given a union like
type C = A | B
, whereA
andB
are both interfaces, babel-plugin-typescript-to-prototype generates code requiring thatC
contain all values present inA
andB
, rather than values present in eitherA
orB
. For example:This will generate the following code:
For a full repro, see https://github.com/ianhoffman/union-bug-repro
Expected Behavior
Given the above example, we should generate something like the following:
The text was updated successfully, but these errors were encountered: