igniteui-angular
igniteui-angular copied to clipboard
Migration support for replacing methods calls with arbitrary code
Is your feature request related to a problem? Please describe.
When writing migrations, replacing a method call with arbitrary code is impossible. Example:
import { FilteringExpressionsTree } from 'igniteui-angular';
const tree = new FilteringExpressionsTree(0, 'test');
tree.find('test');
Should become:
import { FilteringExpressionsTree, FilterUtil } from 'igniteui-angular';
const tree = new FilteringExpressionsTree(0, 'test');
FilterUtil.find(tree, 'test');
Describe the solution you'd like
Either access to a LanguageService with all required dependencies to resolve the types(via UpdateChanges), or the ability to perform such a migration via the JSON migrations.
Describe alternatives you've considered
I've attempted to manually resolve the type via ts.TypeChecker, but it is missing dependencies and making it resolve them would be difficult and considerably bloat the update script.