igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Migration support for replacing methods calls with arbitrary code

Open Otixa opened this issue 1 year ago • 0 comments

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.

Otixa avatar Sep 26 '24 12:09 Otixa