Allow migrating of union and intersection types
Is your feature request related to a problem? Please describe.
At the moment we do not support fully migrating union or intersection types. Methods or properties that return such types will not be resolved properly and any migration that attempts to modify such members will be ignored.
Describe the solution you'd like
We should consider extending our existing functionality to allow the migration of union and intersection types. These types can also be a part of a generic declaration, so we need to account for that as well.
Additional context
Some variations may include:
method1<A | B>(arg1: A, arg2: B, ...args): A | B
method2<B extends A>(predicate: (value: A, ...args) => value is B): B | undefined
method3<A & B>(...args): B | undefined
prop1: A | B | undefined
prop2: A & B
A common case is the Array.find method. One of its overloads is a generic union between S and undefined. At the moment any member K accessed from the type S returned by Array.find will not be migrated.
For example - grid.rowList.toArray().find(r => r.rowID === someRowID).rowID - r.rowID will be migrated successfully (providing everything is strictly typed) while find(...).rowID will not be migrated.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.
There has been no recent activity and this issue has been marked inactive.